text
stringlengths 107
2.17M
|
---|
From mathcomp
Require Import ssreflect ssrbool ssrfun.
From LemmaOverloading
Require Import heaps rels stmod stsep stlog.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Structure tagged_heap := Tag {untag :> heap}.
Definition right_tag := Tag.
Definition left_tag := right_tag.
Canonical Structure found_tag i := left_tag i.
Definition update_axiom k r (h : tagged_heap) := untag h = k :+ r.
Structure update (k r : heap) :=
Update {heap_of :> tagged_heap;
_ : update_axiom k r heap_of}.
Lemma updateE r k (f : update k r) : untag f = k :+ r.
Proof.
(* Goal: @eq heap (untag (@heap_of k r f)) (union2 k r) *)
by case: f=>[[j]] /=; rewrite /update_axiom /= => ->.
Qed.
Lemma found_pf k : update_axiom k empty (found_tag k).
Proof.
(* Goal: update_axiom k empty (found_tag k) *)
by rewrite /update_axiom unh0.
Qed.
Canonical Structure found_struct k := Update (found_pf k).
Lemma left_pf h r (f : forall k, update k r) k :
update_axiom k (r :+ h) (left_tag (f k :+ h)).
Proof.
(* Goal: update_axiom k (union2 r h) (left_tag (union2 (untag (@heap_of k r (f k))) h)) *)
by rewrite updateE /update_axiom /= unA.
Qed.
Canonical Structure left_struct h r (f : forall k, update k r) k :=
Update (left_pf h f k).
Lemma right_pf h r (f : forall k, update k r) k :
update_axiom k (h :+ r) (right_tag (h :+ f k)).
Proof.
(* Goal: update_axiom k (union2 h r) (right_tag (union2 h (untag (@heap_of k r (f k))))) *)
by rewrite updateE /update_axiom /= unCA.
Qed.
Canonical Structure right_struct h r (f : forall k, update k r) k :=
Update (right_pf h f k).
Notation cont A := (ans A -> heap -> Prop).
Section EvalDoR.
Variables (A B : Type).
Lemma val_doR (s : spec A) i j (f : forall k, update k j) (r : cont A) :
s.1 i ->
Lemma try_doR (s : spec A) s1 s2 i j (f : forall k, update k j) (r : cont B) :
s.1 i ->
Lemma bnd_doR (s : spec A) s2 i j (f : forall k, update k j) (r : cont B) :
s.1 i ->
End EvalDoR.
Definition val_retR := val_ret.
Definition try_retR := try_ret.
Definition bnd_retR := bnd_ret.
Section EvalReadR.
Variables (A B : Type).
Lemma val_readR v x i (f : update (x :-> v) i) (r : cont A) :
(def f -> r (Val v) f) ->
verify (read_s A x) f r.
Proof.
(* Goal: forall _ : forall _ : is_true (def (untag (@heap_of (@pts A x v) i f))), r (@Val A v) (untag (@heap_of (@pts A x v) i f)), @verify' A (@fr A (read_s A x)) (untag (@heap_of (@pts A x v) i f)) r *)
by rewrite updateE; apply: val_read.
Qed.
Lemma try_readR s1 s2 v x i (f : update (x :-> v) i) (r : cont B) :
verify (s1 v) f r ->
verify (try_s (read_s A x) s1 s2) f r.
Proof.
(* Goal: forall _ : @verify' B (@fr B (s1 v)) (untag (@heap_of (@pts A x v) i f)) r, @verify' B (@fr B (@try_s A B (read_s A x) s1 s2)) (untag (@heap_of (@pts A x v) i f)) r *)
by rewrite updateE; apply: try_read.
Qed.
Lemma bnd_readR s v x i (f : update (x :-> v) i) (r : cont B) :
verify (s v) f r ->
verify (bind_s (read_s A x) s) f r.
Proof.
(* Goal: forall _ : @verify' B (@fr B (s v)) (untag (@heap_of (@pts A x v) i f)) r, @verify' B (@fr B (@bind_s A B (read_s A x) s)) (untag (@heap_of (@pts A x v) i f)) r *)
by rewrite updateE; apply: bnd_read.
Qed.
End EvalReadR.
Section EvalWriteR.
Variables (A B C : Type).
Lemma val_writeR (v : A) (w : B) x i (f : forall k, update k i) (r : cont unit) :
(def (f (x :-> v)) -> r (Val tt) (f (x :-> v))) ->
verify (write_s x v) (f (x :-> w)) r.
Proof.
(* Goal: forall _ : forall _ : is_true (def (untag (@heap_of (@pts A x v) i (f (@pts A x v))))), r (@Val unit tt) (untag (@heap_of (@pts A x v) i (f (@pts A x v)))), @verify' unit (@fr unit (@write_s A x v)) (untag (@heap_of (@pts B x w) i (f (@pts B x w)))) r *)
by rewrite !updateE; apply: val_write.
Qed.
Lemma try_writeR s1 s2 (v : A) (w : C) x i
(f : forall k, update k i) (r : cont B) :
verify (s1 tt) (f (x :-> v)) r ->
verify (try_s (write_s x v) s1 s2) (f (x :-> w)) r.
Proof.
(* Goal: forall _ : @verify' B (@fr B (s1 tt)) (untag (@heap_of (@pts A x v) i (f (@pts A x v)))) r, @verify' B (@fr B (@try_s unit B (@write_s A x v) s1 s2)) (untag (@heap_of (@pts C x w) i (f (@pts C x w)))) r *)
rewrite !updateE; apply: try_write.
Qed.
Lemma bnd_writeR s (v : A) (w : C) x i (f : forall k, update k i) (r : cont B) :
verify (s tt) (f (x :-> v)) r ->
verify (bind_s (write_s x v) s) (f (x :-> w)) r.
Proof.
(* Goal: forall _ : @verify' B (@fr B (s tt)) (untag (@heap_of (@pts A x v) i (f (@pts A x v)))) r, @verify' B (@fr B (@bind_s unit B (@write_s A x v) s)) (untag (@heap_of (@pts C x w) i (f (@pts C x w)))) r *)
by rewrite !updateE; apply: bnd_write.
Qed.
End EvalWriteR.
Definition val_allocR := val_alloc.
Definition try_allocR := try_alloc.
Definition bnd_allocR := bnd_alloc.
Definition val_allocbR := val_allocb.
Definition try_allocbR := try_allocb.
Definition bnd_allocbR := bnd_allocb.
Section EvalDeallocR.
Variables (A B : Type).
Lemma val_deallocR (v : A) x i (f : forall k, update k i) (r : cont unit) :
(def (f empty) -> r (Val tt) (f empty)) ->
verify (dealloc_s x) (f (x :-> v)) r.
Proof.
(* Goal: forall _ : forall _ : is_true (def (untag (@heap_of empty i (f empty)))), r (@Val unit tt) (untag (@heap_of empty i (f empty))), @verify' unit (@fr unit (dealloc_s x)) (untag (@heap_of (@pts A x v) i (f (@pts A x v)))) r *)
by rewrite !updateE un0h; apply: val_dealloc.
Qed.
Lemma try_deallocR s1 s2 (v : B) x i (f : forall k, update k i) (r : cont A) :
verify (s1 tt) (f empty) r ->
verify (try_s (dealloc_s x) s1 s2) (f (x :-> v)) r.
Proof.
(* Goal: forall _ : @verify' A (@fr A (s1 tt)) (untag (@heap_of empty i (f empty))) r, @verify' A (@fr A (@try_s unit A (dealloc_s x) s1 s2)) (untag (@heap_of (@pts B x v) i (f (@pts B x v)))) r *)
by rewrite !updateE un0h; apply: try_dealloc.
Qed.
Lemma bnd_deallocR s (v : B) x i (f : forall k, update k i) (r : cont A) :
verify (s tt) (f empty) r ->
verify (bind_s (dealloc_s x) s) (f (x :-> v)) r.
Proof.
(* Goal: forall _ : @verify' A (@fr A (s tt)) (untag (@heap_of empty i (f empty))) r, @verify' A (@fr A (@bind_s unit A (dealloc_s x) s)) (untag (@heap_of (@pts B x v) i (f (@pts B x v)))) r *)
by rewrite !updateE un0h; apply: bnd_dealloc.
Qed.
End EvalDeallocR.
Definition val_throwR := val_throw.
Definition try_throwR := try_throw.
Definition bnd_throwR := bnd_throw.
Section EvalGhostR.
Variables (A B C : Type) (t : C) (p : C -> Pred heap) (q : C -> post A).
Variables (s1 : A -> spec B) (s2 : exn -> spec B) (i j : heap).
Variables (f : forall k, update k j) (P : Pred heap).
Lemma val_ghR (r : cont A) :
let: s := (fun i => exists x, i \In p x,
fun y i m => forall x, i \In p x -> q x y i m) in
(forall x m, q t (Val x) i m -> def (f m) -> r (Val x) (f m)) ->
(forall e m, q t (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
i \In p t ->
verify s (f i) r.
Lemma val_gh1R (r : cont A) :
let: Q := fun y i m => forall x, i \In p x -> q x y i m in
(i \In p t -> P i) ->
(forall x m, q t (Val x) i m -> def (f m) -> r (Val x) (f m)) ->
(forall e m, q t (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
i \In p t ->
verify (P, Q) (f i) r.
Lemma try_ghR (r : cont B) :
let: s := (fun i => exists x, i \In p x,
fun y i m => forall x, i \In p x -> q x y i m) in
(forall x m, q t (Val x) i m -> verify (s1 x) (f m) r) ->
(forall e m, q t (Exn e) i m -> verify (s2 e) (f m) r) ->
i \In p t ->
verify (try_s s s1 s2) (f i) r.
Lemma try_gh1R (r : cont B) :
let: Q := fun y i m => forall x, i \In p x -> q x y i m in
(i \In p t -> P i) ->
(forall x m, q t (Val x) i m -> verify (s1 x) (f m) r) ->
(forall e m, q t (Exn e) i m -> verify (s2 e) (f m) r) ->
i \In p t ->
verify (try_s (P, Q) s1 s2) (f i) r.
Lemma bnd_ghR (r : cont B) :
let: s := (fun i => exists x, i \In p x,
fun y i m => forall x, i \In p x -> q x y i m) in
(forall x m, q t (Val x) i m -> verify (s1 x) (f m) r) ->
(forall e m, q t (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
i \In p t ->
verify (bind_s s s1) (f i) r.
Lemma bnd_gh1R (r : cont B) :
let: Q := fun y i m => forall x, i \In p x -> q x y i m in
(i \In p t -> P i) ->
(forall x m, q t (Val x) i m -> verify (s1 x) (f m) r) ->
(forall e m, q t (Exn e) i m -> def (f m) -> r (Exn e) (f m)) ->
i \In p t ->
verify (bind_s (P, Q) s1) (f i) r.
End EvalGhostR.
Structure val_form A i r (p : Prop):=
ValForm {val_pivot :> spec A;
_ : p -> verify val_pivot i r}.
Structure bnd_form A B i (s : A -> spec B) r (p : Prop) :=
BndForm {bnd_pivot :> spec A;
_ : p -> verify (bind_s bnd_pivot s) i r}.
Structure try_form A B i (s1 : A -> spec B)
(s2 : exn -> spec B) r (p : Prop) :=
TryForm {try_pivot :> spec A;
_ : p -> verify (try_s try_pivot s1 s2) i r}.
Definition hstep A i (r : cont A) p (e : val_form i r p) : p -> verify e i r :=
let: ValForm _ pf := e in pf.
Definition hstep_bnd A B i (s : A -> spec B) r p (e : bnd_form i s r p)
: p -> verify (bind_s e s) i r
:= let: BndForm _ pf := e in pf.
Canonical Structure
bnd_case_form A B i (s : A -> spec B) r p (e : bnd_form i s r p) :=
ValForm (hstep_bnd e).
Lemma try_case_pf A B i (s1 : A -> spec B) (s2 : exn -> spec B) r p
(e : try_form i s1 s2 r p) :
p -> verify (try_s e s1 s2) i r.
Proof.
(* Goal: forall _ : p, @verify' B (@fr B (@try_s A B (@try_pivot A B i s1 s2 r p e) s1 s2)) i r *)
by case:e=>[?]; apply.
Qed.
Canonical Structure val_ret_form A v i r :=
ValForm (@val_retR A v i r).
Canonical Structure bnd_ret_form A B s v i r :=
BndForm (@bnd_retR A B s v i r).
Canonical Structure try_ret_form A B s1 s2 v i r :=
TryForm (@try_retR A B s1 s2 v i r).
Canonical Structure val_read_form A v x r j f :=
ValForm (@val_readR A v x j f r).
Canonical Structure bnd_read_form A B s v x r j f :=
BndForm (@bnd_readR A B s v x j f r).
Canonical Structure try_read_form A B s1 s2 v x r j f :=
TryForm (@try_readR A B s1 s2 v x j f r).
Canonical Structure val_write_form A B v w x r j f :=
ValForm (@val_writeR A B v w x j f r).
Canonical Structure bnd_write_form A B C s v w x r j f :=
BndForm (@bnd_writeR A B C s v w x j f r).
Canonical Structure try_write_form A B C s1 s2 v w x r j f :=
TryForm (@try_writeR A B C s1 s2 v w x j f r).
Canonical Structure val_alloc_form A v i r :=
ValForm (@val_allocR A v i r).
Canonical Structure bnd_alloc_form A B s v i r :=
BndForm (@bnd_allocR A B s v i r).
Canonical Structure try_alloc_form A B s1 s2 v i r :=
TryForm (@try_allocR A B s1 s2 v i r).
Canonical Structure val_allocb_form A v n i r :=
ValForm (@val_allocbR A v n i r).
Canonical Structure bnd_allocb_form A B s v n i r :=
BndForm (@bnd_allocbR A B s v n i r).
Canonical Structure try_allocb_form A B s1 s2 v n i r :=
TryForm (@try_allocbR A B s1 s2 v n i r).
Canonical Structure val_dealloc_form A v x r j f :=
ValForm (@val_deallocR A v x j f r).
Canonical Structure bnd_dealloc_form A B s v x r j f :=
BndForm (@bnd_deallocR A B s v x j f r).
Canonical Structure try_dealloc_form A B s1 s2 v x r j f :=
TryForm (@try_deallocR A B s1 s2 v x j f r).
Ltac vauto := (do ?econstructor=>//).
Example ex_read x :
verify (bind_s (write_s x 4) (fun _=> read_s _ x))
(x :-> 0) (fun r _ => r = Val 4).
by do 2! [apply: hstep].
Abort.
Example ex_val_do (s : spec nat) (r : cont nat) (x y : ptr) :
s.1 (y:->2) ->
(forall x' m,
s.2 (Val x') (y:->2) m -> def (x:->1:+m) -> r (Val x') (x:->1:+m)) ->
(forall e m,
s.2 (Exn e) (y:->2) m -> def (x:->1:+m) -> r (Exn e) (x:->1:+m)) ->
verify s (x:->1 :+ y:->2) r.
move=>H1 H2 H3.
apply: (val_doR _ (i:=y:->2))=>//=.
Abort.
Example ex_bwd i x1 x2 (e : unit -> spec nat) q:
verify (e tt) (i :+ (x1 :-> 1 :+ x2 :-> 4)) q ->
verify (bind_s (write_s x2 4) e) (i :+ (x1 :-> 1 :+ x2 :-> 2)) q.
by move=>H; apply: bnd_writeR.
Abort.
Example ex_fwd i x1 x2 (e : unit -> spec nat) q:
verify (e tt) (i :+ (x1 :-> 1 :+ x2 :-> 4)) q ->
verify (bind_s (write_s x2 4) e) (i :+ (x1 :-> 1 :+ x2 :-> 2)) q.
move=>H.
apply: (bnd_writeR (x:=x2) H).
Abort.
|
Require Import syntax.
Require Import utils.
Inductive FV (z : vari) : tm -> Prop :=
| FV_abs :
forall e : tm,
FV z e -> forall v : vari, z <> v -> forall t : ty, FV z (abs v t e)
| FV_fix :
forall e : tm,
FV z e -> forall v : vari, z <> v -> forall t : ty, FV z (Fix v t e)
| FV_appl1 : forall e_1 e_2 : tm, FV z e_1 -> FV z (appl e_1 e_2)
| FV_appl2 : forall e_1 e_2 : tm, FV z e_2 -> FV z (appl e_1 e_2)
| FV_cond1 : forall e_1 e_2 e_3 : tm, FV z e_1 -> FV z (cond e_1 e_2 e_3)
| FV_cond2 : forall e_1 e_2 e_3 : tm, FV z e_2 -> FV z (cond e_1 e_2 e_3)
| FV_cond3 : forall e_1 e_2 e_3 : tm, FV z e_3 -> FV z (cond e_1 e_2 e_3)
| FV_var : forall v : vari, z = v -> FV z (var v)
| FV_succ : forall e : tm, FV z e -> FV z (succ e)
| FV_prd : forall e : tm, FV z e -> FV z (prd e)
| FV_is_o : forall e : tm, FV z e -> FV z (is_o e)
| FV_closa :
forall (v : vari) (t : ty) (e e_1 : tm),
FV z e_1 -> FV z (clos e v t e_1)
| FV_closb :
forall (v : vari) (t : ty) (e e_1 : tm),
FV z e -> z <> v -> FV z (clos e v t e_1).
Goal
forall (x v : vari) (t : ty) (e : tm),
~ FV x (abs v t e) -> x = v \/ ~ FV x e.
intros.
specialize (Xmidvar x v); simple induction 1; intro A.
left; assumption.
right; red in |- *; intro; apply H; apply FV_abs; assumption.
Save notFV_abs.
Goal
forall (v : vari) (e1 e2 : tm), ~ FV v (appl e1 e2) -> ~ FV v e1 /\ ~ FV v e2.
intros v e1 e2 N.
split.
red in |- *; intro; apply N; apply FV_appl1; assumption.
red in |- *; intro; apply N; apply FV_appl2; assumption.
Save notFV_appl.
Goal
forall (v : vari) (e1 e2 e3 : tm),
~ FV v (cond e1 e2 e3) -> ~ FV v e1 /\ ~ FV v e2 /\ ~ FV v e3.
intros v e1 e2 e3 N.
split.
red in |- *; intro; apply N; apply FV_cond1; assumption.
split.
red in |- *; intro; apply N; apply FV_cond2; assumption.
red in |- *; intro; apply N; apply FV_cond3; assumption.
Save notFV_cond.
Goal forall v x : vari, ~ FV v (var x) -> v <> x.
intros v x N.
red in |- *; intro; apply N; apply FV_var; assumption.
Save notFV_var.
Goal forall (v : vari) (e : tm), ~ FV v (succ e) -> ~ FV v e.
intros v e N.
red in |- *; intro; apply N; apply FV_succ; assumption.
Save notFV_succ.
Goal forall (v : vari) (e : tm), ~ FV v (prd e) -> ~ FV v e.
intros v e N.
red in |- *; intro; apply N; apply FV_prd; assumption.
Save notFV_prd.
Goal forall (v : vari) (e : tm), ~ FV v (is_o e) -> ~ FV v e.
intros v e N.
red in |- *; intro; apply N; apply FV_is_o; assumption.
Save notFV_is_o.
Goal
forall (x v : vari) (t : ty) (e : tm),
~ FV x (Fix v t e) -> x = v \/ ~ FV x e.
intros.
specialize (Xmidvar x v); simple induction 1; intro A.
left; assumption.
right; red in |- *; intro; apply H; apply FV_fix; assumption.
Save notFV_fix.
Goal
forall (x v : vari) (t : ty) (e a : tm),
~ FV x (clos e v t a) -> ~ FV x a /\ (x = v \/ ~ FV x e).
intros.
split.
red in |- *; intro; apply H; apply FV_closa; assumption.
specialize (Xmidvar x v); simple induction 1; intro A.
left; assumption.
right; red in |- *; intro; apply H; apply FV_closb; assumption.
Save notFV_clos.
Definition fv (v : vari) (e : tm) :=
match e return Prop with
| o =>
False
| ttt => False
| fff => False
| abs y s e => FV v e /\ v <> y
| appl e1 e2 => FV v e1 \/ FV v e2
| cond e1 e2 e3 => FV v e1 \/ FV v e2 \/ FV v e3
| var y => v = y
| succ n => FV v n
| prd n => FV v n
| is_o n => FV v n
| Fix y s e => FV v e /\ v <> y
| clos e y s e1 => FV v e1 \/ FV v e /\ v <> y
end.
Goal forall (v : vari) (e : tm), FV v e -> fv v e.
simple induction 1; simpl in |- *; intros.
split; assumption.
split; assumption.
left; assumption.
right; assumption.
left; assumption.
right; left; assumption.
right; right; assumption.
assumption.
assumption.
assumption.
assumption.
left; assumption.
right; split; assumption.
Save FV_fv.
Goal forall v : vari, ~ FV v o.
intro v; red in |- *; intro F.
change (fv v o) in |- *.
apply FV_fv; assumption.
Save inv_FV_o.
Goal forall v : vari, ~ FV v ttt.
intro v; red in |- *; intro F.
change (fv v ttt) in |- *.
apply FV_fv; assumption.
Save inv_FV_ttt.
Goal forall v : vari, ~ FV v fff.
intro v; red in |- *; intro F.
change (fv v fff) in |- *.
apply FV_fv; assumption.
Save inv_FV_fff.
Goal
forall (v x : vari) (t : ty) (e : tm), FV v (abs x t e) -> FV v e /\ v <> x.
intros v x t e F.
change (fv v (abs x t e)) in |- *.
apply FV_fv; assumption.
Save inv_FV_abs.
Goal
forall (v x : vari) (t : ty) (e : tm), FV v (Fix x t e) -> FV v e /\ v <> x.
intros v x t e F.
change (fv v (Fix x t e)) in |- *.
apply FV_fv; assumption.
Save inv_FV_fix.
Goal forall (v : vari) (e1 e2 : tm), FV v (appl e1 e2) -> FV v e1 \/ FV v e2.
intros v e1 e2 F.
change (fv v (appl e1 e2)) in |- *.
apply FV_fv; assumption.
Save inv_FV_appl.
Goal
forall (v : vari) (e1 e2 e3 : tm),
FV v (cond e1 e2 e3) -> FV v e1 \/ FV v e2 \/ FV v e3.
intros v e1 e2 e3 F.
change (fv v (cond e1 e2 e3)) in |- *.
apply FV_fv; assumption.
Save inv_FV_cond.
Goal forall v x : vari, FV v (var x) -> v = x.
intros v x F.
change (fv v (var x)) in |- *.
apply FV_fv; assumption.
Save inv_FV_var.
Goal forall (v : vari) (e : tm), FV v (succ e) -> FV v e.
intros v e F.
change (fv v (succ e)) in |- *.
apply FV_fv; assumption.
Save inv_FV_succ.
Goal forall (v : vari) (e : tm), FV v (prd e) -> FV v e.
intros v e F.
change (fv v (prd e)) in |- *.
apply FV_fv; assumption.
Save inv_FV_prd.
Goal forall (v : vari) (e : tm), FV v (is_o e) -> FV v e.
intros v e F.
change (fv v (is_o e)) in |- *.
apply FV_fv; assumption.
Save inv_FV_is_o.
Goal
forall (v x : vari) (t : ty) (e a : tm),
FV v (clos e x t a) -> FV v a \/ FV v e /\ v <> x.
intros v x t e a F.
change (fv v (clos e x t a)) in |- *.
apply FV_fv; assumption.
Save inv_FV_clos.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_sameside2.
Require Export GeoCoq.Elements.OriginalProofs.lemma_10_12.
Require Export GeoCoq.Elements.OriginalProofs.proposition_07.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_erectedperpendicularunique :
forall A B C E,
Per A B C -> Per A B E -> OS C E A B ->
Out B C E.
Proof.
(* Goal: forall (A B C E : @Point Ax0) (_ : @Per Ax0 A B C) (_ : @Per Ax0 A B E) (_ : @OS Ax0 C E A B), @Out Ax0 B C E *)
intros.
(* Goal: @Out Ax0 B C E *)
let Tf:=fresh in assert (Tf:exists D, (BetS A B D /\ Cong A B D B /\ Cong A C D C /\ neq B C)) by (conclude_def Per );destruct Tf as [D];spliter.
(* Goal: @Out Ax0 B C E *)
assert (neq B E) by (conclude_def Per ).
(* Goal: @Out Ax0 B C E *)
rename_H H;let Tf:=fresh in assert (Tf:exists H, (Out B E H /\ Cong B H B C)) by (conclude lemma_layoff);destruct Tf as [H];spliter.
(* Goal: @Out Ax0 B C E *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @Out Ax0 B C E *)
assert (Col A B B) by (conclude_def Col ).
(* Goal: @Out Ax0 B C E *)
assert (OS C H A B) by (conclude lemma_sameside2).
(* Goal: @Out Ax0 B C E *)
assert (Per A B H) by (conclude lemma_8_3).
(* Goal: @Out Ax0 B C E *)
assert (Cong B C B H) by (conclude lemma_congruencesymmetric).
(* Goal: @Out Ax0 B C E *)
assert (Cong A C A H) by (conclude lemma_10_12).
(* Goal: @Out Ax0 B C E *)
assert (Cong C A H A) by (forward_using lemma_congruenceflip).
(* Goal: @Out Ax0 B C E *)
assert (Cong C B H B) by (forward_using lemma_congruenceflip).
(* Goal: @Out Ax0 B C E *)
assert (~ eq A B).
(* Goal: @Out Ax0 B C E *)
(* 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 *)
assert (nCol A B C) by (conclude lemma_rightangleNC).
(* Goal: False *)
contradict.
(* BG Goal: @Out Ax0 B C E *)
}
(* Goal: @Out Ax0 B C E *)
assert (eq C H) by (conclude proposition_07).
(* Goal: @Out Ax0 B C E *)
assert (Out B E C) by (conclude cn_equalitysub).
(* Goal: @Out Ax0 B C E *)
assert (Out B C E) by (conclude lemma_ray5).
(* Goal: @Out Ax0 B C E *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_extension.
Require Export GeoCoq.Elements.OriginalProofs.lemma_lessthancongruence2.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_TTflip2 :
forall A B C D E F G H,
TT A B C D E F G H ->
TT A B C D H G F E.
Proof.
(* Goal: forall (A B C D E F G H : @Point Ax0) (_ : @TT Ax0 A B C D E F G H), @TT Ax0 A B C D H G F E *)
intros.
(* Goal: @TT Ax0 A B C D H G F E *)
let Tf:=fresh in assert (Tf:exists J, (BetS E F J /\ Cong F J G H /\ TG A B C D E J)) by (conclude_def TT );destruct Tf as [J];spliter.
(* Goal: @TT Ax0 A B C D H G F E *)
let Tf:=fresh in assert (Tf:exists K, (BetS A B K /\ Cong B K C D /\ Lt E J A K)) by (conclude_def TG );destruct Tf as [K];spliter.
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq F J) by (forward_using lemma_betweennotequal).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq G H) by (conclude axiom_nocollapse).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq H G) by (conclude lemma_inequalitysymmetric).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq E F) by (forward_using lemma_betweennotequal).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (neq F E) by (conclude lemma_inequalitysymmetric).
(* Goal: @TT Ax0 A B C D H G F E *)
let Tf:=fresh in assert (Tf:exists L, (BetS H G L /\ Cong G L F E)) by (conclude lemma_extension);destruct Tf as [L];spliter.
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong L G E F) by (forward_using lemma_congruenceflip).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong G H F J) by (conclude lemma_congruencesymmetric).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (BetS L G H) by (conclude axiom_betweennesssymmetry).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong L H E J) by (conclude cn_sumofparts).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong H L L H) by (conclude cn_equalityreverse).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong H L E J) by (conclude lemma_congruencetransitive).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Cong E J H L) by (conclude lemma_congruencesymmetric).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (Lt H L A K) by (conclude lemma_lessthancongruence2).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (TG A B C D H L) by (conclude_def TG ).
(* Goal: @TT Ax0 A B C D H G F E *)
assert (TT A B C D H G F E) by (conclude_def TT ).
(* Goal: @TT Ax0 A B C D H G F E *)
close.
Qed.
End Euclid. |
Require Export GeoCoq.Elements.OriginalProofs.proposition_31.
Require Export GeoCoq.Elements.OriginalProofs.lemma_crossbar2.
Require Export GeoCoq.Elements.OriginalProofs.lemma_supplementinequality.
Require Export GeoCoq.Elements.OriginalProofs.lemma_angletrichotomy2.
Require Export GeoCoq.Elements.OriginalProofs.lemma_supplementsymmetric.
Section Euclid.
Context `{Ax:euclidean_euclidean}.
Lemma proposition_29 :
forall A B C D E G H,
Par A B C D -> BetS A G B -> BetS C H D -> BetS E G H -> TS A G H D ->
CongA A G H G H D /\ CongA E G B G H D /\ RT B G H G H D.
Proof.
(* Goal: forall (A B C D E G H : @Point Ax0) (_ : @Par Ax0 A B C D) (_ : @BetS Ax0 A G B) (_ : @BetS Ax0 C H D) (_ : @BetS Ax0 E G H) (_ : @TS Ax0 A G H D), and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
intros.
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Col C H D) by (conclude_def Col ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (neq G H) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (neq A B) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (neq C D) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
let Tf:=fresh in assert (Tf:exists R, (BetS A R D /\ Col G H R /\ nCol G H A)) by (conclude_def TS );destruct Tf as [R];spliter.
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (TS D G H A) by (conclude lemma_oppositesidesymmetric).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (nCol G H D) by (conclude_def TS ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (nCol D H G) by (forward_using lemma_NCorder).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Col D H C) by (forward_using lemma_collinearorder).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (eq H H) by (conclude cn_equalityreflexive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Col D H H) by (conclude_def Col ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (neq C H) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (nCol C H G) by (conclude lemma_NChelper).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Col C H C) by (conclude_def Col ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (neq C D) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (nCol C D G) by (conclude lemma_NChelper).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
let Tf:=fresh in assert (Tf:exists P Q S, (BetS P G Q /\ CongA Q G H G H C /\ CongA Q G H C H G /\ CongA H G Q C H G /\ CongA P G H G H D /\ CongA P G H D H G /\ CongA H G P D H G /\ Par P Q C D /\ Cong P G H D /\ Cong G Q C H /\ Cong G S S H /\ Cong P S S D /\ Cong C S S Q /\ BetS P S D /\ BetS C S Q /\ BetS G S H)) by (conclude proposition_31);destruct Tf as [P[Q[S]]];spliter.
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (~ Meet A B C D) by (conclude_def Par ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (eq P P) by (conclude cn_equalityreflexive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (neq P G) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (neq G P) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Out G P P) by (conclude lemma_ray4).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Col G S H) by (conclude_def Col ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Col G H S) by (forward_using lemma_collinearorder).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA G H D P G H) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (nCol P G H) by (conclude lemma_equalanglesNC).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (nCol G H P) by (forward_using lemma_NCorder).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (OS A P G H) by (conclude_def OS ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (eq H H) by (conclude cn_equalityreflexive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (neq G H) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Out G H H) by (conclude lemma_ray4).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (~ LtA H G A H G P).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* Goal: not (@LtA Ax0 H G A H G P) *)
{
(* Goal: not (@LtA Ax0 H G A H G P) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists M, (BetS P M H /\ Out G A M)) by (conclude lemma_crossbar2);destruct Tf as [M];spliter.
(* Goal: False *)
assert (Cong G S H S) by (forward_using lemma_congruenceflip).
(* Goal: False *)
assert (Cong S P S D) by (forward_using lemma_congruenceflip).
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists K, (BetS G M K /\ BetS D H K)) by (conclude postulate_Euclid5);destruct Tf as [K];spliter.
(* Goal: False *)
assert (Col G A M) by (conclude lemma_rayimpliescollinear).
(* Goal: False *)
assert (Col G M K) by (conclude_def Col ).
(* Goal: False *)
assert (Col M G A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col M G K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq G M) by (conclude lemma_raystrict).
(* Goal: False *)
assert (neq M G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col G A K) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A G B) by (conclude_def Col ).
(* Goal: False *)
assert (Col A G K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col G A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col G A K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq A G) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq G A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A B K) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col H D K) by (conclude_def Col ).
(* Goal: False *)
assert (Col H D C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq H D) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col D K C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col C D K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
}
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (~ LtA H G P H G A).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* Goal: not (@LtA Ax0 H G P H G A) *)
{
(* Goal: not (@LtA Ax0 H G P H G A) *)
intro.
(* Goal: False *)
assert (nCol P G H) by (forward_using lemma_NCorder).
(* Goal: False *)
assert (CongA P G H H G P) by (conclude lemma_ABCequalsCBA).
(* Goal: False *)
assert (LtA P G H H G A) by (conclude lemma_angleorderrespectscongruence2).
(* Goal: False *)
assert (~ Col H G A).
(* Goal: False *)
(* Goal: not (@Col Ax0 H G A) *)
{
(* Goal: not (@Col Ax0 H G A) *)
intro.
(* Goal: False *)
assert (Col G H A) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (CongA H G A A G H) by (conclude lemma_ABCequalsCBA).
(* Goal: False *)
assert (CongA A G H H G A) by (conclude lemma_equalanglessymmetric).
(* Goal: False *)
assert (LtA P G H A G H) by (conclude lemma_angleorderrespectscongruence).
(* Goal: False *)
assert (eq H H) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (Out G H H) by (conclude lemma_ray4).
(* Goal: False *)
assert (Supp P G H H Q) by (conclude_def Supp ).
(* Goal: False *)
assert (BetS D H C) by (conclude axiom_betweennesssymmetry).
(* Goal: False *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (neq H G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Out H G G) by (conclude lemma_ray4).
(* Goal: False *)
assert (Supp D H G G C) by (conclude_def Supp ).
(* Goal: False *)
assert (CongA G H D D H G) by (conclude lemma_ABCequalsCBA).
(* Goal: False *)
assert (CongA P G H D H G) by (conclude lemma_equalanglestransitive).
(* Goal: False *)
assert (CongA H G Q G H C) by (conclude lemma_supplements).
(* Goal: False *)
assert (Supp A G H H B) by (conclude_def Supp ).
(* Goal: False *)
assert (LtA H G B H G Q) by (conclude lemma_supplementinequality).
(* Goal: False *)
assert (BetS B G A) by (conclude axiom_betweennesssymmetry).
(* Goal: False *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (Col G H G) by (conclude_def Col ).
(* Goal: False *)
assert (~ Col G H B).
(* Goal: False *)
(* Goal: not (@Col Ax0 G H B) *)
{
(* Goal: not (@Col Ax0 G H B) *)
intro.
(* Goal: False *)
assert (Col A G B) by (conclude_def Col ).
(* Goal: False *)
assert (Col B G A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B G H) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq G B) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq B G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col G A H) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col H G A) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (TS B G H A) by (conclude_def TS ).
(* Goal: False *)
assert (TS A G H B) by (conclude lemma_oppositesidesymmetric).
(* Goal: False *)
assert (OS A P G H) by (conclude_def OS ).
(* Goal: False *)
assert (OS P A G H) by (forward_using lemma_samesidesymmetric).
(* Goal: False *)
assert (TS P G H B) by (conclude lemma_planeseparation).
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists L, (BetS P L B /\ Col G H L /\ nCol G H P)) by (conclude_def TS );destruct Tf as [L];spliter.
(* Goal: False *)
assert (BetS B L P) by (conclude axiom_betweennesssymmetry).
(* Goal: False *)
assert (CongA G H C H G Q) by (conclude lemma_equalanglessymmetric).
(* Goal: False *)
assert (nCol H G Q) by (conclude lemma_equalanglesNC).
(* Goal: False *)
assert (~ Col G H Q).
(* Goal: False *)
(* Goal: not (@Col Ax0 G H Q) *)
{
(* Goal: not (@Col Ax0 G H Q) *)
intro.
(* Goal: False *)
assert (Col H G Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (BetS Q G P) by (conclude axiom_betweennesssymmetry).
(* Goal: False *)
assert (OS B Q G H) by (conclude_def OS ).
(* Goal: False *)
assert (eq Q Q) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (neq Q G) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq G Q) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Out G Q Q) by (conclude lemma_ray4).
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists M, (BetS Q M H /\ Out G B M)) by (conclude lemma_crossbar2);destruct Tf as [M];spliter.
(* Goal: False *)
assert (Cong G S H S) by (forward_using lemma_congruenceflip).
(* Goal: False *)
assert (BetS Q S C) by (conclude axiom_betweennesssymmetry).
(* Goal: False *)
assert (Cong S Q C S) by (conclude lemma_congruencesymmetric).
(* Goal: False *)
assert (Cong S Q S C) by (forward_using lemma_congruenceflip).
(* Goal: False *)
assert (nCol G H C) by (forward_using lemma_NCorder).
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists K, (BetS G M K /\ BetS C H K)) by (conclude postulate_Euclid5);destruct Tf as [K];spliter.
(* Goal: False *)
assert (Col G B M) by (conclude lemma_rayimpliescollinear).
(* Goal: False *)
assert (Col G M K) by (conclude_def Col ).
(* Goal: False *)
assert (Col M G B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col M G K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq G M) by (conclude lemma_raystrict).
(* Goal: False *)
assert (neq M G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col G B K) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col B G A) by (conclude_def Col ).
(* Goal: False *)
assert (Col B G K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col G B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col G B K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B G) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq G B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B A K) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col H C K) by (conclude_def Col ).
(* Goal: False *)
assert (Col H C D) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq H C) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col C K D) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col C D K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
}
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (~ Col H G P).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* Goal: not (@Col Ax0 H G P) *)
{
(* Goal: not (@Col Ax0 H G P) *)
intro.
(* Goal: False *)
assert (Col G H P) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
}
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (~ Col H G A).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* Goal: not (@Col Ax0 H G A) *)
{
(* Goal: not (@Col Ax0 H G A) *)
intro.
(* Goal: False *)
assert (Col G H A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (nCol G H A) by (conclude_def TS ).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
}
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (~ ~ CongA H G A H G P).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* Goal: not (not (@CongA Ax0 H G A H G P)) *)
{
(* Goal: not (not (@CongA Ax0 H G A H G P)) *)
intro.
(* Goal: False *)
assert (LtA H G A H G P) by (conclude lemma_angletrichotomy2).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
}
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA H G P P G H) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA H G P G H D) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA G H D D H G) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA H G P D H G) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA H G A D H G) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (~ Col A G H).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* Goal: not (@Col Ax0 A G H) *)
{
(* Goal: not (@Col Ax0 A G H) *)
intro.
(* Goal: False *)
assert (Col G H A) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
}
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA A G H H G A) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA A G H D H G) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (nCol D H G) by (conclude lemma_equalanglesNC).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA D H G G H D) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA A G H G H D) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (BetS H G E) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA A G H E G B) by (conclude proposition_15a).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA E G B A G H) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA E G B G H D) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (eq H H) by (conclude cn_equalityreflexive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Out G H H) by (conclude lemma_ray4).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Supp A G H H B) by (conclude_def Supp ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (~ Col B G H).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
(* Goal: not (@Col Ax0 B G H) *)
{
(* Goal: not (@Col Ax0 B G H) *)
intro.
(* Goal: False *)
assert (Col A G B) by (conclude_def Col ).
(* Goal: False *)
assert (Col B G A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq G B) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq B G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col G H A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A G H) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
}
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA B G H B G H) by (conclude lemma_equalanglesreflexive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA G H D A G H) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA A G H H G A) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (CongA G H D H G A) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (Supp B G H H A) by (conclude lemma_supplementsymmetric).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
assert (RT B G H G H D) by (conclude_def RT ).
(* Goal: and (@CongA Ax0 A G H G H D) (and (@CongA Ax0 E G B G H D) (@RT Ax0 B G H G H D)) *)
close.
Qed.
End Euclid.
|
Set Automatic Coercions Import.
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Z_group_facts.
Section Zup1.
Variable R : RING.
Hint Resolve Z_to_group_nat_eq_pos: algebra.
Hint Resolve Z_to_group_nat_unit: algebra.
Hint Resolve Zl1: algebra.
Hint Resolve Zl2: algebra.
Lemma nat_to_group_mult :
forall n m : nat,
Equal (nat_to_group (ring_unit R) (n * m))
(ring_mult (nat_to_group (ring_unit R) n) (nat_to_group (ring_unit R) m)).
Proof.
(* Goal: forall n m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul n m)) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) *)
simple induction n; simpl in |- *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul n m)) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.add m (Init.Nat.mul n m))) (@ring_mult R (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n) (ring_unit R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) *)
(* Goal: forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) *)
auto with algebra.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul n m)) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.add m (Init.Nat.mul n m))) (@ring_mult R (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n) (ring_unit R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) *)
intros n0 H' m; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.add m (Init.Nat.mul n0 m))) (@ring_mult R (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n0) (ring_unit R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) *)
apply Trans with (sgroup_law R (nat_to_group (ring_unit R) m) (nat_to_group (ring_unit R) (n0 * m))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul n0 m))) (@ring_mult R (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n0) (ring_unit R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) *)
apply Trans with (sgroup_law R (ring_mult (nat_to_group (ring_unit R) n0) (nat_to_group (ring_unit R) m)) (ring_mult (ring_unit R) (nat_to_group (ring_unit R) m))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul n0 m))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n0) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) (@ring_mult R (ring_unit R) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m))) *)
apply Trans with (sgroup_law R (ring_mult (nat_to_group (ring_unit R) n0) (nat_to_group (ring_unit R) m)) (nat_to_group (ring_unit R) m)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul n0 m))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) n0) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) m)) *)
apply Trans with (sgroup_law R (nat_to_group (ring_unit R) m) (ring_mult (nat_to_group (ring_unit R) n0) (nat_to_group (ring_unit R) m))); auto with algebra.
Qed.
Hint Resolve nat_to_group_mult: algebra.
Hint Resolve Zl3: algebra.
Definition Z_to_ring : Hom (ZZ:RING) R.
Proof.
(* Goal: Carrier (@Hom RING (cring_ring (idomain_ring ZZ) : Ob RING) R) *)
apply (BUILD_HOM_RING (Ring1:=ZZ:RING) (Ring2:=R) (ff:=Z_to_group (ring_unit R))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (@ring_mult (cring_ring (idomain_ring ZZ)) x y)) (@ring_mult R (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) y)) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) y) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (@ring_mult (cring_ring (idomain_ring ZZ)) x y)) (@ring_mult R (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) y)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (@ring_mult (cring_ring (idomain_ring ZZ)) x y)) (@ring_mult R (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (@ring_mult (cring_ring (idomain_ring ZZ)) x y)) (@ring_mult R (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) y)) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: forall x y : Z, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_fun (abelian_group_group (ring_group R)) (ring_unit R) (@ring_mult Zr_aux x y)) (@ring_mult R (@Z_to_group_fun (abelian_group_group (ring_group R)) (ring_unit R) x) (@Z_to_group_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
intros x y; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_fun (abelian_group_group (ring_group R)) (ring_unit R) (@ring_mult Zr_aux x y)) (@ring_mult R (@Z_to_group_fun (abelian_group_group (ring_group R)) (ring_unit R) x) (@Z_to_group_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
apply Trans with (Z_to_group_nat_fun (ring_unit R) (ring_mult (x:ZZ) y)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (@ring_mult (cring_ring (idomain_ring ZZ)) x y)) (@ring_mult R (@Z_to_group_fun (abelian_group_group (ring_group R)) (ring_unit R) x) (@Z_to_group_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
apply Trans with (ring_mult (Z_to_group_nat_fun (ring_unit R) x) (Z_to_group_nat_fun (ring_unit R) y)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (@ring_mult (cring_ring (idomain_ring ZZ)) x y)) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) x) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
elim x; simpl in |- *; unfold ring_mult at 1 in |- *; simpl in |- *; intros.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul p y') | Zneg y' => Zneg (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
apply Trans with (ring_mult (monoid_unit R) (Z_to_group_nat_fun (ring_unit R) y)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul p y') | Zneg y' => Zneg (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0) (@ring_mult R (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
apply Trans with (monoid_unit R); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul p y') | Zneg y' => Zneg (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
elim y; simpl in |- *; intros.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0)) *)
apply Trans with (monoid_unit R); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0)) *)
apply Trans with (ring_mult (Z_to_group_nat_fun (ring_unit R) (Zpos p)) (monoid_unit R)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
apply Trans with (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) p (fun y : positive => y) p0))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos (Pos.mul p p0)) (ax3 (Pos.mul p p0))))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
rewrite (fun (x y : positive) (_ : positive -> positive) => nat_of_P_mult_morphism x y).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
apply Trans with (ring_mult (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 p)))) (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 p0))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
apply Trans with (group_inverse R (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) p (fun y : positive => y) p0)))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos (Pos.mul p p0)) (ax3 (Pos.mul p p0)))))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (Pos.mul p p0)))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
rewrite (fun (x y : positive) (_ : positive -> positive) => nat_of_P_mult_morphism x y).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
apply Trans with (ring_mult (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 p)))) (group_inverse R (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 p0)))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)))) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos p0) (ax3 p0)))))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)))) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p)) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p0)))) *)
apply Trans with (group_inverse R (ring_mult (nat_to_group (ring_unit R) (nat_of_P p)) (nat_to_group (ring_unit R) (nat_of_P p0)))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) match y with | Z0 => Z0 | Zpos y' => Zneg (Pos.mul p y') | Zneg y' => Zpos (Pos.mul p y') end) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) y)) *)
elim y; simpl in |- *; intros.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0)) *)
apply Trans with (monoid_unit R); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) Z0)) *)
apply Trans with (ring_mult (Z_to_group_nat_fun (ring_unit R) (Zneg p)) (monoid_unit R)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
apply Trans with (group_inverse R (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) p (fun y : positive => y) p0)))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos (Pos.mul p p0)) (ax3 (Pos.mul p p0)))))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (Pos.mul p p0)))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
rewrite (fun (x y : positive) (_ : positive -> positive) => nat_of_P_mult_morphism x y).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos p0))) *)
apply Trans with (ring_mult (group_inverse R (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 p))))) (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 p0))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)))) (@ring_mult R (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos p0) (ax3 p0))))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)))) (@ring_mult R (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p0))) *)
apply Trans with (group_inverse R (ring_mult (nat_to_group (ring_unit R) (nat_of_P p)) (nat_to_group (ring_unit R) (nat_of_P p0)))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zpos (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
apply Trans with (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) p (fun y : positive => y) p0))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos (Pos.mul p p0)) (ax3 (Pos.mul p p0))))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (Pos.mul p p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
rewrite (fun (x y : positive) (_ : positive -> positive) => nat_of_P_mult_morphism x y).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0))) (@ring_mult R (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p)) (@Z_to_group_nat_fun (abelian_group_group (ring_group R)) (ring_unit R) (Zneg p0))) *)
apply Trans with (ring_mult (group_inverse R (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 p))))) (group_inverse R (nat_to_group (ring_unit R) (nat_of_P (pos_abs (ax3 p0)))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0))) (@ring_mult R (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos p0) (ax3 p0)))))) *)
apply Trans with (ring_mult (nat_to_group (ring_unit R) (nat_of_P p)) (nat_to_group (ring_unit R) (nat_of_P p0))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p0))) (@ring_mult R (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat (@pos_abs (Zpos p0) (ax3 p0)))))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p0))) (@ring_mult R (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p))) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p0)))) *)
apply Trans with (group_inverse R (ring_mult (nat_to_group (ring_unit R) (nat_of_P p)) (group_inverse R (nat_to_group (ring_unit R) (nat_of_P p0))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p0))) (group_inverse (abelian_group_group (ring_group R)) (@ring_mult R (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p)) (group_inverse (abelian_group_group (ring_group R)) (@nat_to_group (abelian_group_group (ring_group R)) (ring_unit R) (Pos.to_nat p0))))) *)
apply Trans with (group_inverse R (group_inverse R (ring_mult (nat_to_group (ring_unit R) (nat_of_P p)) (nat_to_group (ring_unit R) (nat_of_P p0))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid (abelian_group_group (ring_group R))) (@Z_to_group (abelian_group_group (ring_group R)) (ring_unit R)))) (ring_unit (cring_ring (idomain_ring ZZ)))) (ring_unit R) *)
simpl in |- *; auto with algebra.
Qed.
End Zup1. |
Require Import Ensf.
Require Import Words.
Require Import more_words.
Require Import Rat.
Require Import need.
Require Import fonctions.
Require Import Relations.
Require Import gram.
Require Import gram2.
Require Import gram3.
Section gram4.
Variable X V1 R1 : Ensf.
Variable S1 : Elt.
Variable V2 R2 : Ensf.
Variable S2 : Elt.
Variable S : Elt.
Let C := Gunion_disj_p V1 R1 S1 V2 R2 S2 S.
Let Vu := fst C.
Let C' := snd C.
Let Ru := fst C'.
Let Su := snd C'.
Lemma inter_X_V1_u_V2 :
isGram X V1 R1 S1 -> isGram X V2 R2 S2 -> inter X (union V1 V2) empty.
Proof.
(* Goal: forall (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2), inter X (union V1 V2) empty *)
prolog [ isGram2 union_inter ] 5.
Qed.
Lemma inter_X_Vu_d :
isGram X V1 R1 S1 -> isGram X V2 R2 S2 -> ~ dans S X -> inter X Vu empty.
Proof.
(* Goal: forall (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : not (dans S X)), inter X Vu empty *)
intros G_1 G_2 N_dans_S_X.
(* Goal: inter X Vu empty *)
unfold inter in |- *.
(* Goal: and (inclus empty X) (and (inclus empty Vu) (forall (x : Elt) (_ : dans x X) (_ : dans x Vu), dans x empty)) *)
split.
(* Goal: and (inclus empty Vu) (forall (x : Elt) (_ : dans x X) (_ : dans x Vu), dans x empty) *)
(* Goal: inclus empty X *)
auto.
(* Goal: and (inclus empty Vu) (forall (x : Elt) (_ : dans x X) (_ : dans x Vu), dans x empty) *)
split.
(* Goal: forall (x : Elt) (_ : dans x X) (_ : dans x Vu), dans x empty *)
(* Goal: inclus empty Vu *)
auto.
(* Goal: forall (x : Elt) (_ : dans x X) (_ : dans x Vu), dans x empty *)
intros x dans_x_X dans_x_Vu.
(* Goal: dans x empty *)
absurd (dans x X).
(* Goal: dans x X *)
(* Goal: not (dans x X) *)
cut (S = x :>Elt \/ dans x (union V1 V2)).
(* Goal: dans x X *)
(* Goal: or (@eq Elt S x) (dans x (union V1 V2)) *)
(* Goal: forall _ : or (@eq Elt S x) (dans x (union V1 V2)), not (dans x X) *)
intro temp; elim temp; clear temp.
(* Goal: dans x X *)
(* Goal: or (@eq Elt S x) (dans x (union V1 V2)) *)
(* Goal: forall _ : dans x (union V1 V2), not (dans x X) *)
(* Goal: forall _ : @eq Elt S x, not (dans x X) *)
intros egal_S_x.
(* Goal: dans x X *)
(* Goal: or (@eq Elt S x) (dans x (union V1 V2)) *)
(* Goal: forall _ : dans x (union V1 V2), not (dans x X) *)
(* Goal: not (dans x X) *)
rewrite <- egal_S_x; assumption.
(* Goal: dans x X *)
(* Goal: or (@eq Elt S x) (dans x (union V1 V2)) *)
(* Goal: forall _ : dans x (union V1 V2), not (dans x X) *)
intro dans_x_V1_u_V2.
(* Goal: dans x X *)
(* Goal: or (@eq Elt S x) (dans x (union V1 V2)) *)
(* Goal: not (dans x X) *)
prolog [ inter_X_V1_u_V2 sym_inter inter_dans ] 4.
(* Goal: dans x X *)
(* Goal: or (@eq Elt S x) (dans x (union V1 V2)) *)
auto.
(* Goal: dans x X *)
assumption.
Qed.
Lemma Gunion_disj_Regles :
isGram X V1 R1 S1 -> isGram X V2 R2 S2 -> Regles X Vu Ru.
Proof.
(* Goal: forall (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2), Regles X Vu Ru *)
intros.
(* Goal: Regles X Vu Ru *)
unfold Vu, Ru in |- *; simpl in |- *.
(* Goal: Regles X (add S (union V1 V2)) (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
apply Regles_add.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: Regles X (add S (union V1 V2)) (add (couple S (word (cons S2 nil))) (union R1 R2)) *)
apply Regles_add.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S2 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: Regles X (add S (union V1 V2)) (union R1 R2) *)
apply Regles_add2.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S2 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: Regles X (union V1 V2) (union R1 R2) *)
change (Regles X (fst (Gunion V1 R1 V2 R2)) (snd (Gunion V1 R1 V2 R2))) in |- *.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S2 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: Regles X (@fst Ensf Ensf (Gunion V1 R1 V2 R2)) (@snd Ensf Ensf (Gunion V1 R1 V2 R2)) *)
prolog [ Gunion_Regles ] 2.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S2 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
auto.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S2 nil) *)
apply inmonoid_cons.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: dans S2 (union X (add S (union V1 V2))) *)
(* Goal: inmonoid (union X (add S (union V1 V2))) nil *)
trivial.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
(* Goal: dans S2 (union X (add S (union V1 V2))) *)
cut (dans S2 V2); [ auto | prolog [ isGram3 ] 2 ].
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
(* Goal: dans S (add S (union V1 V2)) *)
auto.
(* Goal: inmonoid (union X (add S (union V1 V2))) (cons S1 nil) *)
apply inmonoid_cons.
(* Goal: dans S1 (union X (add S (union V1 V2))) *)
(* Goal: inmonoid (union X (add S (union V1 V2))) nil *)
trivial.
(* Goal: dans S1 (union X (add S (union V1 V2))) *)
cut (dans S1 V1); [ auto | prolog [ isGram3 ] 2 ].
Qed.
Lemma inmon_Der_imp_Der_d :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
Regles X V1 R1 ->
Regles X V2 R2 ->
inter (union X V1) V2 empty ->
forall u v : Word, Derive Ru u v -> inmonoid (union X V1) u -> Derive R1 u v.
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : Regles X V1 R1) (_ : Regles X V2 R2) (_ : inter (union X V1) V2 empty) (u v : Word) (_ : Derive Ru u v) (_ : inmonoid (union X V1) u), Derive R1 u v *)
intros N_dans_X N_dans_V1 N_dans_V2 Re_1 Re_2 inter_X_V1_V2_empty u v Der_Ru_u.
(* Goal: forall _ : inmonoid (union X V1) u, Derive R1 u v *)
elim Der_Ru_u.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: forall (u v : Word) (A : Elt) (_ : dans (couple A (word u)) Ru) (_ : inmonoid (union X V1) (cons A v)), Derive R1 (cons A v) (Append u v) *)
intros u0 v0 A dans_couple_Ru inmon_cons_A_v0.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: Derive R1 (cons A v0) (Append u0 v0) *)
apply Derive1.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: dans (couple A (word u0)) R1 *)
cut (couple S (word (cons S1 nil)) = couple A (word u0) :>Elt \/ dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))), dans (couple A (word u0)) R1 *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: forall _ : @eq Elt (couple S (word (cons S1 nil))) (couple A (word u0)), dans (couple A (word u0)) R1 *)
intro egal_S.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: dans (couple A (word u0)) R1 *)
absurd (dans S X \/ dans S V1).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: or (dans S X) (dans S V1) *)
(* Goal: not (or (dans S X) (dans S V1)) *)
red in |- *.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: or (dans S X) (dans S V1) *)
(* Goal: forall _ : or (dans S X) (dans S V1), False *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: or (dans S X) (dans S V1) *)
(* Goal: forall _ : dans S V1, False *)
(* Goal: forall _ : dans S X, False *)
exact N_dans_X.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: or (dans S X) (dans S V1) *)
(* Goal: forall _ : dans S V1, False *)
exact N_dans_V1.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: or (dans S X) (dans S V1) *)
apply dans_union.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: dans S (union X V1) *)
replace S with A.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: @eq Elt A S *)
(* Goal: dans A (union X V1) *)
prolog [ inmonoid_cons_inv2 ] 2.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
(* Goal: @eq Elt A S *)
injection egal_S; auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R1 *)
intro dans_couple_add.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: dans (couple A (word u0)) R1 *)
cut (couple S (word (cons S2 nil)) = couple A (word u0) :>Elt \/ dans (couple A (word u0)) (union R1 R2)).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)), dans (couple A (word u0)) R1 *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
(* Goal: forall _ : @eq Elt (couple S (word (cons S2 nil))) (couple A (word u0)), dans (couple A (word u0)) R1 *)
intro egal_S.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
(* Goal: dans (couple A (word u0)) R1 *)
absurd (dans S X \/ dans S V1).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
(* Goal: or (dans S X) (dans S V1) *)
(* Goal: not (or (dans S X) (dans S V1)) *)
red in |- *.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
(* Goal: or (dans S X) (dans S V1) *)
(* Goal: forall _ : or (dans S X) (dans S V1), False *)
intro temp; elim temp; auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
(* Goal: or (dans S X) (dans S V1) *)
apply dans_union.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
(* Goal: dans S (union X V1) *)
replace S with A.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
(* Goal: @eq Elt A S *)
(* Goal: dans A (union X V1) *)
prolog [ inmonoid_cons_inv2 ] 2.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
(* Goal: @eq Elt A S *)
injection egal_S; auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R1 *)
intro dans_couple_union.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: dans (couple A (word u0)) R1 *)
cut (dans (couple A (word u0)) R1 \/ dans (couple A (word u0)) R2).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2), dans (couple A (word u0)) R1 *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R1 *)
(* Goal: forall _ : dans (couple A (word u0)) R1, dans (couple A (word u0)) R1 *)
auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R1 *)
intro dans_R2.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: dans (couple A (word u0)) R1 *)
absurd (inter (union X V1) V2 empty).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: inter (union X V1) V2 empty *)
(* Goal: not (inter (union X V1) V2 empty) *)
red in |- *.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: inter (union X V1) V2 empty *)
(* Goal: forall _ : inter (union X V1) V2 empty, False *)
unfold inter in |- *.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: inter (union X V1) V2 empty *)
(* Goal: forall _ : and (inclus empty (union X V1)) (and (inclus empty V2) (forall (x : Elt) (_ : dans x (union X V1)) (_ : dans x V2), dans x empty)), False *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: inter (union X V1) V2 empty *)
(* Goal: forall (_ : inclus empty (union X V1)) (_ : and (inclus empty V2) (forall (x : Elt) (_ : dans x (union X V1)) (_ : dans x V2), dans x empty)), False *)
intros HH temp; elim temp; clear temp; intros HHH HHHH.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: inter (union X V1) V2 empty *)
(* Goal: False *)
prolog [ Regles_inv1 inmonoid_cons_inv2 dans_empty_imp_P ] 4.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: inter (union X V1) V2 empty *)
assumption.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) u, Derive R1 u v) (_ : inmonoid (union X V1) (cons x u)), Derive R1 (cons x u) (cons x v) *)
prolog [ inmonoid_cons_inv Derive2 ] 10.
Qed.
Lemma inmon_Der_imp_inmon_R1_d :
forall u v : Word,
Regles X V1 R1 ->
Derive R1 u v -> inmonoid (union X V1) u -> inmonoid (union X V1) v.
Proof.
(* Goal: forall (u v : Word) (_ : Regles X V1 R1) (_ : Derive R1 u v) (_ : inmonoid (union X V1) u), inmonoid (union X V1) v *)
prolog [ in_mon_X_Der_imp_inmon_X ] 7.
Qed.
Lemma inmon_Der_imp_inmon_d :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
forall u v : Word,
isGram X V1 R1 S1 ->
isGram X V2 R2 S2 ->
inter V1 V2 empty ->
inmonoid (union X V1) u -> Derive Ru u v -> inmonoid (union X V1) v.
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (u v : Word) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty) (_ : inmonoid (union X V1) u) (_ : Derive Ru u v), inmonoid (union X V1) v *)
prolog [ isGram2 isGram4 inter_union inmon_Der_imp_Der_d inmon_Der_imp_inmon_R1_d ] 15.
Qed.
Lemma Gunion_disj_Derivestar :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
isGram X V1 R1 S1 ->
isGram X V2 R2 S2 ->
inter V1 V2 empty ->
forall u v : Word,
Derivestar Ru u v -> inmonoid (union X V1) u -> Derivestar R1 u v.
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty) (u v : Word) (_ : Derivestar Ru u v) (_ : inmonoid (union X V1) u), Derivestar R1 u v *)
unfold Derivestar in |- *.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty) (u v : Word) (_ : Rstar Word (Derive Ru) u v) (_ : inmonoid (union X V1) u), Rstar Word (Derive R1) u v *)
intros N_dans_X N_dans_V1 N_dans_V2 G_1 G_2 inter_V1_V2_empty u v Derivestar_Ru.
(* Goal: forall _ : inmonoid (union X V1) u, Rstar Word (Derive R1) u v *)
pattern u, v in |- *.
(* Goal: (fun w w0 : Word => forall _ : inmonoid (union X V1) w, Rstar Word (Derive R1) w w0) u v *)
apply Derivestar_Ru.
(* Goal: forall (u v w : Word) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) v, Rstar Word (Derive R1) v w) (_ : inmonoid (union X V1) u), Rstar Word (Derive R1) u w *)
(* Goal: forall (u : Word) (_ : inmonoid (union X V1) u), Rstar Word (Derive R1) u u *)
auto.
(* Goal: forall (u v w : Word) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V1) v, Rstar Word (Derive R1) v w) (_ : inmonoid (union X V1) u), Rstar Word (Derive R1) u w *)
intros u0 v0 w Der_Ru inmon_v0_imp_Rstar_R1_v0 inmon_u0.
(* Goal: Rstar Word (Derive R1) u0 w *)
apply Rstar_R with v0; prolog [ isGram2 inter_union isGram4 inmon_Der_imp_Der_d inmon_Der_imp_inmon_d ] 4.
Qed.
Lemma inmon_Der_imp_Der_d2 :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
Regles X V1 R1 ->
Regles X V2 R2 ->
inter (union X V2) V1 empty ->
forall u v : Word, Derive Ru u v -> inmonoid (union X V2) u -> Derive R2 u v.
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : Regles X V1 R1) (_ : Regles X V2 R2) (_ : inter (union X V2) V1 empty) (u v : Word) (_ : Derive Ru u v) (_ : inmonoid (union X V2) u), Derive R2 u v *)
intros N_dans_X N_dans_V1 N_dans_V2 Re_1 Re_2 inter_X_V2_V1_empty u v Der_Ru_u.
(* Goal: forall _ : inmonoid (union X V2) u, Derive R2 u v *)
elim Der_Ru_u.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: forall (u v : Word) (A : Elt) (_ : dans (couple A (word u)) Ru) (_ : inmonoid (union X V2) (cons A v)), Derive R2 (cons A v) (Append u v) *)
intros u0 v0 A dans_couple_Ru inmon_cons_A_v0.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: Derive R2 (cons A v0) (Append u0 v0) *)
apply Derive1.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: dans (couple A (word u0)) R2 *)
cut (couple S (word (cons S1 nil)) = couple A (word u0) :>Elt \/ dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))), dans (couple A (word u0)) R2 *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
(* Goal: forall _ : @eq Elt (couple S (word (cons S1 nil))) (couple A (word u0)), dans (couple A (word u0)) R2 *)
intro egal_S.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
(* Goal: dans (couple A (word u0)) R2 *)
absurd (dans S X \/ dans S V2).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
(* Goal: or (dans S X) (dans S V2) *)
(* Goal: not (or (dans S X) (dans S V2)) *)
red in |- *.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
(* Goal: or (dans S X) (dans S V2) *)
(* Goal: forall _ : or (dans S X) (dans S V2), False *)
intuition.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
(* Goal: or (dans S X) (dans S V2) *)
apply dans_union.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
(* Goal: dans S (union X V2) *)
replace S with A.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
(* Goal: @eq Elt A S *)
(* Goal: dans A (union X V2) *)
prolog [ inmonoid_cons_inv2 ] 2.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
(* Goal: @eq Elt A S *)
injection egal_S; auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2)), dans (couple A (word u0)) R2 *)
intro dans_couple_add.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: dans (couple A (word u0)) R2 *)
cut (couple S (word (cons S2 nil)) = couple A (word u0) :>Elt \/ dans (couple A (word u0)) (union R1 R2)).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)), dans (couple A (word u0)) R2 *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
(* Goal: forall _ : @eq Elt (couple S (word (cons S2 nil))) (couple A (word u0)), dans (couple A (word u0)) R2 *)
intro egal_S.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
(* Goal: dans (couple A (word u0)) R2 *)
absurd (dans S X \/ dans S V2).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
(* Goal: or (dans S X) (dans S V2) *)
(* Goal: not (or (dans S X) (dans S V2)) *)
red in |- *.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
(* Goal: or (dans S X) (dans S V2) *)
(* Goal: forall _ : or (dans S X) (dans S V2), False *)
intuition.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
(* Goal: or (dans S X) (dans S V2) *)
apply dans_union.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
(* Goal: dans S (union X V2) *)
replace S with A.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
(* Goal: @eq Elt A S *)
(* Goal: dans A (union X V2) *)
prolog [ inmonoid_cons_inv2 ] 2.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
(* Goal: @eq Elt A S *)
injection egal_S; auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple A (word u0)) (union R1 R2), dans (couple A (word u0)) R2 *)
intro dans_couple_union.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: dans (couple A (word u0)) R2 *)
cut (dans (couple A (word u0)) R1 \/ dans (couple A (word u0)) R2).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2), dans (couple A (word u0)) R2 *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: forall _ : dans (couple A (word u0)) R1, dans (couple A (word u0)) R2 *)
intro dans_R1.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: dans (couple A (word u0)) R2 *)
absurd (inter (union X V2) V1 empty).
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: inter (union X V2) V1 empty *)
(* Goal: not (inter (union X V2) V1 empty) *)
red in |- *.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: inter (union X V2) V1 empty *)
(* Goal: forall _ : inter (union X V2) V1 empty, False *)
unfold inter in |- *.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: inter (union X V2) V1 empty *)
(* Goal: forall _ : and (inclus empty (union X V2)) (and (inclus empty V1) (forall (x : Elt) (_ : dans x (union X V2)) (_ : dans x V1), dans x empty)), False *)
intro temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: inter (union X V2) V1 empty *)
(* Goal: forall (_ : inclus empty (union X V2)) (_ : and (inclus empty V1) (forall (x : Elt) (_ : dans x (union X V2)) (_ : dans x V1), dans x empty)), False *)
intros inc_empt temp; elim temp; clear temp.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: inter (union X V2) V1 empty *)
(* Goal: forall (_ : inclus empty V1) (_ : forall (x : Elt) (_ : dans x (union X V2)) (_ : dans x V1), dans x empty), False *)
intros incl_empty_V1 imp_dans_empty.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: inter (union X V2) V1 empty *)
(* Goal: False *)
apply dans_empty_imp_P with A.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: inter (union X V2) V1 empty *)
(* Goal: dans A empty *)
apply imp_dans_empty; prolog [ Regles_inv1 inmonoid_cons_inv2 ] 4.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
(* Goal: inter (union X V2) V1 empty *)
assumption.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
(* Goal: forall _ : dans (couple A (word u0)) R2, dans (couple A (word u0)) R2 *)
trivial.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
(* Goal: or (dans (couple A (word u0)) R1) (dans (couple A (word u0)) R2) *)
auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple A (word u0))) (dans (couple A (word u0)) (union R1 R2)) *)
auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple A (word u0))) (dans (couple A (word u0)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
auto.
(* Goal: forall (u v : Word) (x : Elt) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) u, Derive R2 u v) (_ : inmonoid (union X V2) (cons x u)), Derive R2 (cons x u) (cons x v) *)
prolog [ inmonoid_cons_inv Derive2 ] 10.
Qed.
Lemma inmon_Der_imp_inmon_R2_d :
forall u v : Word,
Regles X V2 R2 ->
Derive R2 u v -> inmonoid (union X V2) u -> inmonoid (union X V2) v.
Proof.
(* Goal: forall (u v : Word) (_ : Regles X V2 R2) (_ : Derive R2 u v) (_ : inmonoid (union X V2) u), inmonoid (union X V2) v *)
prolog [ in_mon_X_Der_imp_inmon_X ] 10.
Qed.
Lemma inmon_Der_imp_inmon_d2 :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
forall u v : Word,
isGram X V1 R1 S1 ->
isGram X V2 R2 S2 ->
inter V1 V2 empty ->
inmonoid (union X V2) u -> Derive Ru u v -> inmonoid (union X V2) v.
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (u v : Word) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty) (_ : inmonoid (union X V2) u) (_ : Derive Ru u v), inmonoid (union X V2) v *)
prolog [ sym_inter isGram2 inter_union isGram4 inmon_Der_imp_Der_d2 inmon_Der_imp_inmon_R2_d ] 15.
Qed.
Lemma Gunion_disj_Derivestar2 :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
isGram X V1 R1 S1 ->
isGram X V2 R2 S2 ->
inter V1 V2 empty ->
forall u v : Word,
Derivestar Ru u v -> inmonoid (union X V2) u -> Derivestar R2 u v.
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty) (u v : Word) (_ : Derivestar Ru u v) (_ : inmonoid (union X V2) u), Derivestar R2 u v *)
unfold Derivestar in |- *.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty) (u v : Word) (_ : Rstar Word (Derive Ru) u v) (_ : inmonoid (union X V2) u), Rstar Word (Derive R2) u v *)
intros N_dans_X N_dans_V1 N_dans_V2 G_1 G_2 inter_V1_V2_empty u v Derivestar_Ru.
(* Goal: forall _ : inmonoid (union X V2) u, Rstar Word (Derive R2) u v *)
pattern u, v in |- *.
(* Goal: (fun w w0 : Word => forall _ : inmonoid (union X V2) w, Rstar Word (Derive R2) w w0) u v *)
apply Derivestar_Ru.
(* Goal: forall (u v w : Word) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) v, Rstar Word (Derive R2) v w) (_ : inmonoid (union X V2) u), Rstar Word (Derive R2) u w *)
(* Goal: forall (u : Word) (_ : inmonoid (union X V2) u), Rstar Word (Derive R2) u u *)
auto.
(* Goal: forall (u v w : Word) (_ : Derive Ru u v) (_ : forall _ : inmonoid (union X V2) v, Rstar Word (Derive R2) v w) (_ : inmonoid (union X V2) u), Rstar Word (Derive R2) u w *)
intros u0 v0 w Der_Ru inmon_v0_imp_Rstar_R2_v0 inmon_u0.
(* Goal: Rstar Word (Derive R2) u0 w *)
apply Rstar_R with v0.
(* Goal: Rstar Word (Derive R2) v0 w *)
(* Goal: Derive R2 u0 v0 *)
prolog [ sym_inter isGram2 inter_union isGram4 inmon_Der_imp_Der_d2 ] 4.
(* Goal: Rstar Word (Derive R2) v0 w *)
prolog [ inmon_Der_imp_inmon_d2 ] 3.
Qed.
Lemma Gunion_disj_Derive1 :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
isGram X V1 R1 S1 ->
isGram X V2 R2 S2 ->
forall u : Word,
Derive Ru (cons S nil) u -> cons S1 nil = u :>Word \/ cons S2 nil = u :>Word.
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (u : Word) (_ : Derive Ru (cons S nil) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
intros N_dans_X N_dans_V1 N_dans_V2 G_1 G_2 u Derive_Ru.
(* Goal: or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
cut (Derive_inv Ru (cons S nil) u).
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall _ : Derive_inv Ru (cons S nil) u, or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
unfold Derive_inv in |- *.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall _ : or (@ex2 Word (fun u : Word => dans (couple S (word u)) Ru) (fun u0 : Word => @ex2 Word (fun v : Word => @eq Word (cons S v) (cons S nil)) (fun v : Word => @eq Word (Append u0 v) u))) (@ex2 Word (fun v : Word => Derive Ru nil v) (fun v : Word => @eq Word (cons S v) u)), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
simpl in |- *.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall _ : or (@ex2 Word (fun u : Word => dans (couple S (word u)) Ru) (fun u0 : Word => @ex2 Word (fun v : Word => @eq Word (cons S v) (cons S nil)) (fun v : Word => @eq Word (Append u0 v) u))) (@ex2 Word (fun v : Word => Derive Ru nil v) (fun v : Word => @eq Word (cons S v) u)), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
intro temp; elim temp; clear temp; intro temp; elim temp; clear temp.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: forall (x : Word) (_ : dans (couple S (word x)) Ru) (_ : @ex2 Word (fun v : Word => @eq Word (cons S v) (cons S nil)) (fun v : Word => @eq Word (Append x v) u)), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
intros x dans_S_x_Ru temp.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
elim temp; clear temp.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: forall (x0 : Word) (_ : @eq Word (cons S x0) (cons S nil)) (_ : @eq Word (Append x x0) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
intros x0 egal_S_x0_S_nil egal_Append_x_x0_u.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
replace u with x.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
cut (couple S (word (cons S1 nil)) = couple S (word x) :>Elt \/ dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))).
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intro temp; elim temp; clear temp.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2)), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: forall _ : @eq Elt (couple S (word (cons S1 nil))) (couple S (word x)), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intro egal_S.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2)), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
injection egal_S; auto.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: forall _ : dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2)), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intro dans_couple_add.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
cut (couple S (word (cons S2 nil)) = couple S (word x) :>Elt \/ dans (couple S (word x)) (union R1 R2)).
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: forall _ : or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intro temp; elim temp; clear temp.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple S (word x)) (union R1 R2), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: forall _ : @eq Elt (couple S (word (cons S2 nil))) (couple S (word x)), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intro egal_S.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple S (word x)) (union R1 R2), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
injection egal_S; auto.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: forall _ : dans (couple S (word x)) (union R1 R2), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intro dans_couple_union.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
cut (dans (couple S (word x)) R1 \/ dans (couple S (word x)) R2).
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: forall _ : or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2), or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intro temp; elim temp; clear temp.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: forall _ : dans (couple S (word x)) R2, or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: forall _ : dans (couple S (word x)) R1, or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intro dans_R1.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: forall _ : dans (couple S (word x)) R2, or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
absurd (dans S V1).
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: forall _ : dans (couple S (word x)) R2, or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: dans S V1 *)
(* Goal: not (dans S V1) *)
assumption.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: forall _ : dans (couple S (word x)) R2, or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: dans S V1 *)
prolog [ isGram4 Regles_inv1 ] 3.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: forall _ : dans (couple S (word x)) R2, or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
intros dans_R2.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
absurd (dans S V2).
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: dans S V2 *)
(* Goal: not (dans S V2) *)
assumption.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
(* Goal: dans S V2 *)
prolog [ isGram4 Regles_inv1 ] 3.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
(* Goal: or (dans (couple S (word x)) R1) (dans (couple S (word x)) R2) *)
auto.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
(* Goal: or (@eq Elt (couple S (word (cons S2 nil))) (couple S (word x))) (dans (couple S (word x)) (union R1 R2)) *)
auto.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
(* Goal: or (@eq Elt (couple S (word (cons S1 nil))) (couple S (word x))) (dans (couple S (word x)) (add (couple S (word (cons S2 nil))) (union R1 R2))) *)
auto.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word x u *)
replace x with (Append x nil).
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word (Append x nil) x *)
(* Goal: @eq Word (Append x nil) u *)
replace nil with x0.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word (Append x nil) x *)
(* Goal: @eq Word x0 nil *)
(* Goal: @eq Word (Append x x0) u *)
assumption.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word (Append x nil) x *)
(* Goal: @eq Word x0 nil *)
apply cons_cons_inv2 with S S; assumption.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
(* Goal: @eq Word (Append x nil) x *)
apply Append_w_nil.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: forall (x : Word) (_ : Derive Ru nil x) (_ : @eq Word (cons S x) u), or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
intros.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
cut (Derive_inv Ru nil x).
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: Derive_inv Ru nil x *)
(* Goal: forall _ : Derive_inv Ru nil x, or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
unfold Derive_inv in |- *.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: Derive_inv Ru nil x *)
(* Goal: forall _ : False, or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
simpl in |- *.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: Derive_inv Ru nil x *)
(* Goal: forall _ : False, or (@eq Word (cons S1 nil) u) (@eq Word (cons S2 nil) u) *)
tauto.
(* Goal: Derive_inv Ru (cons S nil) u *)
(* Goal: Derive_inv Ru nil x *)
auto.
(* Goal: Derive_inv Ru (cons S nil) u *)
auto.
Qed.
Hint Resolve Gunion_disj_Derive1.
Lemma Gunion_disj_Derivestar_S :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
isGram X V1 R1 S1 ->
isGram X V2 R2 S2 ->
inter V1 V2 empty ->
forall u : Word,
Derivestar Ru (cons S nil) u ->
cons S nil = u :>Word \/
Derivestar R1 (cons S1 nil) u \/ Derivestar R2 (cons S2 nil) u.
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty) (u : Word) (_ : Derivestar Ru (cons S nil) u), or (@eq Word (cons S nil) u) (or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u)) *)
intros N_dans_X N_dans_V1 N_dans_V2 G_1 G_2 inter_V1_V2_empty u Derivestar_Ru.
(* Goal: or (@eq Word (cons S nil) u) (or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u)) *)
cut (cons S nil = u :>Word \/ (exists2 w : Word, Derive Ru (cons S nil) w & Derivestar Ru w u)).
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: forall _ : or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)), or (@eq Word (cons S nil) u) (or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u)) *)
intro temp; elim temp; clear temp.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: forall _ : @ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u), or (@eq Word (cons S nil) u) (or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u)) *)
(* Goal: forall _ : @eq Word (cons S nil) u, or (@eq Word (cons S nil) u) (or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u)) *)
auto.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: forall _ : @ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u), or (@eq Word (cons S nil) u) (or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u)) *)
intro temp; elim temp; clear temp.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: forall (x : Word) (_ : Derive Ru (cons S nil) x) (_ : Derivestar Ru x u), or (@eq Word (cons S nil) u) (or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u)) *)
intros x Der_Ru_cons_S_nil_x Derivestar_Ru_x_u.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S nil) u) (or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u)) *)
right.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u) *)
cut (cons S1 nil = x :>Word \/ cons S2 nil = x :>Word).
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: forall _ : or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x), or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 (cons S2 nil) u) *)
intro temp; elim temp; clear temp; intro x_egal; rewrite x_egal.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 x u) *)
(* Goal: or (Derivestar R1 x u) (Derivestar R2 (cons S2 nil) u) *)
apply or_introl.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 x u) *)
(* Goal: Derivestar R1 x u *)
apply Gunion_disj_Derivestar; [ auto | auto | auto | auto | auto | auto | auto | idtac ].
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 x u) *)
(* Goal: inmonoid (union X V1) x *)
rewrite <- x_egal; cut (dans S1 V1).
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 x u) *)
(* Goal: dans S1 V1 *)
(* Goal: forall _ : dans S1 V1, inmonoid (union X V1) (cons S1 nil) *)
auto.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 x u) *)
(* Goal: dans S1 V1 *)
prolog [ isGram3 ] 2.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: or (Derivestar R1 (cons S1 nil) u) (Derivestar R2 x u) *)
apply or_intror.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: Derivestar R2 x u *)
apply Gunion_disj_Derivestar2; [ auto | auto | auto | auto | auto | auto | auto | idtac ].
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: inmonoid (union X V2) x *)
rewrite <- x_egal; cut (dans S2 V2).
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: dans S2 V2 *)
(* Goal: forall _ : dans S2 V2, inmonoid (union X V2) (cons S2 nil) *)
auto.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
(* Goal: dans S2 V2 *)
prolog [ isGram3 ] 2.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
(* Goal: or (@eq Word (cons S1 nil) x) (@eq Word (cons S2 nil) x) *)
auto.
(* Goal: or (@eq Word (cons S nil) u) (@ex2 Word (fun w : Word => Derive Ru (cons S nil) w) (fun w : Word => Derivestar Ru w u)) *)
auto.
Qed.
Hint Resolve Gunion_disj_Derivestar_S.
Lemma Gunion_disj_LG_inclus1 :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
isGram X V1 R1 S1 ->
isGram X V2 R2 S2 ->
inter V1 V2 empty ->
l_inclus (LG X Vu Ru S) (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)).
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty), l_inclus (LG X Vu Ru S) (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
intros N_dans_X N_dans_V1 N_dans_V2 G_1 G_2 inter_V1_V2_empty.
(* Goal: l_inclus (LG X Vu Ru S) (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
red in |- *.
(* Goal: forall (w : Word) (_ : LG X Vu Ru S w), lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w *)
unfold LG in |- *.
(* Goal: forall (w : Word) (_ : and (Derivestar Ru (cons S nil) w) (inmonoid X w)), lunion (fun w0 : Word => and (Derivestar R1 (cons S1 nil) w0) (inmonoid X w0)) (fun w0 : Word => and (Derivestar R2 (cons S2 nil) w0) (inmonoid X w0)) w *)
intros w temp; elim temp; clear temp; intros Der_Ru inmonoid_X_w.
(* Goal: lunion (fun w : Word => and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (fun w : Word => and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) w *)
unfold lunion in |- *.
(* Goal: or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
elimtype (cons S nil = w :>Word \/ Derivestar R1 (cons S1 nil) w \/ Derivestar R2 (cons S2 nil) w).
(* Goal: or (@eq Word (cons S nil) w) (or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w)) *)
(* Goal: forall _ : or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w), or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
(* Goal: forall _ : @eq Word (cons S nil) w, or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
intro eg_cons_S_nil_w.
(* Goal: or (@eq Word (cons S nil) w) (or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w)) *)
(* Goal: forall _ : or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w), or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
(* Goal: or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
absurd (dans S X).
(* Goal: or (@eq Word (cons S nil) w) (or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w)) *)
(* Goal: forall _ : or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w), or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
(* Goal: dans S X *)
(* Goal: not (dans S X) *)
assumption.
(* Goal: or (@eq Word (cons S nil) w) (or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w)) *)
(* Goal: forall _ : or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w), or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
(* Goal: dans S X *)
apply inmonoid_cons_inv2 with nil.
(* Goal: or (@eq Word (cons S nil) w) (or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w)) *)
(* Goal: forall _ : or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w), or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
(* Goal: inmonoid X (cons S nil) *)
rewrite eg_cons_S_nil_w; assumption.
(* Goal: or (@eq Word (cons S nil) w) (or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w)) *)
(* Goal: forall _ : or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w), or (and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)) (and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)) *)
intro temp; elim temp; clear temp; auto.
(* Goal: or (@eq Word (cons S nil) w) (or (Derivestar R1 (cons S1 nil) w) (Derivestar R2 (cons S2 nil) w)) *)
auto.
Qed.
Lemma Gunion_disj_LG_inclus2 : l_inclus (LG X V1 R1 S1) (LG X Vu Ru S).
Proof.
(* Goal: l_inclus (LG X V1 R1 S1) (LG X Vu Ru S) *)
red in |- *.
(* Goal: forall (w : Word) (_ : LG X V1 R1 S1 w), LG X Vu Ru S w *)
unfold LG in |- *.
(* Goal: forall (w : Word) (_ : and (Derivestar R1 (cons S1 nil) w) (inmonoid X w)), and (Derivestar Ru (cons S nil) w) (inmonoid X w) *)
intros w temp; elim temp; clear temp.
(* Goal: forall (_ : Derivestar R1 (cons S1 nil) w) (_ : inmonoid X w), and (Derivestar Ru (cons S nil) w) (inmonoid X w) *)
intros Der_Ru inmonoid_X_w.
(* Goal: and (Derivestar Ru (cons S nil) w) (inmonoid X w) *)
unfold Ru in |- *; simpl in |- *.
(* Goal: and (Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S nil) w) (inmonoid X w) *)
split.
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S nil) w *)
apply Derivestar_R with (cons S1 nil).
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S1 nil) w *)
(* Goal: Derive (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S nil) (cons S1 nil) *)
replace (cons S1 nil) with (Append (cons S1 nil) nil).
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S1 nil) w *)
(* Goal: @eq Word (Append (cons S1 nil) nil) (cons S1 nil) *)
(* Goal: Derive (add (couple S (word (Append (cons S1 nil) nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S nil) (Append (cons S1 nil) nil) *)
auto.
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S1 nil) w *)
(* Goal: @eq Word (Append (cons S1 nil) nil) (cons S1 nil) *)
auto.
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S1 nil) w *)
apply Derivestar_inclus with R1; auto.
(* Goal: inmonoid X w *)
assumption.
Qed.
Lemma Gunion_disj_LG_inclus3 : l_inclus (LG X V2 R2 S2) (LG X Vu Ru S).
Proof.
(* Goal: l_inclus (LG X V2 R2 S2) (LG X Vu Ru S) *)
red in |- *.
(* Goal: forall (w : Word) (_ : LG X V2 R2 S2 w), LG X Vu Ru S w *)
unfold LG in |- *.
(* Goal: forall (w : Word) (_ : and (Derivestar R2 (cons S2 nil) w) (inmonoid X w)), and (Derivestar Ru (cons S nil) w) (inmonoid X w) *)
intros w temp; elim temp; clear temp.
(* Goal: forall (_ : Derivestar R2 (cons S2 nil) w) (_ : inmonoid X w), and (Derivestar Ru (cons S nil) w) (inmonoid X w) *)
intros Der_Ru inmonoid_X_w.
(* Goal: and (Derivestar Ru (cons S nil) w) (inmonoid X w) *)
unfold Ru in |- *; simpl in |- *.
(* Goal: and (Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S nil) w) (inmonoid X w) *)
split.
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S nil) w *)
apply Derivestar_R with (cons S2 nil).
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S2 nil) w *)
(* Goal: Derive (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S nil) (cons S2 nil) *)
replace (cons S2 nil) with (Append (cons S2 nil) nil).
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S2 nil) w *)
(* Goal: @eq Word (Append (cons S2 nil) nil) (cons S2 nil) *)
(* Goal: Derive (add (couple S (word (cons S1 nil))) (add (couple S (word (Append (cons S2 nil) nil))) (union R1 R2))) (cons S nil) (Append (cons S2 nil) nil) *)
auto.
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S2 nil) w *)
(* Goal: @eq Word (Append (cons S2 nil) nil) (cons S2 nil) *)
auto.
(* Goal: inmonoid X w *)
(* Goal: Derivestar (add (couple S (word (cons S1 nil))) (add (couple S (word (cons S2 nil))) (union R1 R2))) (cons S2 nil) w *)
apply Derivestar_inclus with R2; auto.
(* Goal: inmonoid X w *)
assumption.
Qed.
Lemma Gunion_disj_LG_inclus4 :
l_inclus (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) (LG X Vu Ru S).
Proof.
(* Goal: l_inclus (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) (LG X Vu Ru S) *)
unfold l_inclus, lunion in |- *.
(* Goal: forall (w : Word) (_ : or (LG X V1 R1 S1 w) (LG X V2 R2 S2 w)), LG X Vu Ru S w *)
intros w temp; elim temp; clear temp; intro LG_w.
(* Goal: LG X Vu Ru S w *)
(* Goal: LG X Vu Ru S w *)
apply Gunion_disj_LG_inclus2; assumption.
(* Goal: LG X Vu Ru S w *)
apply Gunion_disj_LG_inclus3; assumption.
Qed.
Lemma Gunion_disj_LG :
~ dans S X ->
~ dans S V1 ->
~ dans S V2 ->
isGram X V1 R1 S1 ->
isGram X V2 R2 S2 ->
inter V1 V2 empty ->
l_egal (LG X Vu Ru S) (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)).
Proof.
(* Goal: forall (_ : not (dans S X)) (_ : not (dans S V1)) (_ : not (dans S V2)) (_ : isGram X V1 R1 S1) (_ : isGram X V2 R2 S2) (_ : inter V1 V2 empty), l_egal (LG X Vu Ru S) (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
intros.
(* Goal: l_egal (LG X Vu Ru S) (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
unfold l_egal in |- *; split.
(* Goal: l_inclus (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) (LG X Vu Ru S) *)
(* Goal: l_inclus (LG X Vu Ru S) (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
apply Gunion_disj_LG_inclus1; assumption.
(* Goal: l_inclus (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) (LG X Vu Ru S) *)
exact Gunion_disj_LG_inclus4.
Qed.
End gram4.
|
Require Import Ensf.
Require Import Words.
Require Import more_words.
Require Import Rat.
Require Import need.
Require Import fonctions.
Require Import Relations.
Require Import gram.
Require Import gram2.
Require Import gram3.
Require Import gram4.
Section gram5.
Variable X : Ensf.
Variable V1 R1 : Ensf.
Variable S1 : Elt.
Variable V2 R2 : Ensf.
Variable S2 : Elt.
Let S' := zero.
Let G1 := imageGram (injproducg V1) X V1 R1 S1.
Let G2 := imageGram (injproducd V2) X V2 R2 S2.
Let X1' := fst G1.
Let GG1 := snd G1.
Let V1' := fst GG1.
Let GGG1 := snd GG1.
Let R1' := fst GGG1.
Let S1' := snd GGG1.
Let X2' := fst G2.
Let GG2 := snd G2.
Let V2' := fst GG2.
Let GGG2 := snd GG2.
Let R2' := fst GGG2.
Let S2' := snd GGG2.
Let Gim := Gunion_disj_p V1' R1' S1' V2' R2' S2' S'.
Let Vu := fst Gim.
Let C' := snd Gim.
Let Ru := fst C'.
Let Su := snd C'.
Hypothesis Grammaire1 : isGram X V1 R1 S1.
Hypothesis Grammaire2 : isGram X V2 R2 S2.
Hint Resolve Grammaire1.
Hint Resolve Grammaire2.
Lemma Mots_X : Mots X.
Proof.
(* Goal: Mots X *)
apply isGram1 with V1 R1 S1.
(* Goal: isGram X V1 R1 S1 *)
auto.
Qed.
Hint Resolve Mots_X.
Lemma int_X_V1_empty : inter X V1 empty.
Proof.
(* Goal: inter X V1 empty *)
apply isGram2 with R1 S1.
(* Goal: isGram X V1 R1 S1 *)
auto.
Qed.
Hint Resolve int_X_V1_empty.
Lemma int_X_V2_empty : inter X V2 empty.
Proof.
(* Goal: inter X V2 empty *)
apply isGram2 with R2 S2.
(* Goal: isGram X V2 R2 S2 *)
auto.
Qed.
Hint Resolve int_X_V2_empty.
Definition Gunion_disj := Gim.
Let Vim := fst Gunion_disj.
Let GGim := snd Gunion_disj.
Let Rim := fst GGim.
Let Sim := snd GGim.
Lemma Id_injproducg1 : forall x : Elt, dans x X -> injproducg V1 x = x :>Elt.
Proof.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (injproducg V1 x) x *)
unfold Id, injproducg in |- *.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (extension V1 injgauche x) x *)
simpl in |- *.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (extension V1 injgauche x) x *)
intros x dans_x_X.
(* Goal: @eq Elt (extension V1 injgauche x) x *)
apply extension_out.
(* Goal: not (dans x V1) *)
apply inter_dans with X; auto.
Qed.
Hint Resolve Id_injproducg1.
Lemma Id_injproducd2 : forall x : Elt, dans x X -> injproducd V2 x = x :>Elt.
Proof.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (injproducd V2 x) x *)
unfold Id, injproducd in |- *.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (extension V2 injdroite x) x *)
simpl in |- *.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (extension V2 injdroite x) x *)
intros x dans_x_X.
(* Goal: @eq Elt (extension V2 injdroite x) x *)
apply extension_out.
(* Goal: not (dans x V2) *)
apply inter_dans with X; auto.
Qed.
Hint Resolve Id_injproducd2.
Lemma N_dans_S_X : ~ dans S' X.
Proof.
(* Goal: not (dans S' X) *)
red in |- *.
(* Goal: forall _ : dans S' X, False *)
intro dans_S_X.
(* Goal: False *)
elimtype (exists w : Word, word w = S').
(* Goal: @ex Word (fun w : Word => @eq Elt (word w) S') *)
(* Goal: forall (x : Word) (_ : @eq Elt (word x) S'), False *)
intro x.
(* Goal: @ex Word (fun w : Word => @eq Elt (word w) S') *)
(* Goal: forall _ : @eq Elt (word x) S', False *)
change (word x <> natural 0) in |- *.
(* Goal: @ex Word (fun w : Word => @eq Elt (word w) S') *)
(* Goal: not (@eq Elt (word x) (natural O)) *)
discriminate.
(* Goal: @ex Word (fun w : Word => @eq Elt (word w) S') *)
apply Mots_X; assumption.
Qed.
Hint Resolve N_dans_S_X.
Lemma injproducg_V1 :
forall x : Elt, dans x V1 -> injproducg V1 x = injgauche x.
Proof.
(* Goal: forall (x : Elt) (_ : dans x V1), @eq Elt (injproducg V1 x) (injgauche x) *)
intros x dans_x_V1.
(* Goal: @eq Elt (injproducg V1 x) (injgauche x) *)
unfold injproducg, extension in |- *.
(* Goal: @eq Elt (let (y, _) := extension_spec V1 injgauche x in y) (injgauche x) *)
elim (extension_spec V1 injgauche x).
(* Goal: forall (x0 : Elt) (_ : or (and (dans x V1) (@eq Elt x0 (injgauche x))) (and (not (dans x V1)) (@eq Elt x0 x))), @eq Elt x0 (injgauche x) *)
intros x0 temp; elim temp; clear temp; intro temp; elim temp; clear temp.
(* Goal: forall (_ : not (dans x V1)) (_ : @eq Elt x0 x), @eq Elt x0 (injgauche x) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt x0 (injgauche x)), @eq Elt x0 (injgauche x) *)
auto.
(* Goal: forall (_ : not (dans x V1)) (_ : @eq Elt x0 x), @eq Elt x0 (injgauche x) *)
intros.
(* Goal: @eq Elt x0 (injgauche x) *)
absurd (dans x V1); assumption.
Qed.
Hint Resolve injproducg_V1.
Lemma map_injproducg_V1 : map (injproducg V1) V1 = map injgauche V1 :>Ensf.
Proof.
(* Goal: @eq Ensf (map (injproducg V1) V1) (map injgauche V1) *)
apply map_egal.
(* Goal: forall (x : Elt) (_ : dans x V1), @eq Elt (injproducg V1 x) (injgauche x) *)
auto.
Qed.
Hint Resolve map_injproducg_V1.
Lemma injproducd_V2 :
forall x : Elt, dans x V2 -> injproducd V2 x = injdroite x.
Proof.
(* Goal: forall (x : Elt) (_ : dans x V2), @eq Elt (injproducd V2 x) (injdroite x) *)
intros x dans_x_V2.
(* Goal: @eq Elt (injproducd V2 x) (injdroite x) *)
unfold injproducd, extension in |- *.
(* Goal: @eq Elt (let (y, _) := extension_spec V2 injdroite x in y) (injdroite x) *)
elim (extension_spec V2 injdroite x).
(* Goal: forall (x0 : Elt) (_ : or (and (dans x V2) (@eq Elt x0 (injdroite x))) (and (not (dans x V2)) (@eq Elt x0 x))), @eq Elt x0 (injdroite x) *)
intros x0 temp; elim temp; clear temp; intro temp; elim temp; clear temp.
(* Goal: forall (_ : not (dans x V2)) (_ : @eq Elt x0 x), @eq Elt x0 (injdroite x) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt x0 (injdroite x)), @eq Elt x0 (injdroite x) *)
auto.
(* Goal: forall (_ : not (dans x V2)) (_ : @eq Elt x0 x), @eq Elt x0 (injdroite x) *)
intros.
(* Goal: @eq Elt x0 (injdroite x) *)
absurd (dans x V2); assumption.
Qed.
Hint Resolve injproducd_V2.
Lemma map_injproducd_V2 : map (injproducd V2) V2 = map injdroite V2 :>Ensf.
Proof.
(* Goal: @eq Ensf (map (injproducd V2) V2) (map injdroite V2) *)
apply map_egal.
(* Goal: forall (x : Elt) (_ : dans x V2), @eq Elt (injproducd V2 x) (injdroite x) *)
auto.
Qed.
Hint Resolve map_injproducd_V2.
Lemma N_dans_S_V1' : ~ dans S' V1'.
Proof.
(* Goal: not (dans S' V1') *)
red in |- *.
(* Goal: forall _ : dans S' V1', False *)
replace V1' with (map injgauche V1).
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: forall _ : dans S' (map injgauche V1), False *)
intros.
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: False *)
elimtype (exists y : Elt, dans y V1 /\ S' = (fun e : Elt => couple e zero) y).
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt S' (couple y zero))) *)
(* Goal: forall (x : Elt) (_ : and (dans x V1) (@eq Elt S' (couple x zero))), False *)
intros x temp; elim temp; clear temp.
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt S' (couple y zero))) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt S' (couple x zero)), False *)
intros dans_x_V1 S_egal.
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt S' (couple y zero))) *)
(* Goal: False *)
absurd (S' = couple x zero).
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt S' (couple y zero))) *)
(* Goal: @eq Elt S' (couple x zero) *)
(* Goal: not (@eq Elt S' (couple x zero)) *)
unfold S', zero in |- *.
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt S' (couple y zero))) *)
(* Goal: @eq Elt S' (couple x zero) *)
(* Goal: not (@eq Elt (natural O) (couple x (natural O))) *)
discriminate.
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt S' (couple y zero))) *)
(* Goal: @eq Elt S' (couple x zero) *)
auto.
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt S' (couple y zero))) *)
apply (dans_map (fun e : Elt => couple e zero)).
(* Goal: @eq Ensf (map injgauche V1) V1' *)
(* Goal: dans S' (map (fun e : Elt => couple e zero) V1) *)
assumption.
(* Goal: @eq Ensf (map injgauche V1) V1' *)
unfold V1' in |- *.
(* Goal: @eq Ensf (map injgauche V1) (@fst Ensf (prod Ensf Elt) GG1) *)
simpl in |- *.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
auto.
Qed.
Hint Resolve N_dans_S_V1'.
Lemma N_dans_S_V2' : ~ dans S' V2'.
Proof.
(* Goal: not (dans S' V2') *)
red in |- *.
(* Goal: forall _ : dans S' V2', False *)
replace V2' with (map injdroite V2).
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: forall _ : dans S' (map injdroite V2), False *)
unfold injdroite in |- *.
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: forall _ : dans S' (map (fun e : Elt => couple e un) V2), False *)
intros.
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: False *)
elimtype (exists y : Elt, dans y V2 /\ S' = (fun e : Elt => couple e un) y).
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt S' (couple y un))) *)
(* Goal: forall (x : Elt) (_ : and (dans x V2) (@eq Elt S' (couple x un))), False *)
intros x temp; elim temp; clear temp.
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt S' (couple y un))) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt S' (couple x un)), False *)
intros dans_x_V2 S_egal.
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt S' (couple y un))) *)
(* Goal: False *)
absurd (S' = couple x un).
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt S' (couple y un))) *)
(* Goal: @eq Elt S' (couple x un) *)
(* Goal: not (@eq Elt S' (couple x un)) *)
unfold S', zero in |- *.
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt S' (couple y un))) *)
(* Goal: @eq Elt S' (couple x un) *)
(* Goal: not (@eq Elt (natural O) (couple x un)) *)
discriminate.
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt S' (couple y un))) *)
(* Goal: @eq Elt S' (couple x un) *)
auto.
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt S' (couple y un))) *)
apply (dans_map (fun e : Elt => couple e un)).
(* Goal: @eq Ensf (map injdroite V2) V2' *)
(* Goal: dans S' (map (fun e : Elt => couple e un) V2) *)
assumption.
(* Goal: @eq Ensf (map injdroite V2) V2' *)
unfold V2' in |- *.
(* Goal: @eq Ensf (map injdroite V2) (@fst Ensf (prod Ensf Elt) GG2) *)
simpl in |- *.
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
auto.
Qed.
Hint Resolve N_dans_S_V2'.
Lemma is_mono_u_X_V1_injproducg_V1 : is_mono (union X V1) (injproducg V1).
Proof.
(* Goal: is_mono (union X V1) (injproducg V1) *)
unfold is_mono in |- *.
(* Goal: forall (x y : Elt) (_ : dans x (union X V1)) (_ : dans y (union X V1)) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
intros x y dans_x_u dans_y_u.
(* Goal: forall _ : @eq Elt (injproducg V1 x) (injproducg V1 y), @eq Elt x y *)
elimtype (dans x X \/ dans x V1).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: forall (_ : dans x X) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
intro dans_x.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: forall _ : @eq Elt (injproducg V1 x) (injproducg V1 y), @eq Elt x y *)
replace (injproducg V1 x) with x.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: forall _ : @eq Elt x (injproducg V1 y), @eq Elt x y *)
elimtype (dans y X \/ dans y V1).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt x (injproducg V1 y)), @eq Elt x y *)
(* Goal: forall (_ : dans y X) (_ : @eq Elt x (injproducg V1 y)), @eq Elt x y *)
intros dans_y.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt x (injproducg V1 y)), @eq Elt x y *)
(* Goal: forall _ : @eq Elt x (injproducg V1 y), @eq Elt x y *)
replace (injproducg V1 y) with y.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt x (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
(* Goal: forall _ : @eq Elt x y, @eq Elt x y *)
auto.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt x (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt x (injproducg V1 y)), @eq Elt x y *)
intros dans_y.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall _ : @eq Elt x (injproducg V1 y), @eq Elt x y *)
replace (injproducg V1 y) with (injgauche y).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: forall _ : @eq Elt x (injgauche y), @eq Elt x y *)
unfold injgauche in |- *.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: forall _ : @eq Elt x (couple y zero), @eq Elt x y *)
elim (Mots_X x dans_x).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: forall (x0 : Word) (_ : @eq Elt (word x0) x) (_ : @eq Elt x (couple y zero)), @eq Elt x y *)
intros x0 egal_x egal2_x.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: @eq Elt x y *)
absurd (word x0 = couple y zero).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: @eq Elt (word x0) (couple y zero) *)
(* Goal: not (@eq Elt (word x0) (couple y zero)) *)
discriminate.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: @eq Elt (word x0) (couple y zero) *)
rewrite egal_x; assumption.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
auto.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducg V1 x) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall (_ : dans x V1) (_ : @eq Elt (injproducg V1 x) (injproducg V1 y)), @eq Elt x y *)
intro dans_x.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: forall _ : @eq Elt (injproducg V1 x) (injproducg V1 y), @eq Elt x y *)
replace (injproducg V1 x) with (injgauche x).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: forall _ : @eq Elt (injgauche x) (injproducg V1 y), @eq Elt x y *)
elimtype (dans y X \/ dans y V1).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: forall (_ : dans y X) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
intros dans_y.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: forall _ : @eq Elt (injgauche x) (injproducg V1 y), @eq Elt x y *)
replace (injproducg V1 y) with y.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
(* Goal: forall _ : @eq Elt (injgauche x) y, @eq Elt x y *)
unfold injgauche in |- *.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
(* Goal: forall _ : @eq Elt (couple x zero) y, @eq Elt x y *)
elim (Mots_X y dans_y).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
(* Goal: forall (x0 : Word) (_ : @eq Elt (word x0) y) (_ : @eq Elt (couple x zero) y), @eq Elt x y *)
intros x0 egal_y egal2_y.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
(* Goal: @eq Elt x y *)
absurd (word x0 = couple x zero).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
(* Goal: @eq Elt (word x0) (couple x zero) *)
(* Goal: not (@eq Elt (word x0) (couple x zero)) *)
discriminate.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
(* Goal: @eq Elt (word x0) (couple x zero) *)
rewrite egal2_y; assumption.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducg V1 y) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall (_ : dans y V1) (_ : @eq Elt (injgauche x) (injproducg V1 y)), @eq Elt x y *)
intro.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: forall _ : @eq Elt (injgauche x) (injproducg V1 y), @eq Elt x y *)
replace (injproducg V1 y) with (injgauche y).
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: forall _ : @eq Elt (injgauche x) (injgauche y), @eq Elt x y *)
unfold injgauche in |- *.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: forall _ : @eq Elt (couple x zero) (couple y zero), @eq Elt x y *)
intros.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
(* Goal: @eq Elt x y *)
apply couple_couple_inv1 with zero zero; assumption.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
(* Goal: @eq Elt (injgauche y) (injproducg V1 y) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
(* Goal: or (dans y X) (dans y V1) *)
auto.
(* Goal: or (dans x X) (dans x V1) *)
(* Goal: @eq Elt (injgauche x) (injproducg V1 x) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V1) *)
auto.
Qed.
Hint Resolve is_mono_u_X_V1_injproducg_V1.
Lemma is_mono_u_X_V2_injproducd_V2 : is_mono (union X V2) (injproducd V2).
Proof.
(* Goal: is_mono (union X V2) (injproducd V2) *)
unfold is_mono in |- *.
(* Goal: forall (x y : Elt) (_ : dans x (union X V2)) (_ : dans y (union X V2)) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
intros x y dans_x_u dans_y_u.
(* Goal: forall _ : @eq Elt (injproducd V2 x) (injproducd V2 y), @eq Elt x y *)
elimtype (dans x X \/ dans x V2).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: forall (_ : dans x X) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
intro dans_x.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: forall _ : @eq Elt (injproducd V2 x) (injproducd V2 y), @eq Elt x y *)
replace (injproducd V2 x) with x.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: forall _ : @eq Elt x (injproducd V2 y), @eq Elt x y *)
elimtype (dans y X \/ dans y V2).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt x (injproducd V2 y)), @eq Elt x y *)
(* Goal: forall (_ : dans y X) (_ : @eq Elt x (injproducd V2 y)), @eq Elt x y *)
intros dans_y.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt x (injproducd V2 y)), @eq Elt x y *)
(* Goal: forall _ : @eq Elt x (injproducd V2 y), @eq Elt x y *)
replace (injproducd V2 y) with y.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt x (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
(* Goal: forall _ : @eq Elt x y, @eq Elt x y *)
auto.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt x (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt x (injproducd V2 y)), @eq Elt x y *)
intros dans_y.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall _ : @eq Elt x (injproducd V2 y), @eq Elt x y *)
replace (injproducd V2 y) with (injdroite y).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: forall _ : @eq Elt x (injdroite y), @eq Elt x y *)
unfold injdroite in |- *.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: forall _ : @eq Elt x (couple y un), @eq Elt x y *)
elim (Mots_X x dans_x).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: forall (x0 : Word) (_ : @eq Elt (word x0) x) (_ : @eq Elt x (couple y un)), @eq Elt x y *)
intros x0 egal_x egal2_x.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: @eq Elt x y *)
absurd (word x0 = couple y un).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: @eq Elt (word x0) (couple y un) *)
(* Goal: not (@eq Elt (word x0) (couple y un)) *)
discriminate.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: @eq Elt (word x0) (couple y un) *)
rewrite egal_x; assumption.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
auto.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt x (injproducd V2 x) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall (_ : dans x V2) (_ : @eq Elt (injproducd V2 x) (injproducd V2 y)), @eq Elt x y *)
intro dans_x.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: forall _ : @eq Elt (injproducd V2 x) (injproducd V2 y), @eq Elt x y *)
replace (injproducd V2 x) with (injdroite x).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: forall _ : @eq Elt (injdroite x) (injproducd V2 y), @eq Elt x y *)
elimtype (dans y X \/ dans y V2).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: forall (_ : dans y X) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
intros dans_y.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: forall _ : @eq Elt (injdroite x) (injproducd V2 y), @eq Elt x y *)
replace (injproducd V2 y) with y.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
(* Goal: forall _ : @eq Elt (injdroite x) y, @eq Elt x y *)
unfold injdroite in |- *.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
(* Goal: forall _ : @eq Elt (couple x un) y, @eq Elt x y *)
elim (Mots_X y dans_y).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
(* Goal: forall (x0 : Word) (_ : @eq Elt (word x0) y) (_ : @eq Elt (couple x un) y), @eq Elt x y *)
intros x0 egal_y egal2_y.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
(* Goal: @eq Elt x y *)
absurd (word x0 = couple x un).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
(* Goal: @eq Elt (word x0) (couple x un) *)
(* Goal: not (@eq Elt (word x0) (couple x un)) *)
discriminate.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
(* Goal: @eq Elt (word x0) (couple x un) *)
rewrite egal2_y; assumption.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
(* Goal: @eq Elt y (injproducd V2 y) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall (_ : dans y V2) (_ : @eq Elt (injdroite x) (injproducd V2 y)), @eq Elt x y *)
intro.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: forall _ : @eq Elt (injdroite x) (injproducd V2 y), @eq Elt x y *)
replace (injproducd V2 y) with (injdroite y).
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: forall _ : @eq Elt (injdroite x) (injdroite y), @eq Elt x y *)
unfold injdroite in |- *.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: forall _ : @eq Elt (couple x un) (couple y un), @eq Elt x y *)
intros.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
(* Goal: @eq Elt x y *)
apply couple_couple_inv1 with un un; assumption.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
(* Goal: @eq Elt (injdroite y) (injproducd V2 y) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
(* Goal: or (dans y X) (dans y V2) *)
auto.
(* Goal: or (dans x X) (dans x V2) *)
(* Goal: @eq Elt (injdroite x) (injproducd V2 x) *)
apply sym_equal; auto.
(* Goal: or (dans x X) (dans x V2) *)
auto.
Qed.
Hint Resolve is_mono_u_X_V2_injproducd_V2.
Lemma egal_LG_1_1' : l_egal (LG X V1 R1 S1) (LG X V1' R1' S1').
Proof.
(* Goal: l_egal (LG X V1 R1 S1) (LG X V1' R1' S1') *)
pattern X at 2 in |- *.
(* Goal: (fun e : Ensf => l_egal (LG X V1 R1 S1) (LG e V1' R1' S1')) X *)
replace X with X1'.
(* Goal: @eq Ensf X1' X *)
(* Goal: l_egal (LG X V1 R1 S1) (LG X1' V1' R1' S1') *)
unfold X1', V1', R1', S1', GGG1, GG1, G1 in |- *.
(* Goal: @eq Ensf X1' X *)
(* Goal: l_egal (LG X V1 R1 S1) (LG (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1))) (@fst Ensf Elt (@snd Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)))) (@snd Ensf Elt (@snd Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1))))) *)
apply egal_LG.
(* Goal: @eq Ensf X1' X *)
(* Goal: Id X (injproducg V1) *)
(* Goal: is_mono (union X V1) (injproducg V1) *)
(* Goal: isGram X V1 R1 S1 *)
auto.
(* Goal: @eq Ensf X1' X *)
(* Goal: Id X (injproducg V1) *)
(* Goal: is_mono (union X V1) (injproducg V1) *)
auto.
(* Goal: @eq Ensf X1' X *)
(* Goal: Id X (injproducg V1) *)
red in |- *; auto.
(* Goal: @eq Ensf X1' X *)
unfold X1' in |- *; simpl in |- *.
(* Goal: @eq Ensf (map (injproducg V1) X) X *)
apply map_Id.
(* Goal: Id X (injproducg V1) *)
red in |- *.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (injproducg V1 x) x *)
auto.
Qed.
Hint Resolve egal_LG_1_1'.
Lemma egal_LG_2_2' : l_egal (LG X V2 R2 S2) (LG X V2' R2' S2').
Proof.
(* Goal: l_egal (LG X V2 R2 S2) (LG X V2' R2' S2') *)
pattern X at 2 in |- *.
(* Goal: (fun e : Ensf => l_egal (LG X V2 R2 S2) (LG e V2' R2' S2')) X *)
replace X with X2'.
(* Goal: @eq Ensf X2' X *)
(* Goal: l_egal (LG X V2 R2 S2) (LG X2' V2' R2' S2') *)
unfold X2', V2', R2', S2', GGG2, GG2, G2 in |- *.
(* Goal: @eq Ensf X2' X *)
(* Goal: l_egal (LG X V2 R2 S2) (LG (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2))) (@fst Ensf Elt (@snd Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)))) (@snd Ensf Elt (@snd Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2))))) *)
apply egal_LG.
(* Goal: @eq Ensf X2' X *)
(* Goal: Id X (injproducd V2) *)
(* Goal: is_mono (union X V2) (injproducd V2) *)
(* Goal: isGram X V2 R2 S2 *)
auto.
(* Goal: @eq Ensf X2' X *)
(* Goal: Id X (injproducd V2) *)
(* Goal: is_mono (union X V2) (injproducd V2) *)
auto.
(* Goal: @eq Ensf X2' X *)
(* Goal: Id X (injproducd V2) *)
red in |- *; auto.
(* Goal: @eq Ensf X2' X *)
unfold X2' in |- *; simpl in |- *.
(* Goal: @eq Ensf (map (injproducd V2) X) X *)
apply map_Id.
(* Goal: Id X (injproducd V2) *)
red in |- *.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (injproducd V2 x) x *)
auto.
Qed.
Hint Resolve egal_LG_2_2'.
Lemma egal_X_X1' : X1' = X :>Ensf.
Proof.
(* Goal: @eq Ensf X1' X *)
unfold X1' in |- *.
(* Goal: @eq Ensf (@fst Ensf (prod Ensf (prod Ensf Elt)) G1) X *)
simpl in |- *.
(* Goal: @eq Ensf (map (injproducg V1) X) X *)
apply map_Id.
(* Goal: Id X (injproducg V1) *)
red in |- *.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (injproducg V1 x) x *)
auto.
Qed.
Lemma egal_X_X2' : X2' = X :>Ensf.
Proof.
(* Goal: @eq Ensf X2' X *)
unfold X2' in |- *.
(* Goal: @eq Ensf (@fst Ensf (prod Ensf (prod Ensf Elt)) G2) X *)
simpl in |- *.
(* Goal: @eq Ensf (map (injproducd V2) X) X *)
apply map_Id.
(* Goal: Id X (injproducd V2) *)
red in |- *.
(* Goal: forall (x : Elt) (_ : dans x X), @eq Elt (injproducd V2 x) x *)
auto.
Qed.
Lemma Grammaire1' : isGram X V1' R1' S1'.
Proof.
(* Goal: isGram X V1' R1' S1' *)
rewrite <- egal_X_X1'.
(* Goal: isGram X1' V1' R1' S1' *)
unfold X1', V1', R1', S1', GGG1, GG1, G1 in |- *.
(* Goal: isGram (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1))) (@fst Ensf Elt (@snd Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)))) (@snd Ensf Elt (@snd Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)))) *)
apply image_isGram.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1))) empty *)
(* Goal: Mots (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) *)
(* Goal: isGram X V1 R1 S1 *)
auto.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1))) empty *)
(* Goal: Mots (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) *)
change (Mots X1') in |- *.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1))) empty *)
(* Goal: Mots X1' *)
rewrite egal_X_X1'.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1))) empty *)
(* Goal: Mots X *)
auto.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducg V1) X V1 R1 S1))) empty *)
apply inter_Xim_Vim_empty; auto.
Qed.
Hint Resolve Grammaire1'.
Lemma Grammaire2' : isGram X V2' R2' S2'.
Proof.
(* Goal: isGram X V2' R2' S2' *)
rewrite <- egal_X_X2'.
(* Goal: isGram X2' V2' R2' S2' *)
unfold X2', V2', R2', S2', GGG2, GG2, G2 in |- *.
(* Goal: isGram (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2))) (@fst Ensf Elt (@snd Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)))) (@snd Ensf Elt (@snd Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)))) *)
apply image_isGram.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2))) empty *)
(* Goal: Mots (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) *)
(* Goal: isGram X V2 R2 S2 *)
auto.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2))) empty *)
(* Goal: Mots (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) *)
change (Mots X2') in |- *.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2))) empty *)
(* Goal: Mots X2' *)
rewrite egal_X_X2'.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2))) empty *)
(* Goal: Mots X *)
auto.
(* Goal: inter (@fst Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2)) (@fst Ensf (prod Ensf Elt) (@snd Ensf (prod Ensf (prod Ensf Elt)) (imageGram (injproducd V2) X V2 R2 S2))) empty *)
apply inter_Xim_Vim_empty; auto.
Qed.
Hint Resolve Grammaire2'.
Lemma inter_V1'_V2'_empty : inter V1' V2' empty.
Proof.
(* Goal: inter V1' V2' empty *)
unfold V1', V2' in |- *; simpl in |- *.
(* Goal: inter (map (injproducg V1) V1) (map (injproducd V2) V2) empty *)
unfold inter in |- *.
(* Goal: and (inclus empty (map (injproducg V1) V1)) (and (inclus empty (map (injproducd V2) V2)) (forall (x : Elt) (_ : dans x (map (injproducg V1) V1)) (_ : dans x (map (injproducd V2) V2)), dans x empty)) *)
split; [ auto | split ].
(* Goal: forall (x : Elt) (_ : dans x (map (injproducg V1) V1)) (_ : dans x (map (injproducd V2) V2)), dans x empty *)
(* Goal: inclus empty (map (injproducd V2) V2) *)
auto.
(* Goal: forall (x : Elt) (_ : dans x (map (injproducg V1) V1)) (_ : dans x (map (injproducd V2) V2)), dans x empty *)
replace (map (injproducg V1) V1) with (map injgauche V1).
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: forall (x : Elt) (_ : dans x (map injgauche V1)) (_ : dans x (map (injproducd V2) V2)), dans x empty *)
replace (map (injproducd V2) V2) with (map injdroite V2).
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: forall (x : Elt) (_ : dans x (map injgauche V1)) (_ : dans x (map injdroite V2)), dans x empty *)
intros x dans_map_1 dans_map_2.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: dans x empty *)
elimtype (exists y : Elt, dans y V1 /\ x = injgauche y).
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: forall (x0 : Elt) (_ : and (dans x0 V1) (@eq Elt x (injgauche x0))), dans x empty *)
elimtype (exists y : Elt, dans y V2 /\ x = injdroite y).
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: forall (x0 : Elt) (_ : and (dans x0 V2) (@eq Elt x (injdroite x0))) (x1 : Elt) (_ : and (dans x1 V1) (@eq Elt x (injgauche x1))), dans x empty *)
intros x2 temp; elim temp; clear temp; intros dans_x2_V2 egal_x2.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: forall (x0 : Elt) (_ : and (dans x0 V1) (@eq Elt x (injgauche x0))), dans x empty *)
intros x1 temp; elim temp; clear temp; intros dans_x1_V1 egal_x1.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: dans x empty *)
absurd (zero = un).
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
(* Goal: not (@eq Elt zero un) *)
unfold zero, un in |- *.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
(* Goal: not (@eq Elt (natural O) (natural (S O))) *)
red in |- *.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
(* Goal: forall _ : @eq Elt (natural O) (natural (S O)), False *)
intro.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
(* Goal: False *)
cut (0 = 1 :>nat).
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
(* Goal: @eq nat O (S O) *)
(* Goal: forall _ : @eq nat O (S O), False *)
change (0 <> 1 :>nat) in |- *.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
(* Goal: @eq nat O (S O) *)
(* Goal: not (@eq nat O (S O)) *)
auto.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
(* Goal: @eq nat O (S O) *)
change (natural_inv (natural 0) = natural_inv (natural 1) :>nat) in |- *.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
(* Goal: @eq nat (natural_inv (natural O)) (natural_inv (natural (S O))) *)
apply (f_equal natural_inv); assumption.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt zero un *)
apply couple_couple_inv2 with x1 x2.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt (couple x1 zero) (couple x2 un) *)
replace (couple x1 zero) with x.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
(* Goal: @eq Elt x (couple x2 un) *)
auto.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V2) (@eq Elt x (injdroite y))) *)
apply dans_map; assumption.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
(* Goal: @ex Elt (fun y : Elt => and (dans y V1) (@eq Elt x (injgauche y))) *)
apply dans_map; assumption.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
(* Goal: @eq Ensf (map injdroite V2) (map (injproducd V2) V2) *)
auto.
(* Goal: @eq Ensf (map injgauche V1) (map (injproducg V1) V1) *)
auto.
Qed.
Hint Resolve inter_V1'_V2'_empty.
Lemma egal_LG_u_1'_2' :
l_egal (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')).
Proof.
(* Goal: l_egal (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) *)
unfold Ru, Vu, C', Gim in |- *.
(* Goal: l_egal (LG X (@fst Ensf (prod Ensf Elt) (Gunion_disj_p V1' R1' S1' V2' R2' S2' S')) (@fst Ensf Elt (@snd Ensf (prod Ensf Elt) (Gunion_disj_p V1' R1' S1' V2' R2' S2' S'))) S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) *)
apply Gunion_disj_LG.
(* Goal: inter V1' V2' empty *)
(* Goal: isGram X V2' R2' S2' *)
(* Goal: isGram X V1' R1' S1' *)
(* Goal: not (dans S' V2') *)
(* Goal: not (dans S' V1') *)
(* Goal: not (dans S' X) *)
auto.
(* Goal: inter V1' V2' empty *)
(* Goal: isGram X V2' R2' S2' *)
(* Goal: isGram X V1' R1' S1' *)
(* Goal: not (dans S' V2') *)
(* Goal: not (dans S' V1') *)
auto.
(* Goal: inter V1' V2' empty *)
(* Goal: isGram X V2' R2' S2' *)
(* Goal: isGram X V1' R1' S1' *)
(* Goal: not (dans S' V2') *)
auto.
(* Goal: inter V1' V2' empty *)
(* Goal: isGram X V2' R2' S2' *)
(* Goal: isGram X V1' R1' S1' *)
auto.
(* Goal: inter V1' V2' empty *)
(* Goal: isGram X V2' R2' S2' *)
auto.
(* Goal: inter V1' V2' empty *)
auto.
Qed.
Hint Resolve egal_LG_u_1'_2'.
Theorem union_is_LCF :
l_egal (LG X Vu Ru S') (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)).
Proof.
(* Goal: l_egal (LG X Vu Ru S') (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
elimtype (l_egal (LG X V1 R1 S1) (LG X V1' R1' S1')).
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: forall (_ : l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (_ : l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)), l_egal (LG X Vu Ru S') (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
elimtype (l_egal (LG X V2 R2 S2) (LG X V2' R2' S2')).
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: forall (_ : l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (_ : l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) (_ : l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (_ : l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)), l_egal (LG X Vu Ru S') (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
elimtype (l_egal (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))).
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (_ : l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (_ : l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) (_ : l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (_ : l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) (_ : l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (_ : l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)), l_egal (LG X Vu Ru S') (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
intros incl_i_u_1'_2' incl_u_1'_2'_u_i incl_2_2' incl_2'_2 incl_1_1' incl_1'_1.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: l_egal (LG X Vu Ru S') (lunion (LG X V1 R1 S1) (LG X V2 R2 S2)) *)
unfold l_egal in |- *; split; unfold l_inclus in |- *.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
(* Goal: forall (w : Word) (_ : LG X Vu Ru S' w), lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w *)
intros w LG_Ru_w.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
(* Goal: lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w *)
elimtype (lunion (LG X V1' R1' S1') (LG X V2' R2' S2') w); unfold lunion in |- *.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
(* Goal: forall _ : LG X V2' R2' S2' w, or (LG X V1 R1 S1 w) (LG X V2 R2 S2 w) *)
(* Goal: forall _ : LG X V1' R1' S1' w, or (LG X V1 R1 S1 w) (LG X V2 R2 S2 w) *)
intro Hyp; apply or_introl.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
(* Goal: forall _ : LG X V2' R2' S2' w, or (LG X V1 R1 S1 w) (LG X V2 R2 S2 w) *)
(* Goal: LG X V1 R1 S1 w *)
apply incl_1'_1; assumption.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
(* Goal: forall _ : LG X V2' R2' S2' w, or (LG X V1 R1 S1 w) (LG X V2 R2 S2 w) *)
intro Hyp; apply or_intror.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
(* Goal: LG X V2 R2 S2 w *)
apply incl_2'_2; assumption.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
change (lunion (LG X V1' R1' S1') (LG X V2' R2' S2') w) in |- *.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
(* Goal: lunion (LG X V1' R1' S1') (LG X V2' R2' S2') w *)
apply incl_i_u_1'_2'; assumption.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: forall (w : Word) (_ : lunion (LG X V1 R1 S1) (LG X V2 R2 S2) w), LG X Vu Ru S' w *)
intros w lunion_LG_1_2_w.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: LG X Vu Ru S' w *)
apply incl_u_1'_2'_u_i.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: lunion (LG X V1' R1' S1') (LG X V2' R2' S2') w *)
unfold lunion in |- *.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
elim lunion_LG_1_2_w; intro LG_w.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
apply or_introl; apply incl_1_1'; assumption.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
(* Goal: or (LG X V1' R1' S1' w) (LG X V2' R2' S2' w) *)
apply or_intror; apply incl_2_2'; assumption.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: and (l_inclus (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) (l_inclus (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) (LG X Vu Ru S')) *)
change (l_egal (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2'))) in |- *.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
(* Goal: l_egal (LG X Vu Ru S') (lunion (LG X V1' R1' S1') (LG X V2' R2' S2')) *)
auto.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: and (l_inclus (LG X V2 R2 S2) (LG X V2' R2' S2')) (l_inclus (LG X V2' R2' S2') (LG X V2 R2 S2)) *)
change (l_egal (LG X V2 R2 S2) (LG X V2' R2' S2')) in |- *.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
(* Goal: l_egal (LG X V2 R2 S2) (LG X V2' R2' S2') *)
auto.
(* Goal: and (l_inclus (LG X V1 R1 S1) (LG X V1' R1' S1')) (l_inclus (LG X V1' R1' S1') (LG X V1 R1 S1)) *)
change (l_egal (LG X V1 R1 S1) (LG X V1' R1' S1')) in |- *.
(* Goal: l_egal (LG X V1 R1 S1) (LG X V1' R1' S1') *)
auto.
Qed.
End gram5. |
Require Import Coq.Arith.Div2.
Require Import Coq.micromega.Lia.
Require Import Coq.NArith.NArith.
Require Import Coq.ZArith.ZArith.
Require Import bbv.N_Z_nat_conversions.
Require Export bbv.Nomega.
Set Implicit Arguments.
Fixpoint mod2 (n : nat) : bool :=
match n with
| 0 => false
| 1 => true
| S (S n') => mod2 n'
end.
Ltac rethink :=
match goal with
| [ H : ?f ?n = _ |- ?f ?m = _ ] => replace m with n; simpl; auto
end.
Theorem mod2_S_double : forall n, mod2 (S (2 * n)) = true.
Proof.
(* Goal: forall n : nat, @eq bool (mod2 (S (Init.Nat.mul (S (S O)) n))) true *)
induction n; simpl; intuition; rethink.
Qed.
Theorem mod2_double : forall n, mod2 (2 * n) = false.
Proof.
(* Goal: forall n : nat, @eq bool (mod2 (Init.Nat.mul (S (S O)) n)) false *)
induction n; simpl; intuition; rewrite <- plus_n_Sm; rethink.
Qed.
Theorem div2_double : forall n, div2 (2 * n) = n.
Proof.
(* Goal: forall n : nat, @eq nat (Nat.div2 (Init.Nat.mul (S (S O)) n)) n *)
induction n; simpl; intuition; rewrite <- plus_n_Sm; f_equal; rethink.
Qed.
Theorem div2_S_double : forall n, div2 (S (2 * n)) = n.
Proof.
(* Goal: forall n : nat, @eq nat (Nat.div2 (S (Init.Nat.mul (S (S O)) n))) n *)
induction n; simpl; intuition; f_equal; rethink.
Qed.
Notation pow2 := (Nat.pow 2).
Fixpoint Npow2 (n : nat) : N :=
match n with
| O => 1
| S n' => 2 * Npow2 n'
end%N.
Theorem untimes2 : forall n, n + (n + 0) = 2 * n.
Proof.
(* Goal: forall n : nat, @eq nat (Init.Nat.add n (Init.Nat.add n O)) (Init.Nat.mul (S (S O)) n) *)
auto.
Qed.
Section strong.
Variable P : nat -> Prop.
Hypothesis PH : forall n, (forall m, m < n -> P m) -> P n.
Lemma strong' : forall n m, m <= n -> P m.
Proof.
(* Goal: forall (n m : nat) (_ : le m n), P m *)
induction n; simpl; intuition; apply PH; intuition.
(* Goal: P m0 *)
elimtype False; omega.
Qed.
Theorem strong : forall n, P n.
Proof.
(* Goal: forall n : nat, P n *)
intros; eapply strong'; eauto.
Qed.
End strong.
Theorem div2_odd : forall n,
mod2 n = true
-> n = S (2 * div2 n).
Proof.
(* Goal: forall (n : nat) (_ : @eq bool (mod2 n) true), @eq nat n (S (Init.Nat.mul (S (S O)) (Nat.div2 n))) *)
induction n as [n] using strong; simpl; intuition.
(* Goal: @eq nat n (S (Init.Nat.add (Nat.div2 n) (Init.Nat.add (Nat.div2 n) O))) *)
destruct n as [|n]; simpl in *; intuition.
(* Goal: @eq nat (S n) (S (Init.Nat.add match n with | O => O | S n' => S (Nat.div2 n') end (Init.Nat.add match n with | O => O | S n' => S (Nat.div2 n') end O))) *)
(* Goal: @eq nat O (S O) *)
discriminate.
(* Goal: @eq nat (S n) (S (Init.Nat.add match n with | O => O | S n' => S (Nat.div2 n') end (Init.Nat.add match n with | O => O | S n' => S (Nat.div2 n') end O))) *)
destruct n as [|n]; simpl in *; intuition.
(* Goal: @eq nat (S (S n)) (S (S (Init.Nat.add (Nat.div2 n) (S (Init.Nat.add (Nat.div2 n) O))))) *)
do 2 f_equal.
(* Goal: @eq nat n (Init.Nat.add (Nat.div2 n) (S (Init.Nat.add (Nat.div2 n) O))) *)
replace (div2 n + S (div2 n + 0)) with (S (div2 n + (div2 n + 0))); auto.
Qed.
Theorem div2_even : forall n,
mod2 n = false
-> n = 2 * div2 n.
Proof.
(* Goal: forall (n : nat) (_ : @eq bool (mod2 n) false), @eq nat n (Init.Nat.mul (S (S O)) (Nat.div2 n)) *)
induction n as [n] using strong; simpl; intuition.
(* Goal: @eq nat n (Init.Nat.add (Nat.div2 n) (Init.Nat.add (Nat.div2 n) O)) *)
destruct n as [|n]; simpl in *; intuition.
(* Goal: @eq nat (S n) (Init.Nat.add match n with | O => O | S n' => S (Nat.div2 n') end (Init.Nat.add match n with | O => O | S n' => S (Nat.div2 n') end O)) *)
destruct n as [|n]; simpl in *; intuition.
(* Goal: @eq nat (S (S n)) (S (Init.Nat.add (Nat.div2 n) (S (Init.Nat.add (Nat.div2 n) O)))) *)
(* Goal: @eq nat (S O) O *)
discriminate.
(* Goal: @eq nat (S (S n)) (S (Init.Nat.add (Nat.div2 n) (S (Init.Nat.add (Nat.div2 n) O)))) *)
f_equal.
(* Goal: @eq nat (S n) (Init.Nat.add (Nat.div2 n) (S (Init.Nat.add (Nat.div2 n) O))) *)
replace (div2 n + S (div2 n + 0)) with (S (div2 n + (div2 n + 0))); auto.
Qed.
Theorem drop_mod2 : forall n k,
2 * k <= n
-> mod2 (n - 2 * k) = mod2 n.
Proof.
(* Goal: forall (n k : nat) (_ : le (Init.Nat.mul (S (S O)) k) n), @eq bool (mod2 (Init.Nat.sub n (Init.Nat.mul (S (S O)) k))) (mod2 n) *)
induction n as [n] using strong; intros.
(* Goal: @eq bool (mod2 (Init.Nat.sub n (Init.Nat.mul (S (S O)) k))) (mod2 n) *)
do 2 (destruct n; simpl in *; repeat rewrite untimes2 in *; intuition).
(* Goal: @eq bool (mod2 match Init.Nat.mul (S (S O)) k with | O => S (S n) | S (O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end) (mod2 n) *)
(* Goal: @eq bool (mod2 match Init.Nat.mul (S (S O)) k with | O => S O | S l => O end) true *)
destruct k; simpl in *; intuition.
(* Goal: @eq bool (mod2 match Init.Nat.mul (S (S O)) k with | O => S (S n) | S (O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end) (mod2 n) *)
destruct k; simpl; intuition.
(* Goal: @eq bool (mod2 match Init.Nat.add k (S (Init.Nat.add k O)) with | O => S n | S l => Init.Nat.sub n l end) (mod2 n) *)
rewrite <- plus_n_Sm.
(* Goal: @eq bool (mod2 (Init.Nat.sub n (Init.Nat.add k (Init.Nat.add k O)))) (mod2 n) *)
repeat rewrite untimes2 in *.
(* Goal: @eq bool (mod2 (Init.Nat.sub n (Init.Nat.mul (S (S O)) k))) (mod2 n) *)
simpl; auto.
(* Goal: @eq bool (mod2 (Init.Nat.sub n (Init.Nat.add k (Init.Nat.add k O)))) (mod2 n) *)
apply H; omega.
Qed.
Theorem div2_minus_2 : forall n k,
2 * k <= n
-> div2 (n - 2 * k) = div2 n - k.
Proof.
(* Goal: forall (n k : nat) (_ : le (Init.Nat.mul (S (S O)) k) n), @eq nat (Nat.div2 (Init.Nat.sub n (Init.Nat.mul (S (S O)) k))) (Init.Nat.sub (Nat.div2 n) k) *)
induction n as [n] using strong; intros.
(* Goal: @eq nat (Nat.div2 (Init.Nat.sub n (Init.Nat.mul (S (S O)) k))) (Init.Nat.sub (Nat.div2 n) k) *)
do 2 (destruct n; simpl in *; intuition; repeat rewrite untimes2 in *).
(* Goal: @eq nat (Nat.div2 match Init.Nat.mul (S (S O)) k with | O => S (S n) | S (O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end) match k with | O => S (Nat.div2 n) | S l => Init.Nat.sub (Nat.div2 n) l end *)
(* Goal: @eq nat (Nat.div2 match Init.Nat.mul (S (S O)) k with | O => S O | S l => O end) O *)
destruct k; simpl in *; intuition.
(* Goal: @eq nat (Nat.div2 match Init.Nat.mul (S (S O)) k with | O => S (S n) | S (O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end) match k with | O => S (Nat.div2 n) | S l => Init.Nat.sub (Nat.div2 n) l end *)
destruct k; simpl in *; intuition.
(* Goal: @eq nat (Nat.div2 match Init.Nat.add k (S (Init.Nat.add k O)) with | O => S n | S l => Init.Nat.sub n l end) (Init.Nat.sub (Nat.div2 n) k) *)
rewrite <- plus_n_Sm.
(* Goal: @eq nat (Nat.div2 (Init.Nat.sub n (Init.Nat.add k (Init.Nat.add k O)))) (Init.Nat.sub (Nat.div2 n) k) *)
apply H; omega.
Qed.
Theorem div2_bound : forall k n,
2 * k <= n
-> k <= div2 n.
Proof.
(* Goal: forall (k n : nat) (_ : le (Init.Nat.mul (S (S O)) k) n), le k (Nat.div2 n) *)
intros ? n H; case_eq (mod2 n); intro Heq.
(* Goal: le k (Nat.div2 n) *)
(* Goal: le k (Nat.div2 n) *)
rewrite (div2_odd _ Heq) in H.
(* Goal: le k (Nat.div2 n) *)
(* Goal: le k (Nat.div2 n) *)
omega.
(* Goal: le k (Nat.div2 n) *)
rewrite (div2_even _ Heq) in H.
(* Goal: le k (Nat.div2 n) *)
omega.
Qed.
Lemma two_times_div2_bound: forall n, 2 * Nat.div2 n <= n.
Proof.
(* Goal: forall n : nat, le (Init.Nat.mul (S (S O)) (Nat.div2 n)) n *)
eapply strong.
(* Goal: forall (n : nat) (_ : forall (m : nat) (_ : lt m n), le (Init.Nat.mul (S (S O)) (Nat.div2 m)) m), le (Init.Nat.mul (S (S O)) (Nat.div2 n)) n *)
intros n IH.
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 n)) n *)
destruct n.
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 (S n))) (S n) *)
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 O)) O *)
-
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 O)) O *)
constructor.
(* BG Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 (S n))) (S n) *)
-
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 (S n))) (S n) *)
destruct n.
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 (S (S n)))) (S (S n)) *)
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 (S O))) (S O) *)
+
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 (S O))) (S O) *)
simpl.
(* Goal: le O (S O) *)
constructor.
(* Goal: le O O *)
constructor.
(* BG Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 (S (S n)))) (S (S n)) *)
+
(* Goal: le (Init.Nat.mul (S (S O)) (Nat.div2 (S (S n)))) (S (S n)) *)
simpl (Nat.div2 (S (S n))).
(* Goal: le (Init.Nat.mul (S (S O)) (S (Nat.div2 n))) (S (S n)) *)
specialize (IH n).
(* Goal: le (Init.Nat.mul (S (S O)) (S (Nat.div2 n))) (S (S n)) *)
omega.
Qed.
Lemma div2_compat_lt_l: forall a b, b < 2 * a -> Nat.div2 b < a.
Proof.
(* Goal: forall (a b : nat) (_ : lt b (Init.Nat.mul (S (S O)) a)), lt (Nat.div2 b) a *)
induction a; intros.
(* Goal: lt (Nat.div2 b) (S a) *)
(* Goal: lt (Nat.div2 b) O *)
-
(* Goal: lt (Nat.div2 b) O *)
omega.
(* BG Goal: lt (Nat.div2 b) (S a) *)
-
(* Goal: lt (Nat.div2 b) (S a) *)
destruct b.
(* Goal: lt (Nat.div2 (S b)) (S a) *)
(* Goal: lt (Nat.div2 O) (S a) *)
+
(* Goal: lt (Nat.div2 O) (S a) *)
simpl.
(* Goal: lt O (S a) *)
omega.
(* BG Goal: lt (Nat.div2 (S b)) (S a) *)
+
(* Goal: lt (Nat.div2 (S b)) (S a) *)
destruct b.
(* Goal: lt (Nat.div2 (S (S b))) (S a) *)
(* Goal: lt (Nat.div2 (S O)) (S a) *)
*
(* Goal: lt (Nat.div2 (S O)) (S a) *)
simpl.
(* Goal: lt O (S a) *)
omega.
(* BG Goal: lt (Nat.div2 (S (S b))) (S a) *)
*
(* Goal: lt (Nat.div2 (S (S b))) (S a) *)
simpl.
(* Goal: lt (S (Nat.div2 b)) (S a) *)
apply lt_n_S.
(* Goal: lt (Nat.div2 b) a *)
apply IHa.
(* Goal: lt b (Init.Nat.mul (S (S O)) a) *)
omega.
Qed.
Arguments div2_compat_lt_l {_} {_} _.
Lemma pow2_add_mul: forall a b,
pow2 (a + b) = (pow2 a) * (pow2 b).
Proof.
(* Goal: forall a b : nat, @eq nat (Nat.pow (S (S O)) (Init.Nat.add a b)) (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) b)) *)
induction a; destruct b; firstorder; simpl.
(* Goal: @eq nat (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a (S b))) (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a (S b))) O)) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.add (Nat.pow (S (S O)) a) O)) (Nat.add (Nat.pow (S (S O)) b) (Nat.add (Nat.pow (S (S O)) b) O))) *)
(* Goal: @eq nat (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a O)) (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a O)) O)) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.add (Nat.pow (S (S O)) a) O)) (S O)) *)
repeat rewrite Nat.add_0_r.
(* Goal: @eq nat (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a (S b))) (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a (S b))) O)) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.add (Nat.pow (S (S O)) a) O)) (Nat.add (Nat.pow (S (S O)) b) (Nat.add (Nat.pow (S (S O)) b) O))) *)
(* Goal: @eq nat (Nat.add (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) a)) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) a)) (S O)) *)
rewrite Nat.mul_1_r; auto.
(* Goal: @eq nat (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a (S b))) (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a (S b))) O)) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.add (Nat.pow (S (S O)) a) O)) (Nat.add (Nat.pow (S (S O)) b) (Nat.add (Nat.pow (S (S O)) b) O))) *)
repeat rewrite Nat.add_0_r.
(* Goal: @eq nat (Nat.add (Nat.pow (S (S O)) (Init.Nat.add a (S b))) (Nat.pow (S (S O)) (Init.Nat.add a (S b)))) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) a)) (Nat.add (Nat.pow (S (S O)) b) (Nat.pow (S (S O)) b))) *)
rewrite IHa.
(* Goal: @eq nat (Nat.add (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) (S b))) (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) (S b)))) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) a)) (Nat.add (Nat.pow (S (S O)) b) (Nat.pow (S (S O)) b))) *)
simpl.
(* Goal: @eq nat (Nat.add (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.add (Nat.pow (S (S O)) b) (Nat.add (Nat.pow (S (S O)) b) O))) (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.add (Nat.pow (S (S O)) b) (Nat.add (Nat.pow (S (S O)) b) O)))) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) a)) (Nat.add (Nat.pow (S (S O)) b) (Nat.pow (S (S O)) b))) *)
repeat rewrite Nat.add_0_r.
(* Goal: @eq nat (Nat.add (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.add (Nat.pow (S (S O)) b) (Nat.pow (S (S O)) b))) (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.add (Nat.pow (S (S O)) b) (Nat.pow (S (S O)) b)))) (Init.Nat.mul (Nat.add (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) a)) (Nat.add (Nat.pow (S (S O)) b) (Nat.pow (S (S O)) b))) *)
rewrite Nat.mul_add_distr_r; auto.
Qed.
Lemma mult_pow2_bound: forall a b x y,
x < pow2 a -> y < pow2 b -> x * y < pow2 (a + b).
Proof.
(* Goal: forall (a b x y : nat) (_ : lt x (Nat.pow (S (S O)) a)) (_ : lt y (Nat.pow (S (S O)) b)), lt (Init.Nat.mul x y) (Nat.pow (S (S O)) (Init.Nat.add a b)) *)
intros.
(* Goal: lt (Init.Nat.mul x y) (Nat.pow (S (S O)) (Init.Nat.add a b)) *)
rewrite pow2_add_mul.
(* Goal: lt (Init.Nat.mul x y) (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) b)) *)
apply Nat.mul_lt_mono_nonneg; omega.
Qed.
Lemma mult_pow2_bound_ex: forall a c x y,
x < pow2 a -> y < pow2 (c - a) -> c >= a -> x * y < pow2 c.
Proof.
(* Goal: forall (a c x y : nat) (_ : lt x (Nat.pow (S (S O)) a)) (_ : lt y (Nat.pow (S (S O)) (Init.Nat.sub c a))) (_ : ge c a), lt (Init.Nat.mul x y) (Nat.pow (S (S O)) c) *)
intros.
(* Goal: lt (Init.Nat.mul x y) (Nat.pow (S (S O)) c) *)
replace c with (a + (c - a)) by omega.
(* Goal: lt (Init.Nat.mul x y) (Nat.pow (S (S O)) (Init.Nat.add a (Init.Nat.sub c a))) *)
apply mult_pow2_bound; auto.
Qed.
Lemma lt_mul_mono' : forall c a b,
a < b -> a < b * (S c).
Proof.
(* Goal: forall (c a b : nat) (_ : lt a b), lt a (Init.Nat.mul b (S c)) *)
induction c; intros.
(* Goal: lt a (Init.Nat.mul b (S (S c))) *)
(* Goal: lt a (Init.Nat.mul b (S O)) *)
rewrite Nat.mul_1_r; auto.
(* Goal: lt a (Init.Nat.mul b (S (S c))) *)
rewrite Nat.mul_succ_r.
(* Goal: lt a (Nat.add (Nat.mul b (S c)) b) *)
apply lt_plus_trans.
(* Goal: lt a (Nat.mul b (S c)) *)
apply IHc; auto.
Qed.
Lemma lt_mul_mono : forall a b c,
c <> 0 -> a < b -> a < b * c.
Proof.
(* Goal: forall (a b c : nat) (_ : not (@eq nat c O)) (_ : lt a b), lt a (Init.Nat.mul b c) *)
intros.
(* Goal: lt a (Init.Nat.mul b c) *)
replace c with (S (c - 1)) by omega.
(* Goal: lt a (Init.Nat.mul b (S (Init.Nat.sub c (S O)))) *)
apply lt_mul_mono'; auto.
Qed.
Lemma zero_lt_pow2 : forall sz, 0 < pow2 sz.
Proof.
(* Goal: forall sz : nat, lt O (Nat.pow (S (S O)) sz) *)
induction sz; simpl; omega.
Qed.
Lemma one_lt_pow2:
forall n,
1 < pow2 (S n).
Proof.
(* Goal: forall n : nat, lt (S O) (Nat.pow (S (S O)) (S n)) *)
intros.
(* Goal: lt (S O) (Nat.pow (S (S O)) (S n)) *)
induction n.
(* Goal: lt (S O) (Nat.pow (S (S O)) (S (S n))) *)
(* Goal: lt (S O) (Nat.pow (S (S O)) (S O)) *)
simpl; omega.
(* Goal: lt (S O) (Nat.pow (S (S O)) (S (S n))) *)
remember (S n); simpl.
(* Goal: lt (S O) (Nat.add (Nat.pow (S (S O)) n0) (Nat.add (Nat.pow (S (S O)) n0) O)) *)
omega.
Qed.
Lemma one_le_pow2 : forall sz, 1 <= pow2 sz.
Proof.
(* Goal: forall sz : nat, le (S O) (Nat.pow (S (S O)) sz) *)
intros.
(* Goal: le (S O) (Nat.pow (S (S O)) sz) *)
pose proof (zero_lt_pow2 sz).
(* Goal: le (S O) (Nat.pow (S (S O)) sz) *)
omega.
Qed.
Lemma pow2_ne_zero: forall n, pow2 n <> 0.
Proof.
(* Goal: forall n : nat, not (@eq nat (Nat.pow (S (S O)) n) O) *)
intros.
(* Goal: not (@eq nat (Nat.pow (S (S O)) n) O) *)
pose proof (zero_lt_pow2 n).
(* Goal: not (@eq nat (Nat.pow (S (S O)) n) O) *)
omega.
Qed.
Lemma mul2_add : forall n, n * 2 = n + n.
Proof.
(* Goal: forall n : nat, @eq nat (Init.Nat.mul n (S (S O))) (Init.Nat.add n n) *)
induction n; firstorder.
Qed.
Lemma pow2_le_S : forall sz, (pow2 sz) + 1 <= pow2 (sz + 1).
Proof.
(* Goal: forall sz : nat, le (Init.Nat.add (Nat.pow (S (S O)) sz) (S O)) (Nat.pow (S (S O)) (Init.Nat.add sz (S O))) *)
induction sz; simpl; auto.
(* Goal: le (Init.Nat.add (Nat.add (Nat.pow (S (S O)) sz) (Nat.add (Nat.pow (S (S O)) sz) O)) (S O)) (Nat.add (Nat.pow (S (S O)) (Init.Nat.add sz (S O))) (Nat.add (Nat.pow (S (S O)) (Init.Nat.add sz (S O))) O)) *)
repeat rewrite Nat.add_0_r.
(* Goal: le (Init.Nat.add (Nat.add (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) sz)) (S O)) (Nat.add (Nat.pow (S (S O)) (Init.Nat.add sz (S O))) (Nat.pow (S (S O)) (Init.Nat.add sz (S O)))) *)
rewrite pow2_add_mul.
(* Goal: le (Init.Nat.add (Nat.add (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) sz)) (S O)) (Nat.add (Init.Nat.mul (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) (S O))) (Init.Nat.mul (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) (S O)))) *)
repeat rewrite mul2_add.
(* Goal: le (Init.Nat.add (Nat.add (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) sz)) (S O)) (Nat.add (Init.Nat.add (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) sz)) (Init.Nat.add (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) sz))) *)
pose proof (zero_lt_pow2 sz).
(* Goal: le (Init.Nat.add (Nat.add (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) sz)) (S O)) (Nat.add (Init.Nat.add (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) sz)) (Init.Nat.add (Nat.pow (S (S O)) sz) (Nat.pow (S (S O)) sz))) *)
omega.
Qed.
Lemma pow2_bound_mono: forall a b x,
x < pow2 a -> a <= b -> x < pow2 b.
Proof.
(* Goal: forall (a b x : nat) (_ : lt x (Nat.pow (S (S O)) a)) (_ : le a b), lt x (Nat.pow (S (S O)) b) *)
intros.
(* Goal: lt x (Nat.pow (S (S O)) b) *)
replace b with (a + (b - a)) by omega.
(* Goal: lt x (Nat.pow (S (S O)) (Init.Nat.add a (Init.Nat.sub b a))) *)
rewrite pow2_add_mul.
(* Goal: lt x (Init.Nat.mul (Nat.pow (S (S O)) a) (Nat.pow (S (S O)) (Init.Nat.sub b a))) *)
apply lt_mul_mono; auto.
(* Goal: not (@eq nat (Nat.pow (S (S O)) (Init.Nat.sub b a)) O) *)
pose proof (zero_lt_pow2 (b - a)).
(* Goal: not (@eq nat (Nat.pow (S (S O)) (Init.Nat.sub b a)) O) *)
omega.
Qed.
Lemma pow2_inc : forall n m,
0 < n -> n < m ->
pow2 n < pow2 m.
Proof.
(* Goal: forall (n m : nat) (_ : lt O n) (_ : lt n m), lt (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) m) *)
intros.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) m) *)
generalize dependent n; intros.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) m) *)
induction m; simpl.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) m) (Nat.add (Nat.pow (S (S O)) m) O)) *)
(* Goal: lt (Nat.pow (S (S O)) n) (S O) *)
intros.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) m) (Nat.add (Nat.pow (S (S O)) m) O)) *)
(* Goal: lt (Nat.pow (S (S O)) n) (S O) *)
inversion H0.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) m) (Nat.add (Nat.pow (S (S O)) m) O)) *)
unfold lt in H0.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) m) (Nat.add (Nat.pow (S (S O)) m) O)) *)
rewrite Nat.add_0_r.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) m) (Nat.pow (S (S O)) m)) *)
inversion H0.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) m) (Nat.pow (S (S O)) m)) *)
(* Goal: lt (Nat.pow (S (S O)) m) (Nat.add (Nat.pow (S (S O)) m) (Nat.pow (S (S O)) m)) *)
apply Nat.lt_add_pos_r.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) m) (Nat.pow (S (S O)) m)) *)
(* Goal: lt O (Nat.pow (S (S O)) m) *)
apply zero_lt_pow2.
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) m) (Nat.pow (S (S O)) m)) *)
apply Nat.lt_trans with (pow2 m).
(* Goal: lt (Nat.pow (S (S O)) m) (Nat.add (Nat.pow (S (S O)) m) (Nat.pow (S (S O)) m)) *)
(* Goal: lt (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) m) *)
apply IHm.
(* Goal: lt (Nat.pow (S (S O)) m) (Nat.add (Nat.pow (S (S O)) m) (Nat.pow (S (S O)) m)) *)
(* Goal: lt n m *)
exact H2.
(* Goal: lt (Nat.pow (S (S O)) m) (Nat.add (Nat.pow (S (S O)) m) (Nat.pow (S (S O)) m)) *)
apply Nat.lt_add_pos_r.
(* Goal: lt O (Nat.pow (S (S O)) m) *)
apply zero_lt_pow2.
Qed.
Lemma pow2_S: forall x, pow2 (S x) = 2 * pow2 x.
Proof.
(* Goal: forall x : nat, @eq nat (Nat.pow (S (S O)) (S x)) (Init.Nat.mul (S (S O)) (Nat.pow (S (S O)) x)) *)
intros.
(* Goal: @eq nat (Nat.pow (S (S O)) (S x)) (Init.Nat.mul (S (S O)) (Nat.pow (S (S O)) x)) *)
reflexivity.
Qed.
Lemma mod2_S_S : forall n,
mod2 (S (S n)) = mod2 n.
Proof.
(* Goal: forall n : nat, @eq bool (mod2 (S (S n))) (mod2 n) *)
intros.
(* Goal: @eq bool (mod2 (S (S n))) (mod2 n) *)
destruct n; auto; destruct n; auto.
Qed.
Lemma mod2_S_not : forall n,
mod2 (S n) = if (mod2 n) then false else true.
Proof.
(* Goal: forall n : nat, @eq bool (mod2 (S n)) (if mod2 n then false else true) *)
intros.
(* Goal: @eq bool (mod2 (S n)) (if mod2 n then false else true) *)
induction n; auto.
(* Goal: @eq bool (mod2 (S (S n))) (if mod2 (S n) then false else true) *)
rewrite mod2_S_S.
(* Goal: @eq bool (mod2 n) (if mod2 (S n) then false else true) *)
destruct (mod2 n); replace (mod2 (S n)); auto.
Qed.
Lemma mod2_S_eq : forall n k,
mod2 n = mod2 k ->
mod2 (S n) = mod2 (S k).
Proof.
(* Goal: forall (n k : nat) (_ : @eq bool (mod2 n) (mod2 k)), @eq bool (mod2 (S n)) (mod2 (S k)) *)
intros.
(* Goal: @eq bool (mod2 (S n)) (mod2 (S k)) *)
do 2 rewrite mod2_S_not.
(* Goal: @eq bool (if mod2 n then false else true) (if mod2 k then false else true) *)
rewrite H.
(* Goal: @eq bool (if mod2 k then false else true) (if mod2 k then false else true) *)
auto.
Qed.
Theorem drop_mod2_add : forall n k,
mod2 (n + 2 * k) = mod2 n.
Proof.
(* Goal: forall n k : nat, @eq bool (mod2 (Init.Nat.add n (Init.Nat.mul (S (S O)) k))) (mod2 n) *)
intros.
(* Goal: @eq bool (mod2 (Init.Nat.add n (Init.Nat.mul (S (S O)) k))) (mod2 n) *)
induction n.
(* Goal: @eq bool (mod2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (mod2 (S n)) *)
(* Goal: @eq bool (mod2 (Init.Nat.add O (Init.Nat.mul (S (S O)) k))) (mod2 O) *)
simpl.
(* Goal: @eq bool (mod2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (mod2 (S n)) *)
(* Goal: @eq bool (mod2 (Init.Nat.add k (Init.Nat.add k O))) false *)
rewrite Nat.add_0_r.
(* Goal: @eq bool (mod2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (mod2 (S n)) *)
(* Goal: @eq bool (mod2 (Init.Nat.add k k)) false *)
replace (k + k) with (2 * k) by omega.
(* Goal: @eq bool (mod2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (mod2 (S n)) *)
(* Goal: @eq bool (mod2 (Init.Nat.mul (S (S O)) k)) false *)
apply mod2_double.
(* Goal: @eq bool (mod2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (mod2 (S n)) *)
replace (S n + 2 * k) with (S (n + 2 * k)) by omega.
(* Goal: @eq bool (mod2 (S (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (mod2 (S n)) *)
apply mod2_S_eq; auto.
Qed.
Lemma mod2sub: forall a b,
b <= a ->
mod2 (a - b) = xorb (mod2 a) (mod2 b).
Proof.
(* Goal: forall (a b : nat) (_ : le b a), @eq bool (mod2 (Init.Nat.sub a b)) (xorb (mod2 a) (mod2 b)) *)
intros.
(* Goal: @eq bool (mod2 (Init.Nat.sub a b)) (xorb (mod2 a) (mod2 b)) *)
remember (a - b) as c.
(* Goal: @eq bool (mod2 c) (xorb (mod2 a) (mod2 b)) *)
revert dependent b.
(* Goal: forall (b : nat) (_ : le b a) (_ : @eq nat c (Init.Nat.sub a b)), @eq bool (mod2 c) (xorb (mod2 a) (mod2 b)) *)
revert a.
(* Goal: forall (a b : nat) (_ : le b a) (_ : @eq nat c (Init.Nat.sub a b)), @eq bool (mod2 c) (xorb (mod2 a) (mod2 b)) *)
revert c.
(* Goal: forall (c a b : nat) (_ : le b a) (_ : @eq nat c (Init.Nat.sub a b)), @eq bool (mod2 c) (xorb (mod2 a) (mod2 b)) *)
change (forall c, (fun c => forall a b, b <= a -> c = a - b -> mod2 c = xorb (mod2 a) (mod2 b)) c).
(* Goal: forall c : nat, (fun c0 : nat => forall (a b : nat) (_ : le b a) (_ : @eq nat c0 (Init.Nat.sub a b)), @eq bool (mod2 c0) (xorb (mod2 a) (mod2 b))) c *)
apply strong.
(* Goal: forall (n : nat) (_ : forall (m : nat) (_ : lt m n) (a b : nat) (_ : le b a) (_ : @eq nat m (Init.Nat.sub a b)), @eq bool (mod2 m) (xorb (mod2 a) (mod2 b))) (a b : nat) (_ : le b a) (_ : @eq nat n (Init.Nat.sub a b)), @eq bool (mod2 n) (xorb (mod2 a) (mod2 b)) *)
intros c IH a b AB N.
(* Goal: @eq bool (mod2 c) (xorb (mod2 a) (mod2 b)) *)
destruct c.
(* Goal: @eq bool (mod2 (S c)) (xorb (mod2 a) (mod2 b)) *)
(* Goal: @eq bool (mod2 O) (xorb (mod2 a) (mod2 b)) *)
-
(* Goal: @eq bool (mod2 O) (xorb (mod2 a) (mod2 b)) *)
assert (a=b) by omega.
(* Goal: @eq bool (mod2 O) (xorb (mod2 a) (mod2 b)) *)
subst.
(* Goal: @eq bool (mod2 O) (xorb (mod2 b) (mod2 b)) *)
rewrite Bool.xorb_nilpotent.
(* Goal: @eq bool (mod2 O) false *)
reflexivity.
(* BG Goal: @eq bool (mod2 (S c)) (xorb (mod2 a) (mod2 b)) *)
-
(* Goal: @eq bool (mod2 (S c)) (xorb (mod2 a) (mod2 b)) *)
destruct c.
(* Goal: @eq bool (mod2 (S (S c))) (xorb (mod2 a) (mod2 b)) *)
(* Goal: @eq bool (mod2 (S O)) (xorb (mod2 a) (mod2 b)) *)
+
(* Goal: @eq bool (mod2 (S O)) (xorb (mod2 a) (mod2 b)) *)
assert (a = S b) by omega.
(* Goal: @eq bool (mod2 (S O)) (xorb (mod2 a) (mod2 b)) *)
subst a.
(* Goal: @eq bool (mod2 (S O)) (xorb (mod2 (S b)) (mod2 b)) *)
simpl (mod2 1).
(* Goal: @eq bool true (xorb (mod2 (S b)) (mod2 b)) *)
rewrite mod2_S_not.
(* Goal: @eq bool true (xorb (if mod2 b then false else true) (mod2 b)) *)
destruct (mod2 b); reflexivity.
(* BG Goal: @eq bool (mod2 (S (S c))) (xorb (mod2 a) (mod2 b)) *)
+
(* Goal: @eq bool (mod2 (S (S c))) (xorb (mod2 a) (mod2 b)) *)
destruct a; [omega|].
(* Goal: @eq bool (mod2 (S (S c))) (xorb (mod2 (S a)) (mod2 b)) *)
destruct a; [omega|].
(* Goal: @eq bool (mod2 (S (S c))) (xorb (mod2 (S (S a))) (mod2 b)) *)
simpl.
(* Goal: @eq bool (mod2 c) (xorb (mod2 a) (mod2 b)) *)
apply IH; omega.
Qed.
Theorem mod2_pow2_twice: forall n,
mod2 (pow2 n + (pow2 n + 0)) = false.
Proof.
(* Goal: forall n : nat, @eq bool (mod2 (Init.Nat.add (Nat.pow (S (S O)) n) (Init.Nat.add (Nat.pow (S (S O)) n) O))) false *)
intros.
(* Goal: @eq bool (mod2 (Init.Nat.add (Nat.pow (S (S O)) n) (Init.Nat.add (Nat.pow (S (S O)) n) O))) false *)
replace (pow2 n + (pow2 n + 0)) with (2 * pow2 n) by omega.
(* Goal: @eq bool (mod2 (Init.Nat.mul (S (S O)) (Nat.pow (S (S O)) n))) false *)
apply mod2_double.
Qed.
Theorem div2_plus_2 : forall n k,
div2 (n + 2 * k) = div2 n + k.
Proof.
(* Goal: forall n k : nat, @eq nat (Nat.div2 (Init.Nat.add n (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 n) k) *)
induction n; intros.
(* Goal: @eq nat (Nat.div2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 (S n)) k) *)
(* Goal: @eq nat (Nat.div2 (Init.Nat.add O (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 O) k) *)
simpl.
(* Goal: @eq nat (Nat.div2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 (S n)) k) *)
(* Goal: @eq nat (Nat.div2 (Init.Nat.add k (Init.Nat.add k O))) k *)
rewrite Nat.add_0_r.
(* Goal: @eq nat (Nat.div2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 (S n)) k) *)
(* Goal: @eq nat (Nat.div2 (Init.Nat.add k k)) k *)
replace (k + k) with (2 * k) by omega.
(* Goal: @eq nat (Nat.div2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 (S n)) k) *)
(* Goal: @eq nat (Nat.div2 (Init.Nat.mul (S (S O)) k)) k *)
apply div2_double.
(* Goal: @eq nat (Nat.div2 (Init.Nat.add (S n) (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 (S n)) k) *)
replace (S n + 2 * k) with (S (n + 2 * k)) by omega.
(* Goal: @eq nat (Nat.div2 (S (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (Init.Nat.add (Nat.div2 (S n)) k) *)
destruct (Even.even_or_odd n).
(* Goal: @eq nat (Nat.div2 (S (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (Init.Nat.add (Nat.div2 (S n)) k) *)
(* Goal: @eq nat (Nat.div2 (S (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (Init.Nat.add (Nat.div2 (S n)) k) *)
-
(* Goal: @eq nat (Nat.div2 (S (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (Init.Nat.add (Nat.div2 (S n)) k) *)
rewrite <- even_div2.
(* Goal: Even.even (Init.Nat.add n (Init.Nat.mul (S (S O)) k)) *)
(* Goal: @eq nat (Nat.div2 (Init.Nat.add n (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 (S n)) k) *)
rewrite <- even_div2 by auto.
(* Goal: Even.even (Init.Nat.add n (Init.Nat.mul (S (S O)) k)) *)
(* Goal: @eq nat (Nat.div2 (Init.Nat.add n (Init.Nat.mul (S (S O)) k))) (Init.Nat.add (Nat.div2 n) k) *)
apply IHn.
(* Goal: Even.even (Init.Nat.add n (Init.Nat.mul (S (S O)) k)) *)
apply Even.even_even_plus; auto.
(* Goal: Even.even (Init.Nat.mul (S (S O)) k) *)
apply Even.even_mult_l; repeat constructor.
(* BG Goal: @eq nat (Nat.div2 (S (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (Init.Nat.add (Nat.div2 (S n)) k) *)
-
(* Goal: @eq nat (Nat.div2 (S (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (Init.Nat.add (Nat.div2 (S n)) k) *)
rewrite <- odd_div2.
(* Goal: Even.odd (Init.Nat.add n (Init.Nat.mul (S (S O)) k)) *)
(* Goal: @eq nat (S (Nat.div2 (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (Init.Nat.add (Nat.div2 (S n)) k) *)
rewrite <- odd_div2 by auto.
(* Goal: Even.odd (Init.Nat.add n (Init.Nat.mul (S (S O)) k)) *)
(* Goal: @eq nat (S (Nat.div2 (Init.Nat.add n (Init.Nat.mul (S (S O)) k)))) (Init.Nat.add (S (Nat.div2 n)) k) *)
rewrite IHn.
(* Goal: Even.odd (Init.Nat.add n (Init.Nat.mul (S (S O)) k)) *)
(* Goal: @eq nat (S (Init.Nat.add (Nat.div2 n) k)) (Init.Nat.add (S (Nat.div2 n)) k) *)
omega.
(* Goal: Even.odd (Init.Nat.add n (Init.Nat.mul (S (S O)) k)) *)
apply Even.odd_plus_l; auto.
(* Goal: Even.even (Init.Nat.mul (S (S O)) k) *)
apply Even.even_mult_l; repeat constructor.
Qed.
Lemma pred_add:
forall n, n <> 0 -> pred n + 1 = n.
Proof.
(* Goal: forall (n : nat) (_ : not (@eq nat n O)), @eq nat (Init.Nat.add (Init.Nat.pred n) (S O)) n *)
intros; rewrite pred_of_minus; omega.
Qed.
Lemma pow2_zero: forall sz, (pow2 sz > 0)%nat.
Proof.
(* Goal: forall sz : nat, gt (Nat.pow (S (S O)) sz) O *)
induction sz; simpl; auto; omega.
Qed.
Section omega_compat.
Ltac omega ::= lia.
Theorem Npow2_nat : forall n, nat_of_N (Npow2 n) = pow2 n.
Proof.
(* Goal: forall n : nat, @eq nat (N.to_nat (Npow2 n)) (Nat.pow (S (S O)) n) *)
induction n as [|n IHn]; simpl; intuition.
(* Goal: @eq nat (N.to_nat match Npow2 n with | N0 => N0 | Npos q => Npos (xO q) end) (Nat.add (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) n) O)) *)
rewrite <- IHn; clear IHn.
(* Goal: @eq nat (N.to_nat match Npow2 n with | N0 => N0 | Npos q => Npos (xO q) end) (Nat.add (N.to_nat (Npow2 n)) (Nat.add (N.to_nat (Npow2 n)) O)) *)
case_eq (Npow2 n); intuition.
Qed.
End omega_compat.
Theorem pow2_N : forall n, Npow2 n = N.of_nat (pow2 n).
Proof.
(* Goal: forall n : nat, @eq N (Npow2 n) (N.of_nat (Nat.pow (S (S O)) n)) *)
intro n.
(* Goal: @eq N (Npow2 n) (N.of_nat (Nat.pow (S (S O)) n)) *)
apply nat_of_N_eq.
(* Goal: @eq nat (N.to_nat (Npow2 n)) (N.to_nat (N.of_nat (Nat.pow (S (S O)) n))) *)
rewrite Nat2N.id.
(* Goal: @eq nat (N.to_nat (Npow2 n)) (Nat.pow (S (S O)) n) *)
apply Npow2_nat.
Qed.
Lemma Z_of_N_Npow2: forall n, Z.of_N (Npow2 n) = (2 ^ Z.of_nat n)%Z.
Proof.
(* Goal: forall n : nat, @eq Z (Z.of_N (Npow2 n)) (Z.pow (Zpos (xO xH)) (Z.of_nat n)) *)
intros.
(* Goal: @eq Z (Z.of_N (Npow2 n)) (Z.pow (Zpos (xO xH)) (Z.of_nat n)) *)
rewrite pow2_N.
(* Goal: @eq Z (Z.of_N (N.of_nat (Nat.pow (S (S O)) n))) (Z.pow (Zpos (xO xH)) (Z.of_nat n)) *)
rewrite nat_N_Z.
(* Goal: @eq Z (Z.of_nat (Nat.pow (S (S O)) n)) (Z.pow (Zpos (xO xH)) (Z.of_nat n)) *)
rewrite Nat2Z.inj_pow.
(* Goal: @eq Z (Z.pow (Z.of_nat (S (S O))) (Z.of_nat n)) (Z.pow (Zpos (xO xH)) (Z.of_nat n)) *)
reflexivity.
Qed.
Lemma pow2_S_z:
forall n, Z.of_nat (pow2 (S n)) = (2 * Z.of_nat (pow2 n))%Z.
Proof.
(* Goal: forall n : nat, @eq Z (Z.of_nat (Nat.pow (S (S O)) (S n))) (Z.mul (Zpos (xO xH)) (Z.of_nat (Nat.pow (S (S O)) n))) *)
intros.
(* Goal: @eq Z (Z.of_nat (Nat.pow (S (S O)) (S n))) (Z.mul (Zpos (xO xH)) (Z.of_nat (Nat.pow (S (S O)) n))) *)
replace (2 * Z.of_nat (pow2 n))%Z with (Z.of_nat (pow2 n) + Z.of_nat (pow2 n))%Z by omega.
(* Goal: @eq Z (Z.of_nat (Nat.pow (S (S O)) (S n))) (Z.add (Z.of_nat (Nat.pow (S (S O)) n)) (Z.of_nat (Nat.pow (S (S O)) n))) *)
simpl.
(* Goal: @eq Z (Z.of_nat (Nat.add (Nat.pow (S (S O)) n) (Nat.add (Nat.pow (S (S O)) n) O))) (Z.add (Z.of_nat (Nat.pow (S (S O)) n)) (Z.of_nat (Nat.pow (S (S O)) n))) *)
repeat rewrite Nat2Z.inj_add.
(* Goal: @eq Z (Z.add (Z.of_nat (Nat.pow (S (S O)) n)) (Z.add (Z.of_nat (Nat.pow (S (S O)) n)) (Z.of_nat O))) (Z.add (Z.of_nat (Nat.pow (S (S O)) n)) (Z.of_nat (Nat.pow (S (S O)) n))) *)
ring.
Qed.
Lemma pow2_le:
forall n m, (n <= m)%nat -> (pow2 n <= pow2 m)%nat.
Proof.
(* Goal: forall (n m : nat) (_ : le n m), le (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) m) *)
intros.
(* Goal: le (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) m) *)
assert (exists s, n + s = m) by (exists (m - n); omega).
(* Goal: le (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) m) *)
destruct H0; subst.
(* Goal: le (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) (Init.Nat.add n x)) *)
rewrite pow2_add_mul.
(* Goal: le (Nat.pow (S (S O)) n) (Init.Nat.mul (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) x)) *)
pose proof (pow2_zero x).
(* Goal: le (Nat.pow (S (S O)) n) (Init.Nat.mul (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) x)) *)
replace (pow2 n) with (pow2 n * 1) at 1 by omega.
(* Goal: le (Init.Nat.mul (Nat.pow (S (S O)) n) (S O)) (Init.Nat.mul (Nat.pow (S (S O)) n) (Nat.pow (S (S O)) x)) *)
apply mult_le_compat_l.
(* Goal: le (S O) (Nat.pow (S (S O)) x) *)
omega.
Qed.
Lemma Zabs_of_nat:
forall n, Z.abs (Z.of_nat n) = Z.of_nat n.
Proof.
(* Goal: forall n : nat, @eq Z (Z.abs (Z.of_nat n)) (Z.of_nat n) *)
unfold Z.of_nat; intros.
(* Goal: @eq Z (Z.abs match n with | O => Z0 | S n => Zpos (Pos.of_succ_nat n) end) match n with | O => Z0 | S n => Zpos (Pos.of_succ_nat n) end *)
destruct n; auto.
Qed.
Lemma Npow2_not_zero:
forall n, Npow2 n <> 0%N.
Proof.
(* Goal: forall n : nat, not (@eq N (Npow2 n) N0) *)
induction n; simpl; intros; [discriminate|].
(* Goal: not (@eq N match Npow2 n with | N0 => N0 | Npos q => Npos (xO q) end N0) *)
destruct (Npow2 n); auto.
(* Goal: not (@eq N (Npos (xO p)) N0) *)
discriminate.
Qed.
Lemma Npow2_S:
forall n, Npow2 (S n) = (Npow2 n + Npow2 n)%N.
Proof.
(* Goal: forall n : nat, @eq N (Npow2 (S n)) (N.add (Npow2 n) (Npow2 n)) *)
simpl; intros.
(* Goal: @eq N match Npow2 n with | N0 => N0 | Npos q => Npos (xO q) end (N.add (Npow2 n) (Npow2 n)) *)
destruct (Npow2 n); auto.
(* Goal: @eq N (Npos (xO p)) (N.add (Npos p) (Npos p)) *)
rewrite <-Pos.add_diag.
(* Goal: @eq N (Npos (Pos.add p p)) (N.add (Npos p) (Npos p)) *)
reflexivity.
Qed.
Lemma Npow2_pos: forall a,
(0 < Npow2 a)%N.
Proof.
(* Goal: forall a : nat, N.lt N0 (Npow2 a) *)
intros.
(* Goal: N.lt N0 (Npow2 a) *)
destruct (Npow2 a) eqn: E.
(* Goal: N.lt N0 (Npos p) *)
(* Goal: N.lt N0 N0 *)
-
(* Goal: N.lt N0 N0 *)
exfalso.
(* Goal: False *)
apply (Npow2_not_zero a).
(* Goal: @eq N (Npow2 a) N0 *)
assumption.
(* BG Goal: N.lt N0 (Npos p) *)
-
(* Goal: N.lt N0 (Npos p) *)
constructor.
Qed.
Lemma minus_minus: forall a b c,
c <= b <= a ->
a - (b - c) = a - b + c.
Proof.
(* Goal: forall (a b c : nat) (_ : and (le c b) (le b a)), @eq nat (Init.Nat.sub a (Init.Nat.sub b c)) (Init.Nat.add (Init.Nat.sub a b) c) *)
intros.
(* Goal: @eq nat (Init.Nat.sub a (Init.Nat.sub b c)) (Init.Nat.add (Init.Nat.sub a b) c) *)
omega.
Qed.
Lemma even_odd_destruct: forall n,
(exists a, n = 2 * a) \/ (exists a, n = 2 * a + 1).
Proof.
(* Goal: forall n : nat, or (@ex nat (fun a : nat => @eq nat n (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat n (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
induction n.
(* Goal: or (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
(* Goal: or (@ex nat (fun a : nat => @eq nat O (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat O (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
-
(* Goal: or (@ex nat (fun a : nat => @eq nat O (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat O (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
left.
(* Goal: @ex nat (fun a : nat => @eq nat O (Init.Nat.mul (S (S O)) a)) *)
exists 0.
(* Goal: @eq nat O (Init.Nat.mul (S (S O)) O) *)
reflexivity.
(* BG Goal: or (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
-
(* Goal: or (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
destruct IHn as [[a E] | [a E]].
(* Goal: or (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
(* Goal: or (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
+
(* Goal: or (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
right.
(* Goal: @ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O))) *)
exists a.
(* Goal: @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)) *)
omega.
(* BG Goal: or (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
+
(* Goal: or (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a))) (@ex nat (fun a : nat => @eq nat (S n) (Init.Nat.add (Init.Nat.mul (S (S O)) a) (S O)))) *)
left.
(* Goal: @ex nat (fun a : nat => @eq nat (S n) (Init.Nat.mul (S (S O)) a)) *)
exists (S a).
(* Goal: @eq nat (S n) (Init.Nat.mul (S (S O)) (S a)) *)
omega.
Qed.
Lemma mul_div_undo: forall i c,
c <> 0 ->
c * i / c = i.
Proof.
(* Goal: forall (i c : nat) (_ : not (@eq nat c O)), @eq nat (Nat.div (Init.Nat.mul c i) c) i *)
intros.
(* Goal: @eq nat (Nat.div (Init.Nat.mul c i) c) i *)
pose proof (Nat.div_mul_cancel_l i 1 c) as P.
(* Goal: @eq nat (Nat.div (Init.Nat.mul c i) c) i *)
rewrite Nat.div_1_r in P.
(* Goal: @eq nat (Nat.div (Init.Nat.mul c i) c) i *)
rewrite Nat.mul_1_r in P.
(* Goal: @eq nat (Nat.div (Init.Nat.mul c i) c) i *)
apply P; auto.
Qed.
Lemma mod_add_r: forall a b,
b <> 0 ->
(a + b) mod b = a mod b.
Proof.
(* Goal: forall (a b : nat) (_ : not (@eq nat b O)), @eq nat (Nat.modulo (Init.Nat.add a b) b) (Nat.modulo a b) *)
intros.
(* Goal: @eq nat (Nat.modulo (Init.Nat.add a b) b) (Nat.modulo a b) *)
rewrite <- Nat.add_mod_idemp_r by omega.
(* Goal: @eq nat (Nat.modulo (Nat.add a (Nat.modulo b b)) b) (Nat.modulo a b) *)
rewrite Nat.mod_same by omega.
(* Goal: @eq nat (Nat.modulo (Nat.add a O) b) (Nat.modulo a b) *)
rewrite Nat.add_0_r.
(* Goal: @eq nat (Nat.modulo a b) (Nat.modulo a b) *)
reflexivity.
Qed.
Lemma mod2_cases: forall (n: nat), n mod 2 = 0 \/ n mod 2 = 1.
Proof.
(* Goal: forall n : nat, or (@eq nat (Nat.modulo n (S (S O))) O) (@eq nat (Nat.modulo n (S (S O))) (S O)) *)
intros.
(* Goal: or (@eq nat (Nat.modulo n (S (S O))) O) (@eq nat (Nat.modulo n (S (S O))) (S O)) *)
assert (n mod 2 < 2).
(* Goal: or (@eq nat (Nat.modulo n (S (S O))) O) (@eq nat (Nat.modulo n (S (S O))) (S O)) *)
(* Goal: lt (Nat.modulo n (S (S O))) (S (S O)) *)
{
(* Goal: lt (Nat.modulo n (S (S O))) (S (S O)) *)
apply Nat.mod_upper_bound.
(* Goal: not (@eq nat (S (S O)) O) *)
congruence.
(* BG Goal: or (@eq nat (Nat.modulo n (S (S O))) O) (@eq nat (Nat.modulo n (S (S O))) (S O)) *)
}
(* Goal: or (@eq nat (Nat.modulo n (S (S O))) O) (@eq nat (Nat.modulo n (S (S O))) (S O)) *)
omega.
Qed.
Lemma div_mul_undo: forall a b,
b <> 0 ->
a mod b = 0 ->
a / b * b = a.
Proof.
(* Goal: forall (a b : nat) (_ : not (@eq nat b O)) (_ : @eq nat (Nat.modulo a b) O), @eq nat (Init.Nat.mul (Nat.div a b) b) a *)
intros.
(* Goal: @eq nat (Init.Nat.mul (Nat.div a b) b) a *)
pose proof Nat.div_mul_cancel_l as A.
(* Goal: @eq nat (Init.Nat.mul (Nat.div a b) b) a *)
specialize (A a 1 b).
(* Goal: @eq nat (Init.Nat.mul (Nat.div a b) b) a *)
replace (b * 1) with b in A by omega.
(* Goal: @eq nat (Init.Nat.mul (Nat.div a b) b) a *)
rewrite Nat.div_1_r in A.
(* Goal: @eq nat (Init.Nat.mul (Nat.div a b) b) a *)
rewrite mult_comm.
(* Goal: @eq nat (Nat.mul b (Nat.div a b)) a *)
rewrite <- Nat.divide_div_mul_exact; try assumption.
(* Goal: Nat.divide b a *)
(* Goal: @eq nat (Nat.div (Nat.mul b a) b) a *)
-
(* Goal: @eq nat (Nat.div (Nat.mul b a) b) a *)
apply A; congruence.
(* BG Goal: Nat.divide b a *)
-
(* Goal: Nat.divide b a *)
apply Nat.mod_divide; assumption.
Qed.
Lemma Smod2_1: forall k, S k mod 2 = 1 -> k mod 2 = 0.
Proof.
(* Goal: forall (k : nat) (_ : @eq nat (Nat.modulo (S k) (S (S O))) (S O)), @eq nat (Nat.modulo k (S (S O))) O *)
intros k C.
(* Goal: @eq nat (Nat.modulo k (S (S O))) O *)
change (S k) with (1 + k) in C.
(* Goal: @eq nat (Nat.modulo k (S (S O))) O *)
rewrite Nat.add_mod in C by congruence.
(* Goal: @eq nat (Nat.modulo k (S (S O))) O *)
pose proof (Nat.mod_upper_bound k 2).
(* Goal: @eq nat (Nat.modulo k (S (S O))) O *)
assert (k mod 2 = 0 \/ k mod 2 = 1) as E by omega.
(* Goal: @eq nat (Nat.modulo k (S (S O))) O *)
destruct E as [E | E]; [assumption|].
(* Goal: @eq nat (Nat.modulo k (S (S O))) O *)
rewrite E in C.
(* Goal: @eq nat (Nat.modulo k (S (S O))) O *)
simpl in C.
(* Goal: @eq nat (Nat.modulo k (S (S O))) O *)
discriminate.
Qed.
Lemma mod_0_r: forall (m: nat),
m mod 0 = 0.
Proof.
(* Goal: forall m : nat, @eq nat (Nat.modulo m O) O *)
intros.
(* Goal: @eq nat (Nat.modulo m O) O *)
reflexivity.
Qed.
Lemma sub_mod_0: forall (a b m: nat),
a mod m = 0 ->
b mod m = 0 ->
(a - b) mod m = 0.
Proof.
(* Goal: forall (a b m : nat) (_ : @eq nat (Nat.modulo a m) O) (_ : @eq nat (Nat.modulo b m) O), @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
intros.
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
assert (m = 0 \/ m <> 0) as C by omega.
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
destruct C as [C | C].
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
-
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
subst.
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) O) O *)
apply mod_0_r.
(* BG Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
-
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
assert (a - b = 0 \/ b < a) as D by omega.
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
destruct D as [D | D].
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
+
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
rewrite D.
(* Goal: @eq nat (Nat.modulo O m) O *)
apply Nat.mod_0_l.
(* Goal: not (@eq nat m O) *)
assumption.
(* BG Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
+
(* Goal: @eq nat (Nat.modulo (Init.Nat.sub a b) m) O *)
apply Nat2Z.inj.
(* Goal: @eq Z (Z.of_nat (Nat.modulo (Init.Nat.sub a b) m)) (Z.of_nat O) *)
simpl.
(* Goal: @eq Z (Z.of_nat (Nat.modulo (Init.Nat.sub a b) m)) Z0 *)
rewrite Zdiv.mod_Zmod by assumption.
(* Goal: @eq Z (Z.modulo (Z.of_nat (Init.Nat.sub a b)) (Z.of_nat m)) Z0 *)
rewrite Nat2Z.inj_sub by omega.
(* Goal: @eq Z (Z.modulo (Z.sub (Z.of_nat a) (Z.of_nat b)) (Z.of_nat m)) Z0 *)
rewrite Zdiv.Zminus_mod.
(* Goal: @eq Z (Z.modulo (Z.sub (Z.modulo (Z.of_nat a) (Z.of_nat m)) (Z.modulo (Z.of_nat b) (Z.of_nat m))) (Z.of_nat m)) Z0 *)
rewrite <-! Zdiv.mod_Zmod by assumption.
(* Goal: @eq Z (Z.modulo (Z.sub (Z.of_nat (Nat.modulo a m)) (Z.of_nat (Nat.modulo b m))) (Z.of_nat m)) Z0 *)
rewrite H.
(* Goal: @eq Z (Z.modulo (Z.sub (Z.of_nat O) (Z.of_nat (Nat.modulo b m))) (Z.of_nat m)) Z0 *)
rewrite H0.
(* Goal: @eq Z (Z.modulo (Z.sub (Z.of_nat O) (Z.of_nat O)) (Z.of_nat m)) Z0 *)
apply Z.mod_0_l.
(* Goal: not (@eq Z (Z.of_nat m) Z0) *)
omega.
Qed.
Lemma mul_div_exact: forall (a b: nat),
b <> 0 ->
a mod b = 0 ->
b * (a / b) = a.
|
Require Import Ensf.
Require Import Max.
Require Import Words.
Require Import fonctions.
Require Import need.
Require Import Relations.
Section pushdown_automata.
Variable X P : Ensf.
Variable wd : Word.
Variable wa : Word.
Variable d : Ensf.
Definition eps := natural (sup X).
Lemma not_dans_X_eps : ~ dans eps X.
Proof.
(* Goal: not (dans eps X) *)
unfold eps in |- *.
(* Goal: not (dans (natural (sup X)) X) *)
apply sup_out.
Qed.
Definition Transition : Prop :=
forall x : Elt,
dans x d ->
exists2 w1 : Word,
inmonoid P w1 &
(exists2 y : Elt,
dans y (add eps X) &
(exists2 w2 : Word,
inmonoid P w2 & x = couple (word w1) (couple y (word w2)) :>Elt)).
Definition P_automata := inmonoid P wd /\ inmonoid P wa /\ Transition.
Lemma P_automata_1 : P_automata -> inmonoid P wd.
Proof.
(* Goal: forall _ : P_automata, inmonoid P wd *)
unfold P_automata in |- *.
(* Goal: forall _ : and (inmonoid P wd) (and (inmonoid P wa) Transition), inmonoid P wd *)
intro temp; elim temp.
(* Goal: forall (_ : inmonoid P wd) (_ : and (inmonoid P wa) Transition), inmonoid P wd *)
auto.
Qed.
Lemma P_automata_2 : P_automata -> Transition.
Proof.
(* Goal: forall _ : P_automata, Transition *)
unfold P_automata in |- *.
(* Goal: forall _ : and (inmonoid P wd) (and (inmonoid P wa) Transition), Transition *)
intro temp; elim temp; clear temp.
(* Goal: forall (_ : inmonoid P wd) (_ : and (inmonoid P wa) Transition), Transition *)
intros H temp; elim temp; clear temp.
(* Goal: forall (_ : inmonoid P wa) (_ : Transition), Transition *)
auto.
Qed.
Definition Conf := (Word * Word)%type.
Inductive Derive_P_A : Conf -> Conf -> Prop :=
| Derive_cons :
forall (w w1 w2 u : Word) (x : Elt),
dans x X ->
dans (couple (word w1) (couple x (word w2))) d ->
Derive_P_A (pair (Append w1 w) (cons x u)) (pair (Append w2 w) u)
| Derive_eps :
forall w w1 w2 u : Word,
dans (couple (word w1) (couple eps (word w2))) d ->
Derive_P_A (pair (Append w1 w) u) (pair (Append w2 w) u).
Definition Derivestar_P_A := Rstar Conf Derive_P_A.
Definition LA (u : Word) :=
Derivestar_P_A (pair wd u) (pair wa nil) /\ inmonoid X u.
Lemma LA_langage : islanguage X LA.
Proof.
(* Goal: islanguage X LA *)
unfold LA, islanguage in |- *.
(* Goal: forall (w : Word) (_ : and (Derivestar_P_A (@pair Word Word wd w) (@pair Word Word wa nil)) (inmonoid X w)), inmonoid X w *)
intros w temp; elim temp; clear temp; auto.
Qed.
End pushdown_automata. |
Require Import ZArith.
Require Import ZArithRing.
Require Import Zcomplements.
Unset Standard Proposition Elimination Names.
Inductive divide (a b : Z) : Prop :=
divide_intro : forall q : Z, b = (q * a)%Z -> divide a b.
Notation "( x | y )" := (divide x y) (at level 0) : Z_scope.
Local Open Scope Z_scope.
Lemma divide_refl : forall a : Z, (a | a).
Proof.
(* Goal: forall a : Z, divide a a *)
intros; apply divide_intro with 1; ring.
Qed.
Lemma one_divide : forall a : Z, (1 | a).
Proof.
(* Goal: forall a : Z, divide (Zpos xH) a *)
intros; apply divide_intro with a; ring.
Qed.
Lemma divide_0 : forall a : Z, (a | 0).
Proof.
(* Goal: forall a : Z, divide a Z0 *)
intros; apply divide_intro with 0; ring.
Qed.
Hint Resolve divide_refl one_divide divide_0.
Lemma divide_mult_left : forall a b c : Z, (a | b) -> (c * a | c * b).
Proof.
(* Goal: forall (a b c : Z) (_ : divide a b), divide (Z.mul c a) (Z.mul c b) *)
simple induction 1; intros; apply divide_intro with q.
(* Goal: @eq Z (Z.mul c b) (Z.mul q (Z.mul c a)) *)
rewrite H0; ring.
Qed.
Lemma divide_mult_right : forall a b c : Z, (a | b) -> (a * c | b * c).
Proof.
(* Goal: forall (a b c : Z) (_ : divide a b), divide (Z.mul a c) (Z.mul b c) *)
intros a b c; rewrite (Zmult_comm a c); rewrite (Zmult_comm b c).
(* Goal: forall _ : divide a b, divide (Z.mul c a) (Z.mul c b) *)
apply divide_mult_left; trivial.
Qed.
Hint Resolve divide_mult_left divide_mult_right.
Lemma divide_plus : forall a b c : Z, (a | b) -> (a | c) -> (a | b + c).
Proof.
(* Goal: forall (a b c : Z) (_ : divide a b) (_ : divide a c), divide a (Z.add b c) *)
simple induction 1; intros q Hq; simple induction 1; intros q' Hq'.
(* Goal: divide a (Z.add b c) *)
apply divide_intro with (q + q').
(* Goal: @eq Z (Z.add b c) (Z.mul (Z.add q q') a) *)
rewrite Hq; rewrite Hq'; ring.
Qed.
Lemma divide_opp : forall a b : Z, (a | b) -> (a | - b).
Proof.
(* Goal: forall (a b : Z) (_ : divide a b), divide a (Z.opp b) *)
simple induction 1; intros; apply divide_intro with (- q).
(* Goal: @eq Z (Z.opp b) (Z.mul (Z.opp q) a) *)
rewrite H0; ring.
Qed.
Lemma divide_opp_rev : forall a b : Z, (a | - b) -> (a | b).
Proof.
(* Goal: forall (a b : Z) (_ : divide a (Z.opp b)), divide a b *)
intros; replace b with (- - b).
(* Goal: @eq Z (Z.opp (Z.opp b)) b *)
(* Goal: divide a (Z.opp (Z.opp b)) *)
apply divide_opp; trivial.
(* Goal: @eq Z (Z.opp (Z.opp b)) b *)
ring.
Qed.
Lemma divide_opp_left : forall a b : Z, (a | b) -> (- a | b).
Proof.
(* Goal: forall (a b : Z) (_ : divide a b), divide (Z.opp a) b *)
simple induction 1; intros; apply divide_intro with (- q).
(* Goal: @eq Z b (Z.mul (Z.opp q) (Z.opp a)) *)
rewrite H0; ring.
Qed.
Lemma divide_opp_left_rev : forall a b : Z, (- a | b) -> (a | b).
Proof.
(* Goal: forall (a b : Z) (_ : divide (Z.opp a) b), divide a b *)
intros; replace a with (- - a).
(* Goal: @eq Z (Z.opp (Z.opp a)) a *)
(* Goal: divide (Z.opp (Z.opp a)) b *)
apply divide_opp_left; trivial.
(* Goal: @eq Z (Z.opp (Z.opp a)) a *)
ring.
Qed.
Lemma divide_minus : forall a b c : Z, (a | b) -> (a | c) -> (a | b - c).
Proof.
(* Goal: forall (a b c : Z) (_ : divide a b) (_ : divide a c), divide a (Z.sub b c) *)
simple induction 1; intros q Hq; simple induction 1; intros q' Hq'.
(* Goal: divide a (Z.sub b c) *)
apply divide_intro with (q - q').
(* Goal: @eq Z (Z.sub b c) (Z.mul (Z.sub q q') a) *)
rewrite Hq; rewrite Hq'; ring.
Qed.
Lemma divide_left : forall a b c : Z, (a | b) -> (a | b * c).
Proof.
(* Goal: forall (a b c : Z) (_ : divide a b), divide a (Z.mul b c) *)
simple induction 1; intros q Hq; apply divide_intro with (q * c).
(* Goal: @eq Z (Z.mul b c) (Z.mul (Z.mul q c) a) *)
rewrite Hq; ring.
Qed.
Lemma divide_right : forall a b c : Z, (a | c) -> (a | b * c).
Proof.
(* Goal: forall (a b c : Z) (_ : divide a c), divide a (Z.mul b c) *)
simple induction 1; intros q Hq; apply divide_intro with (q * b).
(* Goal: @eq Z (Z.mul b c) (Z.mul (Z.mul q b) a) *)
rewrite Hq; ring.
Qed.
Lemma divide_a_ab : forall a b : Z, (a | a * b).
Proof.
(* Goal: forall a b : Z, divide a (Z.mul a b) *)
intros; apply divide_intro with b; ring.
Qed.
Lemma divide_a_ba : forall a b : Z, (a | b * a).
Proof.
(* Goal: forall a b : Z, divide a (Z.mul b a) *)
intros; apply divide_intro with b; ring.
Qed.
Hint Resolve divide_plus divide_opp divide_opp_rev divide_opp_left
divide_opp_left_rev divide_minus divide_left divide_right divide_a_ab
divide_a_ba.
Lemma z_case_0_1 :
forall x : Z, x <= -2 \/ x = -1 \/ x = 0 \/ x = 1 \/ x >= 2.
Proof.
(* Goal: forall x : Z, or (Z.le x (Zneg (xO xH))) (or (@eq Z x (Zneg xH)) (or (@eq Z x Z0) (or (@eq Z x (Zpos xH)) (Z.ge x (Zpos (xO xH)))))) *)
intro; omega.
Qed.
Lemma z_case_0 : forall x : Z, x <= -1 \/ x = 0 \/ x >= 1.
Proof.
(* Goal: forall x : Z, or (Z.le x (Zneg xH)) (or (@eq Z x Z0) (Z.ge x (Zpos xH))) *)
intro; omega.
Qed.
Lemma divide_1 : forall x : Z, (x | 1) -> x = 1 \/ x = -1.
Proof.
(* Goal: forall (x : Z) (_ : divide x (Zpos xH)), or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
simple induction 1; intros.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
elim (z_case_0_1 x); intuition; elim (z_case_0 q); intuition.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
assert (q * x >= 1 * 2).
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: Z.ge (Z.mul q x) (Z.mul (Zpos xH) (Zpos (xO xH))) *)
replace (q * x) with (- q * - x); try ring.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: Z.ge (Z.mul (Z.opp q) (Z.opp x)) (Z.mul (Zpos xH) (Zpos (xO xH))) *)
apply Zmult_ge_compat; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
rewrite H3 in H0; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
assert (- (q * x) >= 1 * 2).
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: Z.ge (Z.opp (Z.mul q x)) (Z.mul (Zpos xH) (Zpos (xO xH))) *)
replace (- (q * x)) with (q * - x); try ring.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: Z.ge (Z.mul q (Z.opp x)) (Z.mul (Zpos xH) (Zpos (xO xH))) *)
apply Zmult_ge_compat; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
rewrite H1 in H0; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
rewrite H1 in H0; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
rewrite H1 in H0; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
assert (- (q * x) >= 1 * 2).
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: Z.ge (Z.opp (Z.mul q x)) (Z.mul (Zpos xH) (Zpos (xO xH))) *)
replace (- (q * x)) with (- q * x); try ring.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: Z.ge (Z.mul (Z.opp q) x) (Z.mul (Zpos xH) (Zpos (xO xH))) *)
apply Zmult_ge_compat; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
rewrite H3 in H0; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
assert (q * x >= 1 * 2).
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
(* Goal: Z.ge (Z.mul q x) (Z.mul (Zpos xH) (Zpos (xO xH))) *)
apply Zmult_ge_compat; omega.
(* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *)
omega.
Qed.
Lemma divide_antisym : forall a b : Z, (a | b) -> (b | a) -> a = b \/ a = - b.
Proof.
(* Goal: forall (a b : Z) (_ : divide a b) (_ : divide b a), or (@eq Z a b) (@eq Z a (Z.opp b)) *)
simple induction 1; intros.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
inversion H1.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
rewrite H0 in H2; clear H H1.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
case (Z_zerop a); intro.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
left; rewrite H0; rewrite e; ring.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
assert (Hqq0 : q0 * q = 1).
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
(* Goal: @eq Z (Z.mul q0 q) (Zpos xH) *)
apply Zmult_reg_l with a.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
(* Goal: @eq Z (Z.mul a (Z.mul q0 q)) (Z.mul a (Zpos xH)) *)
(* Goal: not (@eq Z a Z0) *)
assumption.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
(* Goal: @eq Z (Z.mul a (Z.mul q0 q)) (Z.mul a (Zpos xH)) *)
ring_simplify.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
(* Goal: @eq Z (Z.mul (Z.mul a q0) q) a *)
pattern a at 2 in |- *; rewrite H2; ring.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
assert (q | 1).
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
(* Goal: divide q (Zpos xH) *)
rewrite <- Hqq0; auto.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
elim (divide_1 q H); intros.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
rewrite H1 in H0; left; omega.
(* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *)
rewrite H1 in H0; right; omega.
Qed.
Lemma Zabs_ind :
forall (P : Z -> Prop) (x : Z),
(x >= 0 -> P x) -> (x <= 0 -> P (- x)) -> P (Zabs x).
Proof.
(* Goal: forall (P : forall _ : Z, Prop) (x : Z) (_ : forall _ : Z.ge x Z0, P x) (_ : forall _ : Z.le x Z0, P (Z.opp x)), P (Z.abs x) *)
intros; elim (Z_lt_ge_dec x 0); intro.
(* Goal: P (Z.abs x) *)
(* Goal: P (Z.abs x) *)
rewrite Zabs_non_eq.
(* Goal: P (Z.abs x) *)
(* Goal: Z.le x Z0 *)
(* Goal: P (Z.opp x) *)
apply H0; omega.
(* Goal: P (Z.abs x) *)
(* Goal: Z.le x Z0 *)
omega.
(* Goal: P (Z.abs x) *)
rewrite Zabs_eq.
(* Goal: Z.le Z0 x *)
(* Goal: P x *)
apply H; assumption.
(* Goal: Z.le Z0 x *)
omega.
Qed.
Lemma divide_bounds : forall a b : Z, (a | b) -> b <> 0 -> Zabs a <= Zabs b.
Proof.
(* Goal: forall (a b : Z) (_ : divide a b) (_ : not (@eq Z b Z0)), Z.le (Z.abs a) (Z.abs b) *)
simple induction 1; intros.
(* Goal: Z.le (Z.abs a) (Z.abs b) *)
pattern (Zabs a) in |- *; apply Zabs_ind; pattern (Zabs b) in |- *; apply Zabs_ind; intros.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
elim (z_case_0 q); intro.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
(* Goal: Z.le a b *)
assert (- b >= 1 * 0).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
(* Goal: Z.le a b *)
(* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) Z0) *)
replace (- b) with (- q * a).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
(* Goal: Z.le a b *)
(* Goal: @eq Z (Z.mul (Z.opp q) a) (Z.opp b) *)
(* Goal: Z.ge (Z.mul (Z.opp q) a) (Z.mul (Zpos xH) Z0) *)
apply Zmult_ge_compat; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
(* Goal: Z.le a b *)
(* Goal: @eq Z (Z.mul (Z.opp q) a) (Z.opp b) *)
rewrite H0; ring.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
(* Goal: Z.le a b *)
omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
elim H4; intro; clear H4.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
(* Goal: Z.le a b *)
rewrite H5 in H0; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a b *)
apply Zge_le.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.ge b a *)
replace a with (1 * a).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Zpos xH) a) a *)
(* Goal: Z.ge b (Z.mul (Zpos xH) a) *)
rewrite H0.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Zpos xH) a) a *)
(* Goal: Z.ge (Z.mul q a) (Z.mul (Zpos xH) a) *)
apply Zmult_ge_compat; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Zpos xH) a) a *)
ring.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
elim (z_case_0 q); intro.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a (Z.opp b) *)
apply Zge_le.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.ge (Z.opp b) a *)
replace a with (1 * a).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Zpos xH) a) a *)
(* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) a) *)
rewrite H0.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Zpos xH) a) a *)
(* Goal: Z.ge (Z.opp (Z.mul q a)) (Z.mul (Zpos xH) a) *)
replace (- (q * a)) with (- q * a).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Zpos xH) a) a *)
(* Goal: @eq Z (Z.mul (Z.opp q) a) (Z.opp (Z.mul q a)) *)
(* Goal: Z.ge (Z.mul (Z.opp q) a) (Z.mul (Zpos xH) a) *)
apply Zmult_ge_compat; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Zpos xH) a) a *)
(* Goal: @eq Z (Z.mul (Z.opp q) a) (Z.opp (Z.mul q a)) *)
ring.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Zpos xH) a) a *)
ring.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
elim H4; intro; clear H4.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.le a (Z.opp b) *)
rewrite H5 in H0; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
assert (b >= 1 * 0).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.ge b (Z.mul (Zpos xH) Z0) *)
rewrite H0.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
(* Goal: Z.ge (Z.mul q a) (Z.mul (Zpos xH) Z0) *)
apply Zmult_ge_compat; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le a (Z.opp b) *)
omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
elim (z_case_0 q); intro.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le (Z.opp a) b *)
apply Zge_le.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.ge b (Z.opp a) *)
replace (- a) with (1 * - a).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
(* Goal: Z.ge b (Z.mul (Zpos xH) (Z.opp a)) *)
rewrite H0.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
(* Goal: Z.ge (Z.mul q a) (Z.mul (Zpos xH) (Z.opp a)) *)
replace (q * a) with (- q * - a).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
(* Goal: @eq Z (Z.mul (Z.opp q) (Z.opp a)) (Z.mul q a) *)
(* Goal: Z.ge (Z.mul (Z.opp q) (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *)
apply Zmult_ge_compat; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
(* Goal: @eq Z (Z.mul (Z.opp q) (Z.opp a)) (Z.mul q a) *)
ring.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
ring.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
elim H4; intro; clear H4.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.le (Z.opp a) b *)
rewrite H5 in H0; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
assert (- b >= 1 * 0).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) Z0) *)
rewrite H0.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: Z.ge (Z.opp (Z.mul q a)) (Z.mul (Zpos xH) Z0) *)
replace (- (q * a)) with (q * - a).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *)
(* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) Z0) *)
apply Zmult_ge_compat; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
(* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *)
ring.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) b *)
omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
elim (z_case_0 q); intro.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
assert (b >= 1 * 0).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.ge b (Z.mul (Zpos xH) Z0) *)
rewrite H0.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.ge (Z.mul q a) (Z.mul (Zpos xH) Z0) *)
replace (q * a) with (- q * - a).
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Z.opp q) (Z.opp a)) (Z.mul q a) *)
(* Goal: Z.ge (Z.mul (Z.opp q) (Z.opp a)) (Z.mul (Zpos xH) Z0) *)
apply Zmult_ge_compat; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: @eq Z (Z.mul (Z.opp q) (Z.opp a)) (Z.mul q a) *)
ring.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
elim H4; intro; clear H4.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
rewrite H5 in H0; omega.
(* Goal: Z.le (Z.opp a) (Z.opp b) *)
apply Zge_le.
(* Goal: Z.ge (Z.opp b) (Z.opp a) *)
replace (- a) with (1 * - a).
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
(* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) (Z.opp a)) *)
rewrite H0.
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
(* Goal: Z.ge (Z.opp (Z.mul q a)) (Z.mul (Zpos xH) (Z.opp a)) *)
replace (- (q * a)) with (q * - a).
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
(* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *)
(* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *)
apply Zmult_ge_compat; omega.
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
(* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *)
ring.
(* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *)
ring.
Qed.
|
Lemma pair_fst_snd : forall (A B : Set) (c : A * B), (fst c, snd c) = c.
Proof.
(* Goal: forall (A B : Set) (c : prod A B), @eq (prod A B) (@pair A B (@fst A B c) (@snd A B c)) c *)
intros.
(* Goal: @eq (prod A B) (@pair A B (@fst A B c) (@snd A B c)) c *)
pattern c in |- *; elim c; auto.
Qed.
Inductive prod_3 (A B C : Set) : Set :=
triplet : A -> B -> C -> prod_3 A B C.
Section programming_3.
Variable A B C : Set.
Theorem fst_3 : prod_3 A B C -> A.
Proof.
(* Goal: forall _ : prod_3 A B C, A *)
simple induction 1; try trivial.
Qed.
Theorem snd_3 : prod_3 A B C -> B.
Proof.
(* Goal: forall _ : prod_3 A B C, B *)
simple induction 1; try trivial.
Qed.
Theorem thd_3 : prod_3 A B C -> C.
Proof.
(* Goal: forall _ : prod_3 A B C, C *)
simple induction 1; try trivial.
Qed.
End programming_3.
Notation Fst_3 := (fst_3 _ _ _) (only parsing).
Notation Snd_3 := (snd_3 _ _ _) (only parsing).
Notation Thd_3 := (thd_3 _ _ _) (only parsing).
Notation Triplet := (triplet _ _ _) (only parsing).
Lemma triplet_fst_snd_thd :
forall (A B C : Set) (c : prod_3 A B C),
triplet _ _ _ (fst_3 _ _ _ c) (snd_3 _ _ _ c) (thd_3 _ _ _ c) = c.
Proof.
(* Goal: forall (A B C : Set) (c : prod_3 A B C), @eq (prod_3 A B C) (triplet A B C (fst_3 A B C c) (snd_3 A B C c) (thd_3 A B C c)) c *)
intros.
(* Goal: @eq (prod_3 A B C) (triplet A B C (fst_3 A B C c) (snd_3 A B C c) (thd_3 A B C c)) c *)
pattern c in |- *; elim c; auto.
Qed.
Definition ifProp (C : Type) (b : bool) (x y : C) : C :=
match b return C with
| true => x
| false => y
end.
Lemma ifProp_or : forall (b : bool) (P Q : Prop), ifProp Prop b P Q -> P \/ Q.
Proof.
(* Goal: forall (b : bool) (P Q : Prop) (_ : ifProp Prop b P Q), or P Q *)
simple induction b; auto.
Qed.
|
Require Export GeoCoq.Tarski_dev.Ch13_3_angles.
Ltac anga_instance_o a A B P C :=
assert(tempo_anga:= anga_const_o a A B P);
match goal with
|H: Q_CongA_Acute a |- _ => assert(tempo_H:= H); apply tempo_anga in tempo_H; ex_elim tempo_H C
end;
clear tempo_anga.
Section Cosinus.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma l13_6 : forall a lc ld l, Lcos lc l a -> Lcos ld l a -> EqL lc ld.
Lemma null_lcos_eql : forall lp l a, Lcos lp l a -> Q_CongA_Null_Acute a -> EqL l lp.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos Tn lp l a) (_ : @Q_CongA_Null_Acute Tn a), @EqL Tn l lp *)
intros.
(* Goal: @EqL Tn l lp *)
unfold Lcos in H.
(* Goal: @EqL Tn l lp *)
spliter.
(* Goal: @EqL Tn l lp *)
ex_and H3 A.
(* Goal: @EqL Tn l lp *)
ex_and H4 B.
(* Goal: @EqL Tn l lp *)
ex_and H3 C.
(* Goal: @EqL Tn l lp *)
unfold Q_CongA_Null_Acute in H0.
(* Goal: @EqL Tn l lp *)
spliter.
(* Goal: @EqL Tn l lp *)
assert(HH:= H7 B A C H6).
(* Goal: @EqL Tn l lp *)
assert(Col A B C) by (apply out_col;auto).
(* Goal: @EqL Tn l lp *)
assert(Col C B A) by Col.
(* Goal: @EqL Tn l lp *)
assert(HQ:= l8_9 C B A H3 H9).
(* Goal: @EqL Tn l lp *)
induction HQ.
(* Goal: @EqL Tn l lp *)
(* Goal: @EqL Tn l lp *)
subst C.
(* Goal: @EqL Tn l lp *)
(* Goal: @EqL Tn l lp *)
apply (all_eql A B).
(* Goal: @EqL Tn l lp *)
(* Goal: @Len Tn A B lp *)
(* Goal: @Len Tn A B l *)
split; auto.
(* Goal: @EqL Tn l lp *)
(* Goal: @Len Tn A B lp *)
split; auto.
(* Goal: @EqL Tn l lp *)
subst B.
(* Goal: @EqL Tn l lp *)
exfalso.
(* Goal: False *)
unfold Out in HH.
(* Goal: False *)
tauto.
Qed.
Lemma eql_lcos_null : forall l lp a, Lcos l lp a -> EqL l lp -> Q_CongA_Null_Acute a.
Lemma lcos_lg_not_null: forall l lp a, Lcos l lp a -> ~ Q_Cong_Null l /\ ~ Q_Cong_Null lp.
Proof.
(* Goal: forall (l lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos Tn l lp a), and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
intros.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
unfold Lcos in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
spliter.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
ex_and H2 A.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
ex_and H3 B.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
ex_and H2 C.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
assert(HH:= anga_distinct a B A C H1 H5).
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
spliter.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
unfold Q_Cong_Null.
(* Goal: and (not (and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)))) (not (and (@Q_Cong Tn lp) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A)))) *)
split; intro; spliter; ex_and H9 X.
(* Goal: False *)
(* Goal: False *)
assert (Cong A B X X) by (apply (lg_cong l); auto).
(* Goal: False *)
(* Goal: False *)
treat_equalities;intuition.
(* Goal: False *)
assert(Cong A C X X) by (apply (lg_cong lp); auto).
(* Goal: False *)
treat_equalities;intuition.
Qed.
Lemma perp_acute_out : forall A B C C', Acute A B C -> Perp A B C C' -> Col A B C' -> Out B A C'.
Proof.
(* Goal: forall (A B C C' : @Tpoint Tn) (_ : @Acute Tn A B C) (_ : @Perp Tn A B C C') (_ : @Col Tn A B C'), @Out Tn B A C' *)
intros.
(* Goal: @Out Tn B A C' *)
apply l6_6.
(* Goal: @Out Tn B C' A *)
apply acute_col_perp__out with C.
(* Goal: @Perp Tn B A C C' *)
(* Goal: @Col Tn B A C' *)
(* Goal: @Acute Tn C B A *)
apply acute_sym.
(* Goal: @Perp Tn B A C C' *)
(* Goal: @Col Tn B A C' *)
(* Goal: @Acute Tn A B C *)
assumption.
(* Goal: @Perp Tn B A C C' *)
(* Goal: @Col Tn B A C' *)
Col.
(* Goal: @Perp Tn B A C C' *)
Perp.
Qed.
End Cosinus.
Require Import Morphisms.
Section Cosinus2.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma perp_out__acute : forall A B C C', Perp A B C C' -> Col A B C' -> (Acute A B C <-> Out B A C').
Proof.
(* Goal: forall (A B C C' : @Tpoint Tn) (_ : @Perp Tn A B C C') (_ : @Col Tn A B C'), iff (@Acute Tn A B C) (@Out Tn B A C') *)
intros.
(* Goal: iff (@Acute Tn A B C) (@Out Tn B A C') *)
split.
(* Goal: forall _ : @Out Tn B A C', @Acute Tn A B C *)
(* Goal: forall _ : @Acute Tn A B C, @Out Tn B A C' *)
intro.
(* Goal: forall _ : @Out Tn B A C', @Acute Tn A B C *)
(* Goal: @Out Tn B A C' *)
apply (perp_acute_out _ _ C); auto.
(* Goal: forall _ : @Out Tn B A C', @Acute Tn A B C *)
intro.
(* Goal: @Acute Tn A B C *)
apply (perp_out_acute _ _ C C'); auto.
Qed.
Lemma obtuse_not_acute : forall A B C, Obtuse A B C -> ~ Acute A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Obtuse Tn A B C), not (@Acute Tn A B C) *)
intros.
(* Goal: not (@Acute Tn A B C) *)
intro.
(* Goal: False *)
unfold Obtuse in H.
(* Goal: False *)
unfold Acute in H0.
(* Goal: False *)
ex_and H A0.
(* Goal: False *)
ex_and H1 B0.
(* Goal: False *)
ex_and H C0.
(* Goal: False *)
ex_and H0 A1.
(* Goal: False *)
ex_and H2 B1.
(* Goal: False *)
ex_and H0 C1.
(* Goal: False *)
assert(A0 <> B0 /\ C0 <> B0 /\ A1 <> B1 /\ C1 <> B1 /\ A <> B /\ C <> B).
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
unfold GtA in H1.
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
unfold LtA in *.
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
unfold LeA in *.
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
spliter.
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
ex_and H1 P0.
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
ex_and H2 P.
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
unfold InAngle in H2.
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
unfold CongA in H5 .
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
unfold CongA in H6 .
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
spliter.
(* Goal: False *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) C1 B1)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))))) *)
repeat split; auto.
(* Goal: False *)
spliter.
(* Goal: False *)
assert(CongA A0 B0 C0 A1 B1 C1).
(* Goal: False *)
(* Goal: @CongA Tn A0 B0 C0 A1 B1 C1 *)
apply l11_16; auto.
(* Goal: False *)
assert(GtA A B C A1 B1 C1).
(* Goal: False *)
(* Goal: @GtA Tn A B C A1 B1 C1 *)
apply (conga_preserves_gta A B C A0 B0 C0).
(* Goal: False *)
(* Goal: @GtA Tn A B C A0 B0 C0 *)
(* Goal: @CongA Tn A0 B0 C0 A1 B1 C1 *)
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
(* Goal: False *)
(* Goal: @GtA Tn A B C A0 B0 C0 *)
(* Goal: @CongA Tn A0 B0 C0 A1 B1 C1 *)
auto.
(* Goal: False *)
(* Goal: @GtA Tn A B C A0 B0 C0 *)
assumption.
(* Goal: False *)
assert(HH:=not_lta_and_gta A B C A1 B1 C1).
(* Goal: False *)
apply HH.
(* Goal: and (@LtA Tn A B C A1 B1 C1) (@GtA Tn A B C A1 B1 C1) *)
split; auto.
Qed.
Lemma acute_not_obtuse : forall A B C, Acute A B C -> ~ Obtuse A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Acute Tn A B C), not (@Obtuse Tn A B C) *)
intros.
(* Goal: not (@Obtuse Tn A B C) *)
intro.
(* Goal: False *)
apply obtuse_not_acute in H0.
(* Goal: False *)
contradiction.
Qed.
Lemma perp_obtuse_bet : forall A B C C', Perp A B C C' -> Col A B C' -> Obtuse A B C -> Bet A B C'.
Proof.
(* Goal: forall (A B C C' : @Tpoint Tn) (_ : @Perp Tn A B C C') (_ : @Col Tn A B C') (_ : @Obtuse Tn A B C), @Bet Tn A B C' *)
intros.
(* Goal: @Bet Tn A B C' *)
assert(HH:= H1).
(* Goal: @Bet Tn A B C' *)
unfold Obtuse in HH.
(* Goal: @Bet Tn A B C' *)
ex_and HH A0.
(* Goal: @Bet Tn A B C' *)
ex_and H2 B0.
(* Goal: @Bet Tn A B C' *)
ex_and H3 C0.
(* Goal: @Bet Tn A B C' *)
assert(A0 <> B0 /\ C0 <> B0 /\ A <> B /\ C <> B).
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
unfold GtA in H3.
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
unfold LtA in H3.
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
spliter.
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
unfold LeA in H3.
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
ex_and H3 P.
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
unfold CongA in H5.
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
spliter.
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)))) *)
repeat split; auto.
(* Goal: @Bet Tn A B C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
intro.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
subst C.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
apply perp_comm in H.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
apply perp_not_col in H.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
apply H.
(* Goal: @Bet Tn A B C' *)
(* Goal: @Col Tn B A C' *)
Col.
(* Goal: @Bet Tn A B C' *)
spliter.
(* Goal: @Bet Tn A B C' *)
assert(B <> C').
(* Goal: @Bet Tn A B C' *)
(* Goal: not (@eq (@Tpoint Tn) B C') *)
intro.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
subst C'.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
assert(Per A B C).
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
(* Goal: @Per Tn A B C *)
apply perp_in_per.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
(* Goal: @Perp_at Tn B A B B C *)
apply perp_in_comm.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
(* Goal: @Perp_at Tn B B A C B *)
apply perp_perp_in.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
(* Goal: @Perp Tn B A C B *)
Perp.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
assert(CongA A0 B0 C0 A B C).
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
(* Goal: @CongA Tn A0 B0 C0 A B C *)
apply l11_16; auto.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
unfold GtA in H3.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
unfold LtA in H3.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
spliter.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
unfold LeA in H3.
(* Goal: @Bet Tn A B C' *)
(* Goal: False *)
contradiction.
(* Goal: @Bet Tn A B C' *)
induction H0.
(* Goal: @Bet Tn A B C' *)
(* Goal: @Bet Tn A B C' *)
auto.
(* Goal: @Bet Tn A B C' *)
assert(Out B A C').
(* Goal: @Bet Tn A B C' *)
(* Goal: @Out Tn B A C' *)
unfold Out.
(* Goal: @Bet Tn A B C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C' B)) (or (@Bet Tn B A C') (@Bet Tn B C' A))) *)
repeat split; auto.
(* Goal: @Bet Tn A B C' *)
(* Goal: or (@Bet Tn B A C') (@Bet Tn B C' A) *)
induction H0.
(* Goal: @Bet Tn A B C' *)
(* Goal: or (@Bet Tn B A C') (@Bet Tn B C' A) *)
(* Goal: or (@Bet Tn B A C') (@Bet Tn B C' A) *)
right.
(* Goal: @Bet Tn A B C' *)
(* Goal: or (@Bet Tn B A C') (@Bet Tn B C' A) *)
(* Goal: @Bet Tn B C' A *)
auto.
(* Goal: @Bet Tn A B C' *)
(* Goal: or (@Bet Tn B A C') (@Bet Tn B C' A) *)
left.
(* Goal: @Bet Tn A B C' *)
(* Goal: @Bet Tn B A C' *)
Between.
(* Goal: @Bet Tn A B C' *)
eapply (perp_out_acute _ _ C) in H9.
(* Goal: @Perp Tn A B C C' *)
(* Goal: @Bet Tn A B C' *)
apply obtuse_not_acute in H1.
(* Goal: @Perp Tn A B C C' *)
(* Goal: @Bet Tn A B C' *)
contradiction.
(* Goal: @Perp Tn A B C C' *)
auto.
Qed.
Lemma lcos_const0 : forall l lp a, Lcos lp l a -> Q_CongA_Null_Acute a ->
exists A, exists B, exists C, l A B /\ lp B C /\ a A B C.
Lemma lcos_const1 : forall l lp a P, Lcos lp l a -> ~ Q_CongA_Null_Acute a ->
exists A, exists B, exists C, ~Col A B P /\ OS A B C P /\ l A B /\ lp B C /\ a A B C.
Proof.
(* Goal: forall (l lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (P : @Tpoint Tn) (_ : @Lcos Tn lp l a) (_ : not (@Q_CongA_Null_Acute Tn a)), @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
assert(HH:=H).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
unfold Lcos in HH.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
assert(HH:= (lcos_lg_not_null lp l a H)).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
lg_instance_not_col l P A B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C)))))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
assert(HH:=anga_const_o a A B P H8 H0 H3).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
ex_and HH C'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
assert(A <> B /\ B <> C').
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) B C')) *)
assert(HP:= anga_distinct a A B C' H3 H9).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) B C')) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) B C')) *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
assert(HH:=ex_point_lg_out lp B C' H12 H1 H5).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
ex_and HH C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C))))) *)
exists C.
(* Goal: and (not (@Col Tn A B P)) (and (@OS Tn A B C P) (and (l A B) (and (lp B C) (a A B C)))) *)
repeat split; auto.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
assert(~ Col A B C').
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
(* Goal: not (@Col Tn A B C') *)
unfold OS in H10.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
(* Goal: not (@Col Tn A B C') *)
ex_and H10 D.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
(* Goal: not (@Col Tn A B C') *)
unfold TS in H10.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
(* Goal: not (@Col Tn A B C') *)
spliter.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
(* Goal: not (@Col Tn A B C') *)
intro.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
(* Goal: False *)
apply H10.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
(* Goal: @Col Tn C' A B *)
Col.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
assert(HP:=out_one_side_1 A B C' C B H15).
(* Goal: a A B C *)
(* Goal: @OS Tn A B C P *)
eapply (one_side_transitivity _ _ _ C').
(* Goal: a A B C *)
(* Goal: @OS Tn A B C' P *)
(* Goal: @OS Tn A B C C' *)
apply one_side_symmetry.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C' P *)
(* Goal: @OS Tn A B C' C *)
apply HP.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C' P *)
(* Goal: @Out Tn B C' C *)
(* Goal: @Col Tn A B B *)
Col.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C' P *)
(* Goal: @Out Tn B C' C *)
apply l6_6.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C' P *)
(* Goal: @Out Tn B C C' *)
auto.
(* Goal: a A B C *)
(* Goal: @OS Tn A B C' P *)
auto.
(* Goal: a A B C *)
apply (anga_out_anga a A B C'); auto.
(* Goal: @Out Tn B C' C *)
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: @Out Tn B C' C *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
(* Goal: @Out Tn B C' C *)
apply l6_6.
(* Goal: @Out Tn B C C' *)
auto.
Qed.
Lemma lcos_const : forall lp l a, Lcos lp l a ->
exists A, exists B, exists C, lp A B /\ l B C /\ a A B C.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos Tn lp l a), @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
unfold Lcos in H.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
ex_and H2 A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
ex_and H3 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
ex_and H2 C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp A B) (and (l B C) (a A B C))))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B B0) (and (l B0 C) (a B B0 C)))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B A) (and (l A C) (a B A C))) *)
exists C.
(* Goal: and (lp B A) (and (l A C) (a B A C)) *)
repeat split; auto.
(* Goal: lp B A *)
apply lg_sym; auto.
Qed.
Lemma lcos_lg_distincts : forall lp l a A B C, Lcos lp l a -> l A B -> lp B C -> a A B C -> A <> B /\ C <> B.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Lcos Tn lp l a) (_ : l A B) (_ : lp B C) (_ : a A B C), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HH:= lcos_lg_not_null lp l a H).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
unfold Q_Cong_Null in *.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
split.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: False *)
subst B.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: False *)
apply H4.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
unfold Lcos in H.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
split.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_Cong Tn l *)
tauto.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
exists A.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: l A A *)
auto.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
intro.
(* Goal: False *)
subst C.
(* Goal: False *)
apply H3.
(* Goal: and (@Q_Cong Tn lp) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A)) *)
unfold Lcos in H.
(* Goal: and (@Q_Cong Tn lp) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A) *)
(* Goal: @Q_Cong Tn lp *)
tauto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A) *)
exists B.
(* Goal: lp B B *)
auto.
Qed.
Lemma lcos_const_a : forall lp l a B, Lcos lp l a -> exists A, exists C, l A B /\ lp B C /\ a A B C.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (B : @Tpoint Tn) (_ : @Lcos Tn lp l a), @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
assert(HH:=H).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
unfold Lcos in HH.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
clear H3.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
assert(HH:= ex_point_lg l B H1).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
ex_and HH A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
assert(l A B).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
(* Goal: l A B *)
apply lg_sym; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C)))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
assert(HH:= lcos_lg_not_null lp l a H).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
assert(A <> B).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
(* Goal: False *)
subst A.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
(* Goal: False *)
apply H6.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
(* Goal: @Q_Cong_Null Tn l *)
unfold Q_Cong_Null.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_Cong Tn l *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
(* Goal: l B B *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
assert(HH:= anga_const a A B H2 H7).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
ex_and HH C'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
assert(HH:= anga_distincts a A B C' H2 H8).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
assert(B <> C'); auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
assert(HH:= ex_point_lg_out lp B C' H11 H0 H5).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
ex_and HH C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (l A B) (and (lp B C) (a A B C))) *)
exists C.
(* Goal: and (l A B) (and (lp B C) (a A B C)) *)
repeat split; auto.
(* Goal: a A B C *)
apply (anga_out_anga a A B C' A C); auto.
(* Goal: @Out Tn B C' C *)
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: @Out Tn B C' C *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
(* Goal: @Out Tn B C' C *)
apply l6_6.
(* Goal: @Out Tn B C C' *)
auto.
Qed.
Lemma lcos_const_ab : forall lp l a B A, Lcos lp l a -> l A B -> exists C, lp B C /\ a A B C.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (B A : @Tpoint Tn) (_ : @Lcos Tn lp l a) (_ : l A B), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
assert(HH:=H).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
unfold Lcos in HH.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
clear H4.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
assert(HH:= lcos_lg_not_null lp l a H).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
assert(A <> B).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
(* Goal: False *)
subst A.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
(* Goal: False *)
apply H5.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
(* Goal: @Q_Cong_Null Tn l *)
unfold Q_Cong_Null.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_Cong Tn l *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
(* Goal: l B B *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
assert(HH:= anga_const a A B H3 H6).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
ex_and HH C'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
assert(HH:= anga_distincts a A B C' H3 H7).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
assert(B <> C'); auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
assert(HH:= ex_point_lg_out lp B C' H10 H1 H4).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
ex_and HH C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (lp B C) (a A B C)) *)
exists C.
(* Goal: and (lp B C) (a A B C) *)
repeat split; auto.
(* Goal: a A B C *)
apply (anga_out_anga a A B C' A C); auto.
(* Goal: @Out Tn B C' C *)
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: @Out Tn B C' C *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
(* Goal: @Out Tn B C' C *)
apply l6_6.
(* Goal: @Out Tn B C C' *)
auto.
Qed.
Lemma lcos_const_cb : forall lp l a B C, Lcos lp l a -> lp B C -> exists A, l A B /\ a A B C.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (B C : @Tpoint Tn) (_ : @Lcos Tn lp l a) (_ : lp B C), @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
assert(HH:=H).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
unfold Lcos in HH.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
clear H4.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
assert(HH:= lcos_lg_not_null lp l a H).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
assert(C <> B).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
(* Goal: False *)
subst C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
(* Goal: False *)
apply H4.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
(* Goal: @Q_Cong_Null Tn lp *)
unfold Q_Cong_Null.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
(* Goal: and (@Q_Cong Tn lp) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A) *)
(* Goal: @Q_Cong Tn lp *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => lp A A) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
(* Goal: lp B B *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
assert(HH:= anga_const a C B H3 H6).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
ex_and HH A'.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
assert(HH:= anga_distincts a C B A' H3 H7).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
assert(B <> A'); auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
assert(HH:= ex_point_lg_out l B A' H10 H2 H5).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
ex_and HH A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => and (l A B) (a A B C)) *)
exists A.
(* Goal: and (l A B) (a A B C) *)
split.
(* Goal: a A B C *)
(* Goal: l A B *)
apply lg_sym; auto.
(* Goal: a A B C *)
apply(anga_out_anga a A' B C); auto.
(* Goal: @Out Tn B C C *)
(* Goal: @Out Tn B A' A *)
(* Goal: a A' B C *)
apply anga_sym; auto.
(* Goal: @Out Tn B C C *)
(* Goal: @Out Tn B A' A *)
apply l6_6.
(* Goal: @Out Tn B C C *)
(* Goal: @Out Tn B A A' *)
auto.
(* Goal: @Out Tn B C C *)
apply out_trivial.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
auto.
Qed.
Lemma lcos_lg_anga : forall l lp a, Lcos lp l a -> Lcos lp l a /\ Q_Cong l /\ Q_Cong lp /\ Q_CongA_Acute a.
Proof.
(* Goal: forall (l lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos Tn lp l a), and (@Lcos Tn lp l a) (and (@Q_Cong Tn l) (and (@Q_Cong Tn lp) (@Q_CongA_Acute Tn a))) *)
intros.
(* Goal: and (@Lcos Tn lp l a) (and (@Q_Cong Tn l) (and (@Q_Cong Tn lp) (@Q_CongA_Acute Tn a))) *)
split.
(* Goal: and (@Q_Cong Tn l) (and (@Q_Cong Tn lp) (@Q_CongA_Acute Tn a)) *)
(* Goal: @Lcos Tn lp l a *)
auto.
(* Goal: and (@Q_Cong Tn l) (and (@Q_Cong Tn lp) (@Q_CongA_Acute Tn a)) *)
unfold Lcos in H.
(* Goal: and (@Q_Cong Tn l) (and (@Q_Cong Tn lp) (@Q_CongA_Acute Tn a)) *)
tauto.
Qed.
Lemma lcos_eql_lcos : forall lp1 l1 lp2 l2 a, EqL lp1 lp2 -> EqL l1 l2 -> Lcos lp1 l1 a -> Lcos lp2 l2 a.
Proof.
(* Goal: forall (lp1 l1 lp2 l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @EqL Tn lp1 lp2) (_ : @EqL Tn l1 l2) (_ : @Lcos Tn lp1 l1 a), @Lcos Tn lp2 l2 a *)
intros.
(* Goal: @Lcos Tn lp2 l2 a *)
unfold Lcos in *.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
spliter.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
ex_and H4 A.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
ex_and H5 B.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
ex_and H4 C.
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
assert(HH:=lg_eql_lg l1 l2 H2 H0).
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
assert(HP:=lg_eql_lg lp1 lp2 H1 H).
(* Goal: and (@Q_Cong Tn lp2) (and (@Q_Cong Tn l2) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))))))) *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C)))))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C)))) *)
exists C.
(* Goal: and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))) *)
unfold EqL in *.
(* Goal: and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))) *)
spliter.
(* Goal: and (@Per Tn C B A) (and (lp2 A B) (and (l2 A C) (a B A C))) *)
repeat split; auto.
(* Goal: l2 A C *)
(* Goal: lp2 A B *)
apply H.
(* Goal: l2 A C *)
(* Goal: lp1 A B *)
auto.
(* Goal: l2 A C *)
apply H0; auto.
Qed.
Global Instance lcos_morphism :
Proper (EqL ==> EqL ==> eq ==> iff) Lcos.
Proof.
(* Goal: @Proper (forall (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop), Prop) (@respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (forall (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop), Prop) (@EqL Tn) (@respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (forall _ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop, Prop) (@EqL Tn) (@respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) Prop (@eq (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop)) iff))) (@Lcos Tn) *)
unfold Proper.
(* Goal: @respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (forall (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop), Prop) (@EqL Tn) (@respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (forall _ : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop, Prop) (@EqL Tn) (@respectful (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) Prop (@eq (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop)) iff)) (@Lcos Tn) (@Lcos Tn) *)
split.
(* Goal: forall _ : @Lcos Tn y y0 y1, @Lcos Tn x x0 x1 *)
(* Goal: forall _ : @Lcos Tn x x0 x1, @Lcos Tn y y0 y1 *)
-
(* Goal: forall _ : @Lcos Tn x x0 x1, @Lcos Tn y y0 y1 *)
rewrite H1.
(* Goal: forall _ : @Lcos Tn x x0 y1, @Lcos Tn y y0 y1 *)
intro.
(* Goal: @Lcos Tn y y0 y1 *)
eauto using lcos_eql_lcos.
(* BG Goal: forall _ : @Lcos Tn y y0 y1, @Lcos Tn x x0 x1 *)
-
(* Goal: forall _ : @Lcos Tn y y0 y1, @Lcos Tn x x0 x1 *)
intro.
(* Goal: @Lcos Tn x x0 x1 *)
rewrite H1.
(* Goal: @Lcos Tn x x0 y1 *)
eapply lcos_eql_lcos with y y0; try symmetry;assumption.
Qed.
Lemma lcos_not_lg_null : forall lp l a, Lcos lp l a -> ~ Q_Cong_Null lp.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos Tn lp l a), not (@Q_Cong_Null Tn lp) *)
intros.
(* Goal: not (@Q_Cong_Null Tn lp) *)
intro.
(* Goal: False *)
unfold Q_Cong_Null in H0.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold Lcos in H.
(* Goal: False *)
spliter.
(* Goal: False *)
ex_and H4 B.
(* Goal: False *)
ex_and H5 A.
(* Goal: False *)
ex_and H4 C.
(* Goal: False *)
ex_and H1 P.
(* Goal: False *)
unfold Q_Cong in H0.
(* Goal: False *)
ex_and H0 X.
(* Goal: False *)
ex_and H1 Y.
(* Goal: False *)
assert(HH:= (H0 B A)).
(* Goal: False *)
destruct HH.
(* Goal: False *)
assert(HH:= (H0 P P)).
(* Goal: False *)
destruct HH.
(* Goal: False *)
apply H11 in H8.
(* Goal: False *)
apply H9 in H5.
(* Goal: False *)
assert(Cong B A P P).
(* Goal: False *)
(* Goal: @Cong Tn B A P P *)
apply (cong_transitivity _ _ X Y); Cong.
(* Goal: False *)
assert(A = B).
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) A B *)
eapply (cong_identity _ _ P).
(* Goal: False *)
(* Goal: @Cong Tn A B P P *)
Cong.
(* Goal: False *)
assert(HH:=anga_distincts a A B C H3 H7).
(* Goal: False *)
spliter.
(* Goal: False *)
contradiction.
Qed.
Lemma lcos_const_o : forall lp l a A B P, ~ Col A B P -> ~ Q_CongA_Null_Acute a -> Q_Cong l -> Q_Cong lp ->
Q_CongA_Acute a -> l A B -> Lcos lp l a ->
exists C, OS A B C P /\ a A B C /\ lp B C.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B P : @Tpoint Tn) (_ : not (@Col Tn A B P)) (_ : not (@Q_CongA_Null_Acute Tn a)) (_ : @Q_Cong Tn l) (_ : @Q_Cong Tn lp) (_ : @Q_CongA_Acute Tn a) (_ : l A B) (_ : @Lcos Tn lp l a), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
assert(HH:= anga_const_o a A B P H H0 H3).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
ex_and HH C'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
assert(A <> B /\ C' <> B).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C' B)) *)
apply (anga_distincts a); auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
assert(HH:= lcos_not_lg_null lp l a H5).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
assert (B <> C').
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
(* Goal: not (@eq (@Tpoint Tn) B C') *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
(* Goal: False *)
apply H9.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
(* Goal: @eq (@Tpoint Tn) C' B *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
assert(HP:=lg_exists C' B).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
ex_and HP lc'.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
assert(HQ:=anga_not_lg_null a l lc' A B C' H1 H11 H3 H4 H12 H6).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
assert(HR:= ex_point_lg_out lp B C' H10 H2 HH).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
ex_and HR C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@OS Tn A B C P) (and (a A B C) (lp B C))) *)
exists C.
(* Goal: and (@OS Tn A B C P) (and (a A B C) (lp B C)) *)
split.
(* Goal: and (a A B C) (lp B C) *)
(* Goal: @OS Tn A B C P *)
apply invert_one_side.
(* Goal: and (a A B C) (lp B C) *)
(* Goal: @OS Tn B A C P *)
apply one_side_symmetry.
(* Goal: and (a A B C) (lp B C) *)
(* Goal: @OS Tn B A P C *)
apply (out_out_one_side _ _ _ C').
(* Goal: and (a A B C) (lp B C) *)
(* Goal: @Out Tn B C' C *)
(* Goal: @OS Tn B A P C' *)
apply invert_one_side.
(* Goal: and (a A B C) (lp B C) *)
(* Goal: @Out Tn B C' C *)
(* Goal: @OS Tn A B P C' *)
apply one_side_symmetry.
(* Goal: and (a A B C) (lp B C) *)
(* Goal: @Out Tn B C' C *)
(* Goal: @OS Tn A B C' P *)
auto.
(* Goal: and (a A B C) (lp B C) *)
(* Goal: @Out Tn B C' C *)
apply l6_6.
(* Goal: and (a A B C) (lp B C) *)
(* Goal: @Out Tn B C C' *)
auto.
(* Goal: and (a A B C) (lp B C) *)
split.
(* Goal: lp B C *)
(* Goal: a A B C *)
eapply (anga_out_anga a A B C'); auto.
(* Goal: lp B C *)
(* Goal: @Out Tn B C' C *)
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: lp B C *)
(* Goal: @Out Tn B C' C *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
(* Goal: lp B C *)
(* Goal: @Out Tn B C' C *)
apply l6_6.
(* Goal: lp B C *)
(* Goal: @Out Tn B C C' *)
auto.
(* Goal: lp B C *)
auto.
Qed.
Lemma flat_not_acute : forall A B C, Bet A B C -> ~ Acute A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Bet Tn A B C), not (@Acute Tn A B C) *)
intros.
(* Goal: not (@Acute Tn A B C) *)
intro.
(* Goal: False *)
unfold Acute in H0.
(* Goal: False *)
ex_and H0 A'.
(* Goal: False *)
ex_and H1 B'.
(* Goal: False *)
ex_and H0 C'.
(* Goal: False *)
unfold LtA in H1.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold LeA in H1.
(* Goal: False *)
ex_and H1 P'.
(* Goal: False *)
unfold InAngle in H1.
(* Goal: False *)
spliter.
(* Goal: False *)
ex_and H6 X.
(* Goal: False *)
apply conga_distinct in H3.
(* Goal: False *)
spliter.
(* Goal: False *)
assert(A <> C).
(* Goal: False *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
intro.
(* Goal: False *)
(* Goal: False *)
subst C.
(* Goal: False *)
(* Goal: False *)
apply between_identity in H.
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: False *)
induction H7.
(* Goal: False *)
(* Goal: False *)
subst X.
(* Goal: False *)
(* Goal: False *)
apply H2.
(* Goal: False *)
(* Goal: @CongA Tn A B C A' B' C' *)
apply conga_line; auto.
(* Goal: False *)
assert(CongA A B C A' B' X).
(* Goal: False *)
(* Goal: @CongA Tn A B C A' B' X *)
apply (out_conga A B C A' B' P').
(* Goal: False *)
(* Goal: @Out Tn B' P' X *)
(* Goal: @Out Tn B' A' A' *)
(* Goal: @Out Tn B C C *)
(* Goal: @Out Tn B A A *)
(* Goal: @CongA Tn A B C A' B' P' *)
auto.
(* Goal: False *)
(* Goal: @Out Tn B' P' X *)
(* Goal: @Out Tn B' A' A' *)
(* Goal: @Out Tn B C C *)
(* Goal: @Out Tn B A A *)
apply out_trivial; auto.
(* Goal: False *)
(* Goal: @Out Tn B' P' X *)
(* Goal: @Out Tn B' A' A' *)
(* Goal: @Out Tn B C C *)
apply out_trivial; auto.
(* Goal: False *)
(* Goal: @Out Tn B' P' X *)
(* Goal: @Out Tn B' A' A' *)
apply out_trivial; auto.
(* Goal: False *)
(* Goal: @Out Tn B' P' X *)
apply l6_6.
(* Goal: False *)
(* Goal: @Out Tn B' X P' *)
auto.
(* Goal: False *)
apply H2.
(* Goal: @CongA Tn A B C A' B' C' *)
assert(Bet A' B' X).
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Bet Tn A' B' X *)
apply (bet_conga__bet A B C); auto.
(* Goal: @CongA Tn A B C A' B' C' *)
apply conga_line; auto.
(* Goal: @Bet Tn A' B' C' *)
apply (between_exchange4 _ _ X); auto.
Qed.
Lemma acute_comp_not_acute : forall A B C D, Bet A B C -> Acute A B D -> ~ Acute C B D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Acute Tn A B D), not (@Acute Tn C B D) *)
intros.
(* Goal: not (@Acute Tn C B D) *)
intro.
(* Goal: False *)
induction(col_dec A C D).
(* Goal: False *)
(* Goal: False *)
induction H2.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
assert(Bet A B D).
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: @Bet Tn A B D *)
eBetween.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
assert(HH:= flat_not_acute A B D H3).
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: False *)
(* Goal: False *)
induction H2.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
assert(Bet A B D \/ Bet A D B).
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: or (@Bet Tn A B D) (@Bet Tn A D B) *)
apply (l5_3 A B D C).
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: @Bet Tn A D C *)
(* Goal: @Bet Tn A B C *)
auto.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: @Bet Tn A D C *)
Between.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
induction H3.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
assert(HH:= flat_not_acute A B D H3).
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
assert(Bet C B D).
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
(* Goal: @Bet Tn C B D *)
eBetween.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
assert(HH:= flat_not_acute C B D H4).
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: False *)
(* Goal: False *)
assert(Bet C B D).
(* Goal: False *)
(* Goal: False *)
(* Goal: @Bet Tn C B D *)
eBetween.
(* Goal: False *)
(* Goal: False *)
assert(HH:= flat_not_acute C B D H3).
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: False *)
unfold Acute in *.
(* Goal: False *)
ex_and H0 A0.
(* Goal: False *)
ex_and H3 B0.
(* Goal: False *)
ex_and H0 C0.
(* Goal: False *)
ex_and H1 A1.
(* Goal: False *)
ex_and H4 B1.
(* Goal: False *)
ex_and H1 C1.
(* Goal: False *)
assert (Hd := H3).
(* Goal: False *)
assert (Hd' := H4).
(* Goal: False *)
apply lta_distincts in Hd.
(* Goal: False *)
apply lta_distincts in Hd'.
(* Goal: False *)
spliter.
(* Goal: False *)
assert(HH:=l11_16 A0 B0 C0 A1 B1 C1 H0 H12 H13 H1 H7 H8).
(* Goal: False *)
assert(LtA C B D A0 B0 C0).
(* Goal: False *)
(* Goal: @LtA Tn C B D A0 B0 C0 *)
eapply(conga_preserves_lta C B D A1 B1 C1).
(* Goal: False *)
(* Goal: @LtA Tn C B D A1 B1 C1 *)
(* Goal: @CongA Tn A1 B1 C1 A0 B0 C0 *)
(* Goal: @CongA Tn C B D C B D *)
apply conga_refl; auto.
(* Goal: False *)
(* Goal: @LtA Tn C B D A1 B1 C1 *)
(* Goal: @CongA Tn A1 B1 C1 A0 B0 C0 *)
apply conga_sym.
(* Goal: False *)
(* Goal: @LtA Tn C B D A1 B1 C1 *)
(* Goal: @CongA Tn A0 B0 C0 A1 B1 C1 *)
auto.
(* Goal: False *)
(* Goal: @LtA Tn C B D A1 B1 C1 *)
auto.
(* Goal: False *)
clear H4.
(* Goal: False *)
assert(A <> C).
(* Goal: False *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
intro.
(* Goal: False *)
(* Goal: False *)
subst C.
(* Goal: False *)
(* Goal: False *)
apply between_identity in H.
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: False *)
assert(Col A C B).
(* Goal: False *)
(* Goal: @Col Tn A C B *)
apply bet_col in H.
(* Goal: False *)
(* Goal: @Col Tn A C B *)
Col.
(* Goal: False *)
assert(HP:= l10_15 A C B D H16 H2).
(* Goal: False *)
ex_and HP P.
(* Goal: False *)
assert(HP:= perp_col A C P B B H10 H17 H16).
(* Goal: False *)
apply perp_left_comm in HP.
(* Goal: False *)
apply perp_perp_in in HP.
(* Goal: False *)
assert(Per A B P).
(* Goal: False *)
(* Goal: @Per Tn A B P *)
apply perp_in_per.
(* Goal: False *)
(* Goal: @Perp_at Tn B A B B P *)
apply perp_in_comm.
(* Goal: False *)
(* Goal: @Perp_at Tn B B A P B *)
auto.
(* Goal: False *)
assert(HR:= perp_not_eq_2 A C P B H17).
(* Goal: False *)
assert(HQ:=l11_16 A B P A0 B0 C0 H19 H10 HR H0 H12 H13).
(* Goal: False *)
assert(LtA A B D A B P).
(* Goal: False *)
(* Goal: @LtA Tn A B D A B P *)
apply (conga_preserves_lta A B D A0 B0 C0); auto.
(* Goal: False *)
(* Goal: @CongA Tn A0 B0 C0 A B P *)
(* Goal: @CongA Tn A B D A B D *)
apply conga_refl; auto.
(* Goal: False *)
(* Goal: @CongA Tn A0 B0 C0 A B P *)
apply conga_sym.
(* Goal: False *)
(* Goal: @CongA Tn A B P A0 B0 C0 *)
auto.
(* Goal: False *)
assert(LtA C B D A B P).
(* Goal: False *)
(* Goal: @LtA Tn C B D A B P *)
apply (conga_preserves_lta C B D A0 B0 C0); auto.
(* Goal: False *)
(* Goal: @CongA Tn A0 B0 C0 A B P *)
(* Goal: @CongA Tn C B D C B D *)
apply conga_refl; auto.
(* Goal: False *)
(* Goal: @CongA Tn A0 B0 C0 A B P *)
apply conga_sym.
(* Goal: False *)
(* Goal: @CongA Tn A B P A0 B0 C0 *)
auto.
(* Goal: False *)
clear HQ H15 HH H3 H0 H1.
(* Goal: False *)
unfold LtA in *.
(* Goal: False *)
spliter.
(* Goal: False *)
assert((LeA A B D A B P <-> LeA C B P C B D)).
(* Goal: False *)
(* Goal: iff (@LeA Tn A B D A B P) (@LeA Tn C B P C B D) *)
apply (l11_36 A B D A B P C C); auto.
(* Goal: False *)
destruct H20.
(* Goal: False *)
assert(LeA C B P C B D).
(* Goal: False *)
(* Goal: @LeA Tn C B P C B D *)
apply H20.
(* Goal: False *)
(* Goal: @LeA Tn A B D A B P *)
auto.
(* Goal: False *)
assert(CongA A B P C B P).
(* Goal: False *)
(* Goal: @CongA Tn A B P C B P *)
apply l11_16; auto.
(* Goal: False *)
(* Goal: @Per Tn C B P *)
apply perp_in_per.
(* Goal: False *)
(* Goal: @Perp_at Tn B C B B P *)
assert(Perp C B P B).
(* Goal: False *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: @Perp Tn C B P B *)
apply(perp_col _ A).
(* Goal: False *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: @Col Tn C A B *)
(* Goal: @Perp Tn C A P B *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
auto.
(* Goal: False *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: @Col Tn C A B *)
(* Goal: @Perp Tn C A P B *)
apply perp_left_comm.
(* Goal: False *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: @Col Tn C A B *)
(* Goal: @Perp Tn A C P B *)
auto.
(* Goal: False *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: @Col Tn C A B *)
apply bet_col in H.
(* Goal: False *)
(* Goal: @Perp_at Tn B C B B P *)
(* Goal: @Col Tn C A B *)
Col.
(* Goal: False *)
(* Goal: @Perp_at Tn B C B B P *)
apply perp_in_comm.
(* Goal: False *)
(* Goal: @Perp_at Tn B B C P B *)
apply perp_perp_in.
(* Goal: False *)
(* Goal: @Perp Tn B C P B *)
apply perp_left_comm.
(* Goal: False *)
(* Goal: @Perp Tn C B P B *)
auto.
(* Goal: False *)
assert(LeA A B P C B D).
(* Goal: False *)
(* Goal: @LeA Tn A B P C B D *)
apply (l11_30 C B P C B D); auto.
(* Goal: False *)
(* Goal: @CongA Tn C B D C B D *)
(* Goal: @CongA Tn C B P A B P *)
apply conga_sym.
(* Goal: False *)
(* Goal: @CongA Tn C B D C B D *)
(* Goal: @CongA Tn A B P C B P *)
auto.
(* Goal: False *)
(* Goal: @CongA Tn C B D C B D *)
apply conga_refl; auto.
(* Goal: False *)
assert(HH:=lea_asym C B D A B P H0 H24).
(* Goal: False *)
contradiction.
Qed.
Lemma lcos_per : forall A B C lp l a, Q_CongA_Acute a -> Q_Cong l -> Q_Cong lp ->
Lcos lp l a -> l A C -> lp A B -> a B A C -> Per A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn a) (_ : @Q_Cong Tn l) (_ : @Q_Cong Tn lp) (_ : @Lcos Tn lp l a) (_ : l A C) (_ : lp A B) (_ : a B A C), @Per Tn A B C *)
intros.
(* Goal: @Per Tn A B C *)
induction(eq_dec_points B C).
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B C *)
subst C.
(* Goal: @Per Tn A B C *)
(* Goal: @Per Tn A B B *)
apply l8_5.
(* Goal: @Per Tn A B C *)
unfold Lcos in H2.
(* Goal: @Per Tn A B C *)
spliter.
(* Goal: @Per Tn A B C *)
ex_and H9 A0.
(* Goal: @Per Tn A B C *)
ex_and H10 B0.
(* Goal: @Per Tn A B C *)
ex_and H9 C0.
(* Goal: @Per Tn A B C *)
assert(CongA B0 A0 C0 B A C).
(* Goal: @Per Tn A B C *)
(* Goal: @CongA Tn B0 A0 C0 B A C *)
apply (anga_conga a); auto.
(* Goal: @Per Tn A B C *)
assert(Cong A0 C0 A C).
(* Goal: @Per Tn A B C *)
(* Goal: @Cong Tn A0 C0 A C *)
apply (lg_cong l); auto.
(* Goal: @Per Tn A B C *)
assert(Cong A0 B0 A B).
(* Goal: @Per Tn A B C *)
(* Goal: @Cong Tn A0 B0 A B *)
apply (lg_cong lp); auto.
(* Goal: @Per Tn A B C *)
assert(HH:=l11_49 B0 A0 C0 B A C H13 H15 H14).
(* Goal: @Per Tn A B C *)
spliter.
(* Goal: @Per Tn A B C *)
assert(B0 <> C0).
(* Goal: @Per Tn A B C *)
(* Goal: not (@eq (@Tpoint Tn) B0 C0) *)
intro.
(* Goal: @Per Tn A B C *)
(* Goal: False *)
subst C0.
(* Goal: @Per Tn A B C *)
(* Goal: False *)
apply H6.
(* Goal: @Per Tn A B C *)
(* Goal: @eq (@Tpoint Tn) B C *)
apply (cong_identity _ _ B0).
(* Goal: @Per Tn A B C *)
(* Goal: @Cong Tn B C B0 B0 *)
Cong.
(* Goal: @Per Tn A B C *)
apply H17 in H18.
(* Goal: @Per Tn A B C *)
spliter.
(* Goal: @Per Tn A B C *)
eapply (l11_17 A0 B0 C0).
(* Goal: @CongA Tn A0 B0 C0 A B C *)
(* Goal: @Per Tn A0 B0 C0 *)
apply l8_2.
(* Goal: @CongA Tn A0 B0 C0 A B C *)
(* Goal: @Per Tn C0 B0 A0 *)
auto.
(* Goal: @CongA Tn A0 B0 C0 A B C *)
auto.
Qed.
Lemma is_null_anga_dec : forall a, Q_CongA_Acute a -> Q_CongA_Null_Acute a \/ ~ Q_CongA_Null_Acute a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn a), or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
intros a H.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
assert (H' := H).
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
unfold Q_CongA_Acute in H.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
destruct H as [A [B [C [Hacute HConga]]]].
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
elim (out_dec B A C); intro Hout.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
left.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
unfold Q_CongA_Null_Acute.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
split; auto.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
intros.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
(* Goal: @Out Tn B0 A0 C0 *)
apply (l11_21_a A B C); auto.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
(* Goal: @CongA Tn A B C A0 B0 C0 *)
apply HConga.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
(* Goal: a A0 B0 C0 *)
assumption.
(* Goal: or (@Q_CongA_Null_Acute Tn a) (not (@Q_CongA_Null_Acute Tn a)) *)
right.
(* Goal: not (@Q_CongA_Null_Acute Tn a) *)
unfold Q_CongA_Null_Acute.
(* Goal: not (and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C)) *)
intro H.
(* Goal: False *)
destruct H as [Hclear H]; clear Hclear.
(* Goal: False *)
apply Hout.
(* Goal: @Out Tn B A C *)
apply H.
(* Goal: a A B C *)
apply HConga.
(* Goal: @CongA Tn A B C A B C *)
apply acute_distincts in Hacute.
(* Goal: @CongA Tn A B C A B C *)
spliter.
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
Qed.
Lemma lcos_lg : forall a lp l A B C, Lcos lp l a -> Perp A B B C -> a B A C -> l A C -> lp A B.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Lcos Tn lp l a) (_ : @Perp Tn A B B C) (_ : a B A C) (_ : l A C), lp A B *)
intros.
(* Goal: lp A B *)
assert(HH:=H).
(* Goal: lp A B *)
unfold Lcos in HH.
(* Goal: lp A B *)
spliter.
(* Goal: lp A B *)
ex_and H6 A'.
(* Goal: lp A B *)
ex_and H7 B'.
(* Goal: lp A B *)
ex_and H6 C'.
(* Goal: lp A B *)
assert(Cong A C A' C').
(* Goal: lp A B *)
(* Goal: @Cong Tn A C A' C' *)
apply (lg_cong l); auto.
(* Goal: lp A B *)
assert(CongA B A C B' A' C').
(* Goal: lp A B *)
(* Goal: @CongA Tn B A C B' A' C' *)
apply (anga_conga a); auto.
(* Goal: lp A B *)
induction(is_null_anga_dec a).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: lp A B *)
assert(HP := null_lcos_eql lp l a H H12).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: lp A B *)
unfold Q_CongA_Null_Acute in H12.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: lp A B *)
spliter.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: lp A B *)
assert(HH:= (H13 B A C H1)).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: lp A B *)
apply perp_comm in H0.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: lp A B *)
apply perp_not_col in H0.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: lp A B *)
apply False_ind.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: False *)
apply H0.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Col Tn B A C *)
apply out_col in HH.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Col Tn B A C *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
apply conga_distinct in H11.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
spliter.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
assert(CongA A B C A' B' C').
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @CongA Tn A B C A' B' C' *)
apply l11_16; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @Per Tn A B C *)
apply perp_in_per.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @Perp_at Tn B A B B C *)
apply perp_in_comm.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @Perp_at Tn B B A C B *)
apply perp_perp_in.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @Perp Tn B A C B *)
apply perp_comm.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: @Perp Tn A B B C *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
apply perp_not_eq_2 in H0.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn A' B' C' *)
apply l8_2.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: @Per Tn C' B' A' *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: False *)
subst C'.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: False *)
apply H12.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
unfold Q_CongA_Null_Acute.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
split; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
intros.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Out Tn B0 A0 C0 *)
assert(CongA A0 B0 C0 B' A' B').
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @CongA Tn A0 B0 C0 B' A' B' *)
apply (anga_conga a); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Out Tn B0 A0 C0 *)
apply (l11_21_a B' A' B') .
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @CongA Tn B' A' B' A0 B0 C0 *)
(* Goal: @Out Tn A' B' B' *)
apply out_trivial; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @CongA Tn B' A' B' A0 B0 C0 *)
apply conga_sym.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @CongA Tn A0 B0 C0 B' A' B' *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
assert(Cong C B C' B' /\ Cong A B A' B' /\ CongA B C A B' C' A').
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: and (@Cong Tn C B C' B') (and (@Cong Tn A B A' B') (@CongA Tn B C A B' C' A')) *)
apply(l11_50_2 C A B C' A' B').
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@Col Tn C A B) *)
apply perp_comm in H0.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@Col Tn C A B) *)
apply perp_not_col in H0.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@Col Tn C A B) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: False *)
apply H0.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Col Tn B A C *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: @CongA Tn C A B C' A' B' *)
(* Goal: @CongA Tn A B C A' B' C' *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: @CongA Tn C A B C' A' B' *)
apply conga_comm.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
(* Goal: @CongA Tn B A C B' A' C' *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
(* Goal: @Cong Tn C A C' A' *)
Cong.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
spliter.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: lp A B *)
apply (lg_cong_lg lp A' B');auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Cong Tn A' B' A B *)
Cong.
(* Goal: @Q_CongA_Acute Tn a *)
assumption.
Qed.
Lemma l13_7 : forall a b l la lb lab lba, Lcos la l a -> Lcos lb l b ->
Lcos lab la b -> Lcos lba lb a -> EqL lab lba.
Proof.
(* Goal: forall (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l la lb lab lba : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos Tn la l a) (_ : @Lcos Tn lb l b) (_ : @Lcos Tn lab la b) (_ : @Lcos Tn lba lb a), @EqL Tn lab lba *)
intros.
(* Goal: @EqL Tn lab lba *)
apply lcos_lg_anga in H.
(* Goal: @EqL Tn lab lba *)
apply lcos_lg_anga in H0.
(* Goal: @EqL Tn lab lba *)
apply lcos_lg_anga in H1.
(* Goal: @EqL Tn lab lba *)
apply lcos_lg_anga in H2.
(* Goal: @EqL Tn lab lba *)
spliter.
(* Goal: @EqL Tn lab lba *)
clean_duplicated_hyps.
(* Goal: @EqL Tn lab lba *)
induction (is_null_anga_dec a).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
assert(HH:=null_lcos_eql lba lb a H2 H3).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
assert(HP:=null_lcos_eql la l a H H3).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
assert(Lcos lab l b) by (rewrite HP;assumption).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
assert(HQ:= l13_6 b lb lab l H0 H5).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
rewrite <- HQ;assumption.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @EqL Tn lab lba *)
induction (is_null_anga_dec b).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
assert(HH:=null_lcos_eql lab la b H1 H5).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
assert(HP:=null_lcos_eql lb l b H0 H5).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
assert(Lcos lba l a) by (rewrite HP;auto).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
assert(HQ:= l13_6 a la lba l H H6).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @EqL Tn lab lba *)
rewrite HH in HQ;assumption.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(HH:=lcos_const la l a H).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
ex_and HH C.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
ex_and H6 A.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
ex_and H8 B.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(HH:= anga_distincts a C A B H14 H9).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
spliter.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(~Col A B C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: not (@Col Tn A B C) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
apply H3.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
assert(Col C A B).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @Col Tn C A B *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
assert(HH:= anga_col_null a C A B H14 H9 H18).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
spliter.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(HH:=l10_2_existence B A C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
ex_and HH P.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert( ~ Col B A P).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: not (@Col Tn B A P) *)
eapply (osym_not_col _ _ C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: not (@Col Tn B A C) *)
(* Goal: @Reflect Tn C P B A *)
apply l10_4.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: not (@Col Tn B A C) *)
(* Goal: @Reflect Tn P C B A *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: not (@Col Tn B A C) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
apply H17.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn A B C *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(l B A).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: l B A *)
apply lg_sym; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(HH:= lcos_const_o lb l b B A P H19 H5 H12 H10 H11 H20 H0).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
ex_and HH D.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(TS B A P C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @TS Tn B A P C *)
apply l10_14.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: not (@eq (@Tpoint Tn) P C) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: False *)
subst P.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: False *)
assert(Col C B A).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: False *)
(* Goal: @Col Tn C B A *)
apply(l10_8 B A C); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: False *)
apply H19.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
(* Goal: @Col Tn B A C *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Reflect Tn P C B A *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Reflect Tn P C B A *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(TS B A D C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @TS Tn B A D C *)
eapply (l9_8_2 _ _ P).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @OS Tn B A P D *)
(* Goal: @TS Tn B A P C *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @OS Tn B A P D *)
apply one_side_symmetry.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @OS Tn B A D P *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(Per A C B).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Per Tn A C B *)
apply (lcos_per _ _ _ la l a); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: la A C *)
apply lg_sym; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(Per A D B).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Per Tn A D B *)
apply (lcos_per _ _ _ lb l b); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: b D A B *)
apply anga_sym; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(~ Col C D A).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: not (@Col Tn C D A) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
assert(Per B C D).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Per Tn B C D *)
apply(per_col B C A D); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn C A D *)
(* Goal: @Per Tn B C A *)
apply l8_2.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn C A D *)
(* Goal: @Per Tn A C B *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn C A D *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
assert(Per B D C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Per Tn B D C *)
apply(per_col B D A C); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
(* Goal: not (@eq (@Tpoint Tn) D A) *)
unfold OS in H21.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
(* Goal: not (@eq (@Tpoint Tn) D A) *)
ex_and H21 T.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
(* Goal: not (@eq (@Tpoint Tn) D A) *)
unfold TS in H21.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
(* Goal: not (@eq (@Tpoint Tn) D A) *)
spliter.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
(* Goal: not (@eq (@Tpoint Tn) D A) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
(* Goal: False *)
subst D.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
(* Goal: False *)
apply H21.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
(* Goal: @Col Tn A B A *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn B D A *)
apply l8_2.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
(* Goal: @Per Tn A D B *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Col Tn D A C *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
assert(C = D).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) C D *)
apply (l8_7 B); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
subst D.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
unfold TS in H25.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
spliter.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
ex_and H32 T.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
assert(C=T).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) C T *)
apply between_identity.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
(* Goal: @Bet Tn C T C *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
subst T.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: False *)
contradiction.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(HH:= l8_18_existence C D A H28).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
ex_and HH E.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(CongA B A C D A E /\ CongA B A D C A E /\ Bet C E D).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: and (@CongA Tn B A C D A E) (and (@CongA Tn B A D C A E) (@Bet Tn C E D)) *)
apply(l13_2 A B C D E).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @Col Tn C D E *)
(* Goal: @Per Tn B D A *)
(* Goal: @Per Tn B C A *)
(* Goal: @TS Tn A B C D *)
apply invert_two_sides.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @Col Tn C D E *)
(* Goal: @Per Tn B D A *)
(* Goal: @Per Tn B C A *)
(* Goal: @TS Tn B A C D *)
apply l9_2.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @Col Tn C D E *)
(* Goal: @Per Tn B D A *)
(* Goal: @Per Tn B C A *)
(* Goal: @TS Tn B A D C *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @Col Tn C D E *)
(* Goal: @Per Tn B D A *)
(* Goal: @Per Tn B C A *)
apply l8_2.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @Col Tn C D E *)
(* Goal: @Per Tn B D A *)
(* Goal: @Per Tn A C B *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @Col Tn C D E *)
(* Goal: @Per Tn B D A *)
apply l8_2.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @Col Tn C D E *)
(* Goal: @Per Tn A D B *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
(* Goal: @Col Tn C D E *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn A E C D *)
apply perp_sym.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn C D A E *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
spliter.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(a D A E).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: a D A E *)
eapply (anga_conga_anga a B A C); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: a B A C *)
apply anga_sym; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(b C A E).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: b C A E *)
eapply (anga_conga_anga b B A D); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(Perp C E A E).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn C E A E *)
eapply (perp_col _ D) .
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: not (@eq (@Tpoint Tn) C E) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: False *)
subst E.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: False *)
apply H5.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @Q_CongA_Null_Acute Tn b *)
unfold Q_CongA_Null_Acute.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: and (@Q_CongA_Acute Tn b) (forall (A B C : @Tpoint Tn) (_ : b A B C), @Out Tn B A C) *)
split; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: forall (A B C : @Tpoint Tn) (_ : b A B C), @Out Tn B A C *)
intros.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @Out Tn B0 A0 C0 *)
assert(CongA A0 B0 C0 C A C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @CongA Tn A0 B0 C0 C A C *)
apply (anga_conga b); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @Out Tn B0 A0 C0 *)
apply (l11_21_a C A C A0 B0 C0 ).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @CongA Tn C A C A0 B0 C0 *)
(* Goal: @Out Tn A C C *)
apply out_trivial; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @CongA Tn C A C A0 B0 C0 *)
apply conga_sym.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
(* Goal: @CongA Tn A0 B0 C0 C A C *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
(* Goal: @Perp Tn C D A E *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn C D E *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(lab A E).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: lab A E *)
apply (lcos_lg b lab la A E C H1).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: la A C *)
(* Goal: b E A C *)
(* Goal: @Perp Tn A E E C *)
apply perp_sym in H36.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: la A C *)
(* Goal: b E A C *)
(* Goal: @Perp Tn A E E C *)
apply perp_right_comm in H36.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: la A C *)
(* Goal: b E A C *)
(* Goal: @Perp Tn A E E C *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: la A C *)
(* Goal: b E A C *)
apply anga_sym; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: la A C *)
apply lg_sym; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(Perp D E A E).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Perp Tn D E A E *)
eapply (perp_col _ C) .
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: not (@eq (@Tpoint Tn) D E) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: False *)
subst E.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: False *)
apply H3.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
unfold Q_CongA_Null_Acute.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
split; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
intros.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Out Tn B0 A0 C0 *)
assert(CongA A0 B0 C0 D A D).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @CongA Tn A0 B0 C0 D A D *)
apply (anga_conga a); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @Out Tn B0 A0 C0 *)
apply (l11_21_a D A D A0 B0 C0 ).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @CongA Tn D A D A0 B0 C0 *)
(* Goal: @Out Tn A D D *)
apply out_trivial; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @CongA Tn D A D A0 B0 C0 *)
(* Goal: not (@eq (@Tpoint Tn) D A) *)
apply perp_not_eq_2 in H36.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @CongA Tn D A D A0 B0 C0 *)
(* Goal: not (@eq (@Tpoint Tn) D A) *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @CongA Tn D A D A0 B0 C0 *)
apply conga_sym.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
(* Goal: @CongA Tn A0 B0 C0 D A D *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
(* Goal: @Perp Tn D C A E *)
Perp.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: @Col Tn D C E *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
assert(lba A E).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: lba A E *)
apply (lcos_lg a lba lb A E D).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: lb A D *)
(* Goal: a E A D *)
(* Goal: @Perp Tn A E E D *)
(* Goal: @Lcos Tn lba lb a *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: lb A D *)
(* Goal: a E A D *)
(* Goal: @Perp Tn A E E D *)
Perp.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: lb A D *)
(* Goal: a E A D *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: lb A D *)
(* Goal: a E A D *)
apply anga_sym; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
(* Goal: lb A D *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqL Tn lab lba *)
apply ex_eql.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (@Len Tn A B lab) (@Len Tn A B lba))) *)
exists A.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (@Len Tn A B lab) (@Len Tn A B lba)) *)
exists E.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: and (@Len Tn A E lab) (@Len Tn A E lba) *)
split.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Len Tn A E lba *)
(* Goal: @Len Tn A E lab *)
unfold Len.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Len Tn A E lba *)
(* Goal: and (@Q_Cong Tn lab) (lab A E) *)
split; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Len Tn A E lba *)
unfold Len.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: and (@Q_Cong Tn lba) (lba A E) *)
split; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_CongA_Acute Tn b *)
assumption.
(* Goal: @Q_CongA_Acute Tn a *)
assumption.
Qed.
Lemma out_acute : forall A B C, Out B A C -> Acute A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Out Tn B A C), @Acute Tn A B C *)
intros.
(* Goal: @Acute Tn A B C *)
assert( A <> B /\ C <> B).
(* Goal: @Acute Tn A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
unfold Out in H.
(* Goal: @Acute Tn A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
tauto.
(* Goal: @Acute Tn A B C *)
spliter.
(* Goal: @Acute Tn A B C *)
assert(HH:= not_col_exists A B H0).
(* Goal: @Acute Tn A B C *)
ex_and HH Q.
(* Goal: @Acute Tn A B C *)
assert(exists P : Tpoint, Perp A B P B /\ OS A B Q P).
(* Goal: @Acute Tn A B C *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Perp Tn A B P B) (@OS Tn A B Q P)) *)
apply(l10_15 A B B Q).
(* Goal: @Acute Tn A B C *)
(* Goal: not (@Col Tn A B Q) *)
(* Goal: @Col Tn A B B *)
Col.
(* Goal: @Acute Tn A B C *)
(* Goal: not (@Col Tn A B Q) *)
auto.
(* Goal: @Acute Tn A B C *)
ex_and H3 P.
(* Goal: @Acute Tn A B C *)
assert(Per P B A).
(* Goal: @Acute Tn A B C *)
(* Goal: @Per Tn P B A *)
apply perp_in_per.
(* Goal: @Acute Tn A B C *)
(* Goal: @Perp_at Tn B P B B A *)
apply perp_left_comm in H3.
(* Goal: @Acute Tn A B C *)
(* Goal: @Perp_at Tn B P B B A *)
apply perp_in_comm.
(* Goal: @Acute Tn A B C *)
(* Goal: @Perp_at Tn B B P A B *)
apply perp_perp_in.
(* Goal: @Acute Tn A B C *)
(* Goal: @Perp Tn B P A B *)
Perp.
(* Goal: @Acute Tn A B C *)
unfold Acute.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn A B C A' B' C')))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A B' C') (@LtA Tn A B C A B' C'))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A B C') (@LtA Tn A B C A B C')) *)
exists P.
(* Goal: and (@Per Tn A B P) (@LtA Tn A B C A B P) *)
split.
(* Goal: @LtA Tn A B C A B P *)
(* Goal: @Per Tn A B P *)
apply l8_2.
(* Goal: @LtA Tn A B C A B P *)
(* Goal: @Per Tn P B A *)
auto.
(* Goal: @LtA Tn A B C A B P *)
unfold LtA.
(* Goal: and (@LeA Tn A B C A B P) (not (@CongA Tn A B C A B P)) *)
split.
(* Goal: not (@CongA Tn A B C A B P) *)
(* Goal: @LeA Tn A B C A B P *)
unfold LeA.
(* Goal: not (@CongA Tn A B C A B P) *)
(* Goal: @ex (@Tpoint Tn) (fun P0 : @Tpoint Tn => and (@InAngle Tn P0 A B P) (@CongA Tn A B C A B P0)) *)
exists C.
(* Goal: not (@CongA Tn A B C A B P) *)
(* Goal: and (@InAngle Tn C A B P) (@CongA Tn A B C A B C) *)
split.
(* Goal: not (@CongA Tn A B C A B P) *)
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @InAngle Tn C A B P *)
apply col_in_angle; auto.
(* Goal: not (@CongA Tn A B C A B P) *)
(* Goal: @CongA Tn A B C A B C *)
(* Goal: not (@eq (@Tpoint Tn) P B) *)
apply perp_not_eq_2 in H3.
(* Goal: not (@CongA Tn A B C A B P) *)
(* Goal: @CongA Tn A B C A B C *)
(* Goal: not (@eq (@Tpoint Tn) P B) *)
auto.
(* Goal: not (@CongA Tn A B C A B P) *)
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
(* Goal: not (@CongA Tn A B C A B P) *)
intro.
(* Goal: False *)
apply l11_21_a in H6.
(* Goal: @Out Tn B A C *)
(* Goal: False *)
apply perp_left_comm in H3.
(* Goal: @Out Tn B A C *)
(* Goal: False *)
apply perp_not_col in H3.
(* Goal: @Out Tn B A C *)
(* Goal: False *)
apply out_col in H6.
(* Goal: @Out Tn B A C *)
(* Goal: False *)
contradiction.
(* Goal: @Out Tn B A C *)
assumption.
Qed.
Lemma perp_acute : forall A B C P, Col A C P -> Perp_at P B P A C -> Acute A B P.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : @Col Tn A C P) (_ : @Perp_at Tn P B P A C), @Acute Tn A B P *)
intros.
(* Goal: @Acute Tn A B P *)
assert(HH0:=H0).
(* Goal: @Acute Tn A B P *)
assert(HH:= l11_43 P A B).
(* Goal: @Acute Tn A B P *)
induction(col_dec P A B).
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
assert(Perp B A A C).
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Perp Tn B A A C *)
eapply (perp_col _ P).
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
intro.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
subst A.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
assert(Perp_at B B P C B).
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: @Perp_at Tn B B P C B *)
apply perp_perp_in.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: @Perp Tn B P C B *)
apply perp_in_perp_bis in H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: @Perp Tn B P C B *)
induction H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: @Perp Tn B P C B *)
(* Goal: @Perp Tn B P C B *)
apply perp_not_eq_1 in H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: @Perp Tn B P C B *)
(* Goal: @Perp Tn B P C B *)
tauto.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: @Perp Tn B P C B *)
Perp.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
assert(P=B).
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) P B *)
eapply(l8_14_3 B P B C); Perp.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
subst P.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
apply perp_in_perp_bis in H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
induction H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: False *)
apply perp_not_eq_1 in H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
(* Goal: False *)
tauto.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
apply perp_not_eq_1 in H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: False *)
tauto.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
apply perp_in_perp_bis in H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
induction H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Perp Tn B P A C *)
apply perp_not_eq_1 in H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
(* Goal: @Perp Tn B P A C *)
tauto.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
(* Goal: @Perp Tn B P A C *)
auto.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B P A *)
Col.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
apply perp_comm in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
apply perp_perp_in in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
apply perp_in_comm in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
apply perp_in_sym in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Acute Tn A B P *)
eapply (perp_in_col_perp_in _ _ _ _ P) in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Acute Tn A B P *)
assert( A = P).
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Acute Tn A B P *)
(* Goal: @eq (@Tpoint Tn) A P *)
eapply(l8_14_3 A C B P); Perp.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Acute Tn A B P *)
subst P.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Acute Tn A B A *)
apply out_acute.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Out Tn B A A *)
apply perp_in_perp_bis in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Out Tn B A A *)
induction H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Out Tn B A A *)
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
apply perp_not_eq_2 in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Out Tn B A A *)
apply perp_not_eq_1 in H2.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
(* Goal: @Out Tn B A A *)
tauto.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
apply perp_in_perp_bis in H0.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
induction H0; apply perp_not_eq_1 in H0; tauto.
(* Goal: @Acute Tn A B P *)
(* Goal: @Col Tn B A P *)
Col.
(* Goal: @Acute Tn A B P *)
apply acute_sym.
(* Goal: @Acute Tn P B A *)
assert_diffs.
(* Goal: @Acute Tn P B A *)
apply l11_43; auto.
(* Goal: or (@Per Tn A P B) (@Obtuse Tn A P B) *)
left.
(* Goal: @Per Tn A P B *)
assert(A <> P).
(* Goal: @Per Tn A P B *)
(* Goal: not (@eq (@Tpoint Tn) A P) *)
intro.
(* Goal: @Per Tn A P B *)
(* Goal: False *)
subst P.
(* Goal: @Per Tn A P B *)
(* Goal: False *)
apply H1.
(* Goal: @Per Tn A P B *)
(* Goal: @Col Tn A A B *)
Col.
(* Goal: @Per Tn A P B *)
eapply (perp_in_col_perp_in _ _ _ _ P) in H0; auto.
(* Goal: @Per Tn A P B *)
apply perp_in_per.
(* Goal: @Perp_at Tn P A P P B *)
Perp.
Qed.
Lemma null_lcos : forall l a,Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Null_Acute a -> Lcos l l a.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l) (_ : not (@Q_Cong_Null Tn l)) (_ : @Q_CongA_Null_Acute Tn a), @Lcos Tn l l a *)
intros.
(* Goal: @Lcos Tn l l a *)
unfold Q_CongA_Null_Acute in H1.
(* Goal: @Lcos Tn l l a *)
spliter.
(* Goal: @Lcos Tn l l a *)
assert(HH:=ex_points_anga a H1).
(* Goal: @Lcos Tn l l a *)
ex_and HH A.
(* Goal: @Lcos Tn l l a *)
ex_and H3 B.
(* Goal: @Lcos Tn l l a *)
ex_and H4 C.
(* Goal: @Lcos Tn l l a *)
assert(HH:=H2 A B C H3).
(* Goal: @Lcos Tn l l a *)
unfold Lcos.
(* Goal: and (@Q_Cong Tn l) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C))))))))) *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
assert(B <> A).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
unfold Out in HH.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
lg_instance l A' B'.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
assert(HP:=ex_point_lg_out l B A H4 H H0).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
ex_and HP P.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (l A B) (and (l A C) (a B A C)))))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B0 B) (and (l B B0) (and (l B C) (a B0 B C))))) *)
exists P.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C P B) (and (l B P) (and (l B C) (a P B C)))) *)
exists P.
(* Goal: and (@Per Tn P P B) (and (l B P) (and (l B P) (a P B P))) *)
repeat split; auto.
(* Goal: a P B P *)
(* Goal: @Per Tn P P B *)
apply l8_2.
(* Goal: a P B P *)
(* Goal: @Per Tn B P P *)
apply l8_5.
(* Goal: a P B P *)
apply (anga_out_anga _ A _ C); auto.
(* Goal: @Out Tn B C P *)
(* Goal: @Out Tn B A P *)
apply l6_6.
(* Goal: @Out Tn B C P *)
(* Goal: @Out Tn B P A *)
auto.
(* Goal: @Out Tn B C P *)
apply (out2_out_2 _ _ _ A).
(* Goal: @Out Tn B P A *)
(* Goal: @Out Tn B C A *)
apply l6_6.
(* Goal: @Out Tn B P A *)
(* Goal: @Out Tn B A C *)
auto.
(* Goal: @Out Tn B P A *)
auto.
Qed.
Lemma lcos_exists : forall l a, Q_CongA_Acute a -> Q_Cong l -> ~ Q_Cong_Null l -> exists lp, Lcos lp l a.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn a) (_ : @Q_Cong Tn l) (_ : not (@Q_Cong_Null Tn l)), @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
lg_instance l A B.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
induction(is_null_anga_dec a).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
exists l.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: @Lcos Tn l l a *)
apply null_lcos; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
anga_instance1 a A B C.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
assert(~ Col B C A).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: not (@Col Tn B C A) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: False *)
assert(Out B A C /\ Q_CongA_Null_Acute a).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: False *)
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
apply(anga_col_null a A B C H H4).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: False *)
(* Goal: @Col Tn A B C *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: False *)
apply H3.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
tauto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
assert(HH:= l8_18_existence B C A H5).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
ex_and HH P.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
assert(HH:=lg_exists B P).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
ex_and HH lp.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp l a) *)
exists lp.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
assert(Acute A B C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @Acute Tn A B C *)
unfold Q_CongA_Acute in H.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @Acute Tn A B C *)
ex_and H A'.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @Acute Tn A B C *)
ex_and H10 B'.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @Acute Tn A B C *)
ex_and H C'.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @Acute Tn A B C *)
assert(HH:=H10 A B C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @Acute Tn A B C *)
destruct HH.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @Acute Tn A B C *)
assert(HP:= H12 H4).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @Acute Tn A B C *)
apply (acute_lea_acute _ _ _ A' B' C'); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @LeA Tn A B C A' B' C' *)
unfold LeA.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A' B' C') (@CongA Tn A B C A' B' P)) *)
exists C'.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: and (@InAngle Tn C' A' B' C') (@CongA Tn A B C A' B' C') *)
split.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @InAngle Tn C' A' B' C' *)
apply inangle3123.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
apply conga_distinct in HP.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
tauto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
apply conga_distinct in HP.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
tauto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @CongA Tn A B C A' B' C' *)
apply conga_sym.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
(* Goal: @CongA Tn A' B' C' A B C *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Lcos Tn lp l a *)
unfold Lcos.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (a B A C))))))))) *)
repeat split; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (a B A C)))))) *)
exists B.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B0 B) (and (lp B B0) (and (l B C) (a B0 B C))))) *)
exists P.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C P B) (and (lp B P) (and (l B C) (a P B C)))) *)
exists A.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: and (@Per Tn A P B) (and (lp B P) (and (l B A) (a P B A))) *)
repeat split; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Per Tn A P B *)
apply perp_in_per.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Perp_at Tn P A P P B *)
apply perp_in_comm.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Perp_at Tn P P A B P *)
apply perp_perp_in.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Perp Tn P A B P *)
apply perp_sym.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Perp Tn B P P A *)
apply (perp_col _ C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: not (@eq (@Tpoint Tn) B P) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: False *)
subst P.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: False *)
assert(Per A B C).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: False *)
(* Goal: @Per Tn A B C *)
apply perp_in_per.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: False *)
(* Goal: @Perp_at Tn B A B B C *)
apply perp_in_comm.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: False *)
(* Goal: @Perp_at Tn B B A C B *)
apply perp_perp_in.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: False *)
(* Goal: @Perp Tn B A C B *)
Perp.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: False *)
apply acute_not_per in H10.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
(* Goal: False *)
contradiction.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
(* Goal: @Perp Tn B C P A *)
Perp.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
(* Goal: @Col Tn B C P *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
(* Goal: l B A *)
apply (lg_sym l); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
assert(HH:=H10).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
unfold Acute in HH.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a P B A *)
apply(anga_sym a); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: a A B P *)
apply(anga_out_anga a A B C A P); auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Out Tn B C P *)
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Out Tn B C P *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Out Tn B C P *)
(* Goal: False *)
subst B.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Out Tn B C P *)
(* Goal: False *)
apply H5.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Out Tn B C P *)
(* Goal: @Col Tn A C A *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Out Tn B C P *)
eapply (perp_acute_out _ _ A).
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Col Tn C B P *)
(* Goal: @Perp Tn C B A P *)
(* Goal: @Acute Tn C B A *)
apply acute_sym.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Col Tn C B P *)
(* Goal: @Perp Tn C B A P *)
(* Goal: @Acute Tn A B C *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Col Tn C B P *)
(* Goal: @Perp Tn C B A P *)
Perp.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: @Col Tn C B P *)
Col.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: False *)
apply H1.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @Q_Cong_Null Tn l *)
unfold Q_Cong_Null.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
split; auto.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
subst B.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
exists A.
(* Goal: @Q_CongA_Acute Tn a *)
(* Goal: l A A *)
auto.
(* Goal: @Q_CongA_Acute Tn a *)
assumption.
Qed.
Lemma lcos_uniqueness : forall l a l1 l2, Lcos l1 l a-> Lcos l2 l a -> EqL l1 l2.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l1 l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos Tn l1 l a) (_ : @Lcos Tn l2 l a), @EqL Tn l1 l2 *)
intros.
(* Goal: @EqL Tn l1 l2 *)
unfold Lcos in *.
(* Goal: @EqL Tn l1 l2 *)
spliter.
(* Goal: @EqL Tn l1 l2 *)
ex_and H6 A1.
(* Goal: @EqL Tn l1 l2 *)
ex_and H7 B1.
(* Goal: @EqL Tn l1 l2 *)
ex_and H6 C1.
(* Goal: @EqL Tn l1 l2 *)
ex_and H3 A2.
(* Goal: @EqL Tn l1 l2 *)
ex_and H10 B2.
(* Goal: @EqL Tn l1 l2 *)
ex_and H3 C2.
(* Goal: @EqL Tn l1 l2 *)
assert(Cong A1 C1 A2 C2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn A1 C1 A2 C2 *)
apply (lg_cong l); auto.
(* Goal: @EqL Tn l1 l2 *)
assert(CongA B1 A1 C1 B2 A2 C2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @CongA Tn B1 A1 C1 B2 A2 C2 *)
apply (anga_conga a); auto.
(* Goal: @EqL Tn l1 l2 *)
induction(eq_dec_points C1 B1).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
subst C1.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(EqL l l1).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l l1 *)
apply ex_eqL; auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (l1 A B))) *)
exists A1.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A1 B) (l1 A1 B)) *)
exists B1.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: and (l A1 B1) (l1 A1 B1) *)
split; auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(Out A2 B2 C2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Out Tn A2 B2 C2 *)
apply (l11_21_a B1 A1 B1).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: @Out Tn A1 B1 B1 *)
apply out_trivial.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: not (@eq (@Tpoint Tn) B1 A1) *)
intro.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: False *)
subst B1.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: False *)
apply conga_distinct in H14.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
(* Goal: False *)
tauto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @CongA Tn B1 A1 B1 B2 A2 C2 *)
auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(C2 = B2 \/ A2 = B2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: or (@eq (@Tpoint Tn) C2 B2) (@eq (@Tpoint Tn) A2 B2) *)
apply(l8_9 C2 B2 A2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Col Tn C2 B2 A2 *)
(* Goal: @Per Tn C2 B2 A2 *)
auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Col Tn C2 B2 A2 *)
apply out_col in H16.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Col Tn C2 B2 A2 *)
Col.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
induction H17.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
subst C2.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
assert(EqL l l2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l l2 *)
apply ex_eqL; auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (l2 A B))) *)
exists A2.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A2 B) (l2 A2 B)) *)
exists B2.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: and (l A2 B2) (l2 A2 B2) *)
split; auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
transitivity l; auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l *)
symmetry; auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
subst B2.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
apply conga_distinct in H14.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn l1 l2 *)
tauto.
(* Goal: @EqL Tn l1 l2 *)
apply conga_distinct in H14.
(* Goal: @EqL Tn l1 l2 *)
spliter.
(* Goal: @EqL Tn l1 l2 *)
assert(CongA C1 B1 A1 C2 B2 A2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @CongA Tn C1 B1 A1 C2 B2 A2 *)
apply l11_16; auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: not (@eq (@Tpoint Tn) C2 B2) *)
intro.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
subst C2.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
assert(Out A1 B1 C1).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: @Out Tn A1 B1 C1 *)
apply (l11_21_a B2 A2 B2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
(* Goal: @Out Tn A2 B2 B2 *)
apply out_trivial; auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: @CongA Tn B2 A2 B2 B1 A1 C1 *)
apply conga_sym.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: @CongA Tn B1 A1 C1 B2 A2 B2 *)
auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
assert(C1 = B1 \/ A1 = B1).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: or (@eq (@Tpoint Tn) C1 B1) (@eq (@Tpoint Tn) A1 B1) *)
apply(l8_9 C1 B1 A1 ); auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: @Col Tn C1 B1 A1 *)
apply out_col in H20.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: @Col Tn C1 B1 A1 *)
Col.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
induction H21.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: False *)
subst C1.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
(* Goal: False *)
tauto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
subst B1.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: False *)
tauto.
(* Goal: @EqL Tn l1 l2 *)
assert( Cong C1 B1 C2 B2 /\ Cong A1 B1 A2 B2 /\ CongA B1 C1 A1 B2 C2 A2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: and (@Cong Tn C1 B1 C2 B2) (and (@Cong Tn A1 B1 A2 B2) (@CongA Tn B1 C1 A1 B2 C2 A2)) *)
apply(l11_50_2 C1 A1 B1 C2 A2 B2).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: not (@Col Tn C1 A1 B1) *)
intro.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: False *)
assert(C1 = B1 \/ A1 = B1).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: False *)
(* Goal: or (@eq (@Tpoint Tn) C1 B1) (@eq (@Tpoint Tn) A1 B1) *)
apply(l8_9 C1 B1 A1 ); auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: False *)
(* Goal: @Col Tn C1 B1 A1 *)
Col.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: False *)
induction H22.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: False *)
subst B1.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
(* Goal: False *)
tauto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn A1 B1 C1 A2 B2 C2 *)
apply conga_comm.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
(* Goal: @CongA Tn C1 B1 A1 C2 B2 A2 *)
auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn C1 A1 B1 C2 A2 B2 *)
apply conga_comm.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @CongA Tn B1 A1 C1 B2 A2 C2 *)
auto.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Cong Tn C1 A1 C2 A2 *)
Cong.
(* Goal: @EqL Tn l1 l2 *)
spliter.
(* Goal: @EqL Tn l1 l2 *)
apply ex_eqL; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l1 A B) (l2 A B))) *)
exists A1.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l1 A1 B) (l2 A1 B)) *)
exists B1.
(* Goal: and (l1 A1 B1) (l2 A1 B1) *)
split; auto.
(* Goal: l2 A1 B1 *)
apply (lg_cong_lg l2 A2 B2); auto.
(* Goal: @Cong Tn A2 B2 A1 B1 *)
Cong.
Qed.
Lemma lcos_eqa_lcos : forall lp l a b, Lcos lp l a -> EqA a b -> Lcos lp l b.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos Tn lp l a) (_ : @EqA Tn a b), @Lcos Tn lp l b *)
intros.
(* Goal: @Lcos Tn lp l b *)
assert(HH:=lcos_lg_anga l lp a H).
(* Goal: @Lcos Tn lp l b *)
spliter.
(* Goal: @Lcos Tn lp l b *)
clear H1.
(* Goal: @Lcos Tn lp l b *)
assert(HH:= H0).
(* Goal: @Lcos Tn lp l b *)
unfold EqA in HH.
(* Goal: @Lcos Tn lp l b *)
assert (Q_CongA a) by (apply anga_is_ang;auto).
(* Goal: @Lcos Tn lp l b *)
assert (Q_CongA b) by (apply eqA_preserves_ang with a;auto).
(* Goal: @Lcos Tn lp l b *)
assert (Q_CongA_Acute b).
(* Goal: @Lcos Tn lp l b *)
(* Goal: @Q_CongA_Acute Tn b *)
apply (eqA_preserves_anga a b); auto.
(* Goal: @Lcos Tn lp l b *)
unfold Lcos in *.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn b) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))))))) *)
spliter.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn b) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))))))) *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
ex_and H9 A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
ex_and H10 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
ex_and H9 C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C)))) *)
exists C.
(* Goal: and (@Per Tn C B A) (and (lp A B) (and (l A C) (b B A C))) *)
repeat split; auto.
(* Goal: b B A C *)
apply HH;auto.
Qed.
Lemma lcos_eq_refl : forall la a, Q_Cong la -> ~ Q_Cong_Null la -> Q_CongA_Acute a -> Eq_Lcos la a la a.
Proof.
(* Goal: forall (la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn la) (_ : not (@Q_Cong_Null Tn la)) (_ : @Q_CongA_Acute Tn a), @Eq_Lcos Tn la a la a *)
intros.
(* Goal: @Eq_Lcos Tn la a la a *)
unfold Eq_Lcos.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp la a)) *)
assert(HH:=lcos_exists la a H1 H H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp la a)) *)
ex_and HH lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp la a)) *)
exists lp.
(* Goal: and (@Lcos Tn lp la a) (@Lcos Tn lp la a) *)
split; auto.
Qed.
Lemma lcos_eq_sym : forall la a lb b, Eq_Lcos la a lb b -> Eq_Lcos lb b la a.
Proof.
(* Goal: forall (la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Eq_Lcos Tn la a lb b), @Eq_Lcos Tn lb b la a *)
intros.
(* Goal: @Eq_Lcos Tn lb b la a *)
unfold Eq_Lcos in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp lb b) (@Lcos Tn lp la a)) *)
ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp lb b) (@Lcos Tn lp la a)) *)
exists lp.
(* Goal: and (@Lcos Tn lp lb b) (@Lcos Tn lp la a) *)
split; auto.
Qed.
Lemma lcos_eq_trans : forall la a lb b lc c, Eq_Lcos la a lb b -> Eq_Lcos lb b lc c -> Eq_Lcos la a lc c.
Proof.
(* Goal: forall (la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (lc : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Eq_Lcos Tn la a lb b) (_ : @Eq_Lcos Tn lb b lc c), @Eq_Lcos Tn la a lc c *)
intros.
(* Goal: @Eq_Lcos Tn la a lc c *)
unfold Eq_Lcos in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
ex_and H lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
ex_and H0 lbc.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
assert(HH:= l13_6 b lab lbc lb H1 H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
assert(Lcos lbc la a).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
(* Goal: @Lcos Tn lbc la a *)
rewrite <- HH.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
(* Goal: @Lcos Tn lab la a *)
apply lcos_lg_anga in H.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
(* Goal: @Lcos Tn lab la a *)
tauto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (@Lcos Tn lp lc c)) *)
exists lbc.
(* Goal: and (@Lcos Tn lbc la a) (@Lcos Tn lbc lc c) *)
split; auto.
Qed.
Lemma lcos2_comm : forall lp l a b, Lcos2 lp l a b -> Lcos2 lp l b a.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos2 Tn lp l a b), @Lcos2 Tn lp l b a *)
intros.
(* Goal: @Lcos2 Tn lp l b a *)
unfold Lcos2 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
ex_and H la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
apply lcos_lg_anga in H.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
apply lcos_lg_anga in H0.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
assert(exists lb, Lcos lb l b).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lb l b) *)
apply(lcos_exists l b); auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
(* Goal: not (@Q_Cong_Null Tn l) *)
assert(HH:= lcos_lg_not_null la l a H).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
(* Goal: not (@Q_Cong_Null Tn l) *)
tauto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
ex_and H7 lb.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
apply lcos_lg_anga in H8.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l b) (@Lcos Tn lp la a)) *)
exists lb.
(* Goal: and (@Lcos Tn lb l b) (@Lcos Tn lp lb a) *)
split.
(* Goal: @Lcos Tn lp lb a *)
(* Goal: @Lcos Tn lb l b *)
auto.
(* Goal: @Lcos Tn lp lb a *)
assert(exists lp', Lcos lp' lb a).
(* Goal: @Lcos Tn lp lb a *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp' : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos Tn lp' lb a) *)
apply(lcos_exists lb a); auto.
(* Goal: @Lcos Tn lp lb a *)
(* Goal: not (@Q_Cong_Null Tn lb) *)
assert(HH:= lcos_lg_not_null lb l b H7).
(* Goal: @Lcos Tn lp lb a *)
(* Goal: not (@Q_Cong_Null Tn lb) *)
tauto.
(* Goal: @Lcos Tn lp lb a *)
ex_and H11 lp'.
(* Goal: @Lcos Tn lp lb a *)
assert(EqL lp lp').
(* Goal: @Lcos Tn lp lb a *)
(* Goal: @EqL Tn lp lp' *)
apply(l13_7 a b l la lb lp lp'); auto.
(* Goal: @Lcos Tn lp lb a *)
apply lcos_lg_anga in H12.
(* Goal: @Lcos Tn lp lb a *)
rewrite H11.
(* Goal: @Lcos Tn lp' lb a *)
tauto.
Qed.
Lemma lcos2_exists : forall l a b, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b ->
exists lp, Lcos2 lp l a b.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l) (_ : not (@Q_Cong_Null Tn l)) (_ : @Q_CongA_Acute Tn a) (_ : @Q_CongA_Acute Tn b), @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
assert(HH:= lcos_exists l a H1 H H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
ex_and HH la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
apply lcos_lg_anga in H3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
assert(~ Q_Cong_Null la /\ ~ Q_Cong_Null l).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn l)) *)
apply (lcos_lg_not_null _ _ a).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
(* Goal: @Lcos Tn la l a *)
auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
clear H8.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
assert(HH:= lcos_exists la b H2 H5 H7).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
ex_and HH lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos2 Tn lp l a b) *)
exists lab.
(* Goal: @Lcos2 Tn lab l a b *)
unfold Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
exists la.
(* Goal: and (@Lcos Tn la l a) (@Lcos Tn lab la b) *)
split; auto.
Qed.
Lemma lcos2_exists' : forall l a b, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b ->
exists la, exists lab, Lcos la l a /\ Lcos lab la b.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l) (_ : not (@Q_Cong_Null Tn l)) (_ : @Q_CongA_Acute Tn a) (_ : @Q_CongA_Acute Tn b), @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b))) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b))) *)
assert(HH:=lcos_exists l a H1 H H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b))) *)
ex_and HH la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b))) *)
exists la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
apply lcos_lg_anga in H3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
assert(HP:=lcos_not_lg_null la l a H3).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
assert(HH:=lcos_exists la b H2 H5 HP).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
ex_and HH lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
exists lab.
(* Goal: and (@Lcos Tn la l a) (@Lcos Tn lab la b) *)
split; auto.
Qed.
Lemma lcos2_eq_refl : forall l a b, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b -> Eq_Lcos2 l a b l a b.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l) (_ : not (@Q_Cong_Null Tn l)) (_ : @Q_CongA_Acute Tn a) (_ : @Q_CongA_Acute Tn b), @Eq_Lcos2 Tn l a b l a b *)
intros.
(* Goal: @Eq_Lcos2 Tn l a b l a b *)
assert(HH:= lcos2_exists l a b H H0 H1 H2).
(* Goal: @Eq_Lcos2 Tn l a b l a b *)
ex_and HH lab.
(* Goal: @Eq_Lcos2 Tn l a b l a b *)
unfold Eq_Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp l a b) (@Lcos2 Tn lp l a b)) *)
exists lab.
(* Goal: and (@Lcos2 Tn lab l a b) (@Lcos2 Tn lab l a b) *)
split; auto.
Qed.
Lemma lcos2_eq_sym : forall l1 a b l2 c d, Eq_Lcos2 l1 a b l2 c d -> Eq_Lcos2 l2 c d l1 a b.
Proof.
(* Goal: forall (l1 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (c d : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Eq_Lcos2 Tn l1 a b l2 c d), @Eq_Lcos2 Tn l2 c d l1 a b *)
intros.
(* Goal: @Eq_Lcos2 Tn l2 c d l1 a b *)
unfold Eq_Lcos2 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp l2 c d) (@Lcos2 Tn lp l1 a b)) *)
ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp l2 c d) (@Lcos2 Tn lp l1 a b)) *)
exists lp.
(* Goal: and (@Lcos2 Tn lp l2 c d) (@Lcos2 Tn lp l1 a b) *)
auto.
Qed.
Lemma lcos2_uniqueness: forall l l1 l2 a b, Lcos2 l1 l a b -> Lcos2 l2 l a b -> EqL l1 l2.
Proof.
(* Goal: forall (l l1 l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos2 Tn l1 l a b) (_ : @Lcos2 Tn l2 l a b), @EqL Tn l1 l2 *)
intros.
(* Goal: @EqL Tn l1 l2 *)
unfold Lcos2 in *.
(* Goal: @EqL Tn l1 l2 *)
ex_and H la.
(* Goal: @EqL Tn l1 l2 *)
ex_and H0 lb.
(* Goal: @EqL Tn l1 l2 *)
assert(EqL la lb).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn la lb *)
apply (l13_6 a _ _ l); auto.
(* Goal: @EqL Tn l1 l2 *)
apply lcos_lg_anga in H2.
(* Goal: @EqL Tn l1 l2 *)
apply lcos_lg_anga in H1.
(* Goal: @EqL Tn l1 l2 *)
spliter.
(* Goal: @EqL Tn l1 l2 *)
assert(Lcos l2 la b).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Lcos Tn l2 la b *)
rewrite H3;auto.
(* Goal: @EqL Tn l1 l2 *)
apply (l13_6 b _ _ la); auto.
Qed.
Lemma lcos2_eql_lcos2 : forall lla llb la lb a b, Lcos2 la lla a b -> EqL lla llb -> EqL la lb -> Lcos2 lb llb a b.
Proof.
(* Goal: forall (lla llb la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos2 Tn la lla a b) (_ : @EqL Tn lla llb) (_ : @EqL Tn la lb), @Lcos2 Tn lb llb a b *)
intros.
(* Goal: @Lcos2 Tn lb llb a b *)
unfold Lcos2 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (@Lcos Tn lb la b)) *)
ex_and H l.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (@Lcos Tn lb la b)) *)
exists l.
(* Goal: and (@Lcos Tn l llb a) (@Lcos Tn lb l b) *)
apply lcos_lg_anga in H.
(* Goal: and (@Lcos Tn l llb a) (@Lcos Tn lb l b) *)
apply lcos_lg_anga in H2.
(* Goal: and (@Lcos Tn l llb a) (@Lcos Tn lb l b) *)
spliter.
(* Goal: and (@Lcos Tn l llb a) (@Lcos Tn lb l b) *)
split.
(* Goal: @Lcos Tn lb l b *)
(* Goal: @Lcos Tn l llb a *)
rewrite <- H0;auto.
(* Goal: @Lcos Tn lb l b *)
rewrite <- H1;auto.
Qed.
Lemma lcos2_lg_anga : forall lp l a b, Lcos2 lp l a b -> Lcos2 lp l a b /\ Q_Cong lp /\ Q_Cong l /\ Q_CongA_Acute a /\ Q_CongA_Acute b.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos2 Tn lp l a b), and (@Lcos2 Tn lp l a b) (and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b)))) *)
intros.
(* Goal: and (@Lcos2 Tn lp l a b) (and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b)))) *)
split; auto.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b))) *)
unfold Lcos2 in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b))) *)
ex_and H ll.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b))) *)
apply lcos_lg_anga in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b))) *)
apply lcos_lg_anga in H0.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b))) *)
spliter.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (@Q_CongA_Acute Tn b))) *)
split; auto.
Qed.
Lemma lcos2_eq_trans : forall l1 a b l2 c d l3 e f, Eq_Lcos2 l1 a b l2 c d -> Eq_Lcos2 l2 c d l3 e f
-> Eq_Lcos2 l1 a b l3 e f.
Proof.
(* Goal: forall (l1 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (c d : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l3 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (e f : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Eq_Lcos2 Tn l1 a b l2 c d) (_ : @Eq_Lcos2 Tn l2 c d l3 e f), @Eq_Lcos2 Tn l1 a b l3 e f *)
intros.
(* Goal: @Eq_Lcos2 Tn l1 a b l3 e f *)
unfold Eq_Lcos2 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp l1 a b) (@Lcos2 Tn lp l3 e f)) *)
ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp l1 a b) (@Lcos2 Tn lp l3 e f)) *)
ex_and H0 lq.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp l1 a b) (@Lcos2 Tn lp l3 e f)) *)
exists lp.
(* Goal: and (@Lcos2 Tn lp l1 a b) (@Lcos2 Tn lp l3 e f) *)
split; auto.
(* Goal: @Lcos2 Tn lp l3 e f *)
assert(EqL lp lq).
(* Goal: @Lcos2 Tn lp l3 e f *)
(* Goal: @EqL Tn lp lq *)
eapply (lcos2_uniqueness l2 _ _ c d); auto.
(* Goal: @Lcos2 Tn lp l3 e f *)
apply lcos2_lg_anga in H2.
(* Goal: @Lcos2 Tn lp l3 e f *)
apply lcos2_lg_anga in H1.
(* Goal: @Lcos2 Tn lp l3 e f *)
spliter.
(* Goal: @Lcos2 Tn lp l3 e f *)
eapply (lcos2_eql_lcos2 l3 _ lq); auto.
(* Goal: @EqL Tn lq lp *)
(* Goal: @EqL Tn l3 l3 *)
reflexivity.
(* Goal: @EqL Tn lq lp *)
symmetry; auto.
Qed.
Lemma lcos_eq_lcos2_eq : forall la lb a b c, Q_CongA_Acute c -> Eq_Lcos la a lb b -> Eq_Lcos2 la a c lb b c.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn c) (_ : @Eq_Lcos Tn la a lb b), @Eq_Lcos2 Tn la a c lb b c *)
intros.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
assert(HH0:=H0).
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
unfold Eq_Lcos in HH0.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
ex_and HH0 lp.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
apply lcos_lg_anga in H1.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
apply lcos_lg_anga in H2.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
spliter.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
clear H7.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
assert(~ Q_Cong_Null lp /\ ~ Q_Cong_Null la).
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
(* Goal: and (not (@Q_Cong_Null Tn lp)) (not (@Q_Cong_Null Tn la)) *)
apply (lcos_lg_not_null _ _ a).
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
(* Goal: @Lcos Tn lp la a *)
auto.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
spliter.
(* Goal: @Eq_Lcos2 Tn la a c lb b c *)
unfold Eq_Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp la a c) (@Lcos2 Tn lp lb b c)) *)
assert(HH:= lcos_exists lp c H H4 H7).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp la a c) (@Lcos2 Tn lp lb b c)) *)
ex_and HH lq.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lp la a c) (@Lcos2 Tn lp lb b c)) *)
exists lq.
(* Goal: and (@Lcos2 Tn lq la a c) (@Lcos2 Tn lq lb b c) *)
split.
(* Goal: @Lcos2 Tn lq lb b c *)
(* Goal: @Lcos2 Tn lq la a c *)
unfold Lcos2.
(* Goal: @Lcos2 Tn lq lb b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la0 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la0 la a) (@Lcos Tn lq la0 c)) *)
exists lp.
(* Goal: @Lcos2 Tn lq lb b c *)
(* Goal: and (@Lcos Tn lp la a) (@Lcos Tn lq lp c) *)
split; auto.
(* Goal: @Lcos2 Tn lq lb b c *)
unfold Lcos2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (@Lcos Tn lq la c)) *)
exists lp.
(* Goal: and (@Lcos Tn lp lb b) (@Lcos Tn lq lp c) *)
split; auto.
Qed.
Lemma lcos2_lg_not_null: forall lp l a b, Lcos2 lp l a b -> ~ Q_Cong_Null l /\ ~ Q_Cong_Null lp.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos2 Tn lp l a b), and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
intros.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
unfold Lcos2 in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
ex_and H la.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
apply lcos_lg_not_null in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
apply lcos_lg_not_null in H0.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
spliter.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
split; auto.
Qed.
Lemma lcos3_lcos_1_2 : forall lp l a b c, Lcos3 lp l a b c <-> exists la, Lcos la l a /\ Lcos2 lp la b c.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop), iff (@Lcos3 Tn lp l a b c) (@ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c))) *)
intros.
(* Goal: iff (@Lcos3 Tn lp l a b c) (@ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c))) *)
split.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: forall _ : @Lcos3 Tn lp l a b c, @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)) *)
intro.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)) *)
unfold Lcos3 in H.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)) *)
ex_and H la.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)) *)
ex_and H0 lab.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)) *)
exists la.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c) *)
split; auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: @Lcos2 Tn lp la b c *)
unfold Lcos2.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la0 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la0 la b) (@Lcos Tn lp la0 c)) *)
exists lab.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
(* Goal: and (@Lcos Tn lab la b) (@Lcos Tn lp lab c) *)
split; auto.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)), @Lcos3 Tn lp l a b c *)
intro.
(* Goal: @Lcos3 Tn lp l a b c *)
ex_and H la.
(* Goal: @Lcos3 Tn lp l a b c *)
unfold Lcos2 in H0.
(* Goal: @Lcos3 Tn lp l a b c *)
ex_and H0 lab.
(* Goal: @Lcos3 Tn lp l a b c *)
unfold Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
exists la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
exists lab.
(* Goal: and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)) *)
apply lcos_lg_anga in H0.
(* Goal: and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)) *)
apply lcos_lg_anga in H1.
(* Goal: and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)) *)
spliter.
(* Goal: and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)) *)
split; auto.
Qed.
Lemma lcos3_lcos_2_1 : forall lp l a b c, Lcos3 lp l a b c <-> exists lab, Lcos2 lab l a b /\ Lcos lp lab c.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop), iff (@Lcos3 Tn lp l a b c) (@ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c))) *)
intros.
(* Goal: iff (@Lcos3 Tn lp l a b c) (@ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c))) *)
split.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: forall _ : @Lcos3 Tn lp l a b c, @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)) *)
intro.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)) *)
unfold Lcos3 in H.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)) *)
ex_and H la.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)) *)
ex_and H0 lab.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)) *)
exists lab.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c) *)
split.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: @Lcos Tn lp lab c *)
(* Goal: @Lcos2 Tn lab l a b *)
unfold Lcos2.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: @Lcos Tn lp lab c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos Tn lab la b)) *)
exists la.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: @Lcos Tn lp lab c *)
(* Goal: and (@Lcos Tn la l a) (@Lcos Tn lab la b) *)
split; assumption.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
(* Goal: @Lcos Tn lp lab c *)
assumption.
(* Goal: forall _ : @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)), @Lcos3 Tn lp l a b c *)
intro.
(* Goal: @Lcos3 Tn lp l a b c *)
ex_and H lab.
(* Goal: @Lcos3 Tn lp l a b c *)
unfold Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
unfold Lcos2 in H.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
ex_and H la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
exists la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
exists lab.
(* Goal: and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)) *)
split; auto.
Qed.
Lemma lcos3_permut3 : forall lp l a b c, Lcos3 lp l a b c -> Lcos3 lp l b a c.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos3 Tn lp l a b c), @Lcos3 Tn lp l b a c *)
intros.
(* Goal: @Lcos3 Tn lp l b a c *)
assert(HH:= lcos3_lcos_2_1 lp l a b c).
(* Goal: @Lcos3 Tn lp l b a c *)
destruct HH.
(* Goal: @Lcos3 Tn lp l b a c *)
assert(exists lab : Tpoint -> Tpoint -> Prop, Lcos2 lab l a b /\ Lcos lp lab c).
(* Goal: @Lcos3 Tn lp l b a c *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l a b) (@Lcos Tn lp lab c)) *)
apply lcos3_lcos_2_1; auto.
(* Goal: @Lcos3 Tn lp l b a c *)
ex_and H2 lab.
(* Goal: @Lcos3 Tn lp l b a c *)
apply lcos2_comm in H2.
(* Goal: @Lcos3 Tn lp l b a c *)
apply lcos3_lcos_2_1.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos2 Tn lab l b a) (@Lcos Tn lp lab c)) *)
exists lab.
(* Goal: and (@Lcos2 Tn lab l b a) (@Lcos Tn lp lab c) *)
split; auto.
Qed.
Lemma lcos3_permut1 : forall lp l a b c, Lcos3 lp l a b c -> Lcos3 lp l a c b.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos3 Tn lp l a b c), @Lcos3 Tn lp l a c b *)
intros.
(* Goal: @Lcos3 Tn lp l a c b *)
assert(HH:= lcos3_lcos_1_2 lp l a b c).
(* Goal: @Lcos3 Tn lp l a c b *)
destruct HH.
(* Goal: @Lcos3 Tn lp l a c b *)
assert(exists la : Tpoint -> Tpoint -> Prop, Lcos la l a /\ Lcos2 lp la b c).
(* Goal: @Lcos3 Tn lp l a c b *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la b c)) *)
apply lcos3_lcos_1_2; auto.
(* Goal: @Lcos3 Tn lp l a c b *)
ex_and H2 la.
(* Goal: @Lcos3 Tn lp l a c b *)
apply lcos2_comm in H3.
(* Goal: @Lcos3 Tn lp l a c b *)
apply lcos3_lcos_1_2.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (@Lcos2 Tn lp la c b)) *)
exists la.
(* Goal: and (@Lcos Tn la l a) (@Lcos2 Tn lp la c b) *)
split; auto.
Qed.
Lemma lcos3_permut2 : forall lp l a b c, Lcos3 lp l a b c -> Lcos3 lp l c b a.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos3 Tn lp l a b c), @Lcos3 Tn lp l c b a *)
intros.
(* Goal: @Lcos3 Tn lp l c b a *)
apply lcos3_permut3.
(* Goal: @Lcos3 Tn lp l b c a *)
apply lcos3_permut1.
(* Goal: @Lcos3 Tn lp l b a c *)
apply lcos3_permut3.
(* Goal: @Lcos3 Tn lp l a b c *)
auto.
Qed.
Lemma lcos3_exists : forall l a b c, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b -> Q_CongA_Acute c ->
exists lp, Lcos3 lp l a b c.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l) (_ : not (@Q_Cong_Null Tn l)) (_ : @Q_CongA_Acute Tn a) (_ : @Q_CongA_Acute Tn b) (_ : @Q_CongA_Acute Tn c), @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
assert(HH:= lcos_exists l a H1 H H0).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
ex_and HH la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
apply lcos_lg_anga in H4.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
assert(~ Q_Cong_Null la /\ ~ Q_Cong_Null l).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn l)) *)
apply (lcos_lg_not_null _ _ a).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
(* Goal: @Lcos Tn la l a *)
auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
clear H9.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
clear H7.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
assert(HH:= lcos_exists la b H2 H6 H8).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
ex_and HH lab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
apply lcos_lg_anga in H7.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
assert(~ Q_Cong_Null lab /\ ~ Q_Cong_Null la).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
(* Goal: and (not (@Q_Cong_Null Tn lab)) (not (@Q_Cong_Null Tn la)) *)
apply (lcos_lg_not_null _ _ b).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
(* Goal: @Lcos Tn lab la b *)
auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
spliter.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
assert(HH:= lcos_exists lab c H3 H10 H12).
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
ex_and HH lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @Lcos3 Tn lp l a b c) *)
exists lp.
(* Goal: @Lcos3 Tn lp l a b c *)
unfold Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)))) *)
exists la.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c))) *)
exists lab.
(* Goal: and (@Lcos Tn la l a) (and (@Lcos Tn lab la b) (@Lcos Tn lp lab c)) *)
split;auto.
Qed.
Lemma lcos3_eq_refl : forall l a b c, Q_Cong l -> ~ Q_Cong_Null l -> Q_CongA_Acute a -> Q_CongA_Acute b -> Q_CongA_Acute c -> Eq_Lcos3 l a b c l a b c.
Lemma lcos3_eq_sym : forall l1 a b c l2 d e f, Eq_Lcos3 l1 a b c l2 d e f -> Eq_Lcos3 l2 d e f l1 a b c.
Proof.
(* Goal: forall (l1 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (d e f : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Eq_Lcos3 Tn l1 a b c l2 d e f), @Eq_Lcos3 Tn l2 d e f l1 a b c *)
intros.
(* Goal: @Eq_Lcos3 Tn l2 d e f l1 a b c *)
unfold Eq_Lcos3 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l2 d e f) (@Lcos3 Tn lp l1 a b c)) *)
ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l2 d e f) (@Lcos3 Tn lp l1 a b c)) *)
exists lp.
(* Goal: and (@Lcos3 Tn lp l2 d e f) (@Lcos3 Tn lp l1 a b c) *)
auto.
Qed.
Lemma lcos3_uniqueness: forall l l1 l2 a b c, Lcos3 l1 l a b c -> Lcos3 l2 l a b c -> EqL l1 l2.
Proof.
(* Goal: forall (l l1 l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos3 Tn l1 l a b c) (_ : @Lcos3 Tn l2 l a b c), @EqL Tn l1 l2 *)
intros.
(* Goal: @EqL Tn l1 l2 *)
unfold Lcos3 in *.
(* Goal: @EqL Tn l1 l2 *)
ex_and H la.
(* Goal: @EqL Tn l1 l2 *)
ex_and H1 lab.
(* Goal: @EqL Tn l1 l2 *)
ex_and H0 la'.
(* Goal: @EqL Tn l1 l2 *)
ex_and H3 lab'.
(* Goal: @EqL Tn l1 l2 *)
assert(EqL la la').
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @EqL Tn la la' *)
apply (l13_6 a _ _ l); auto.
(* Goal: @EqL Tn l1 l2 *)
apply lcos_lg_anga in H2.
(* Goal: @EqL Tn l1 l2 *)
apply lcos_lg_anga in H3.
(* Goal: @EqL Tn l1 l2 *)
apply lcos_lg_anga in H.
(* Goal: @EqL Tn l1 l2 *)
apply lcos_lg_anga in H4.
(* Goal: @EqL Tn l1 l2 *)
spliter.
(* Goal: @EqL Tn l1 l2 *)
assert(Lcos lab' la b).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Lcos Tn lab' la b *)
rewrite H5;auto.
(* Goal: @EqL Tn l1 l2 *)
assert(EqL lab lab') by (apply (l13_6 b _ _ la); auto).
(* Goal: @EqL Tn l1 l2 *)
assert(Lcos l2 lab c).
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Lcos Tn l2 lab c *)
rewrite H19.
(* Goal: @EqL Tn l1 l2 *)
(* Goal: @Lcos Tn l2 lab' c *)
auto.
(* Goal: @EqL Tn l1 l2 *)
apply (l13_6 c _ _ lab); auto.
Qed.
Lemma lcos3_eql_lcos3 : forall lla llb la lb a b c, Lcos3 la lla a b c -> EqL lla llb -> EqL la lb -> Lcos3 lb llb a b c.
Proof.
(* Goal: forall (lla llb la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos3 Tn la lla a b c) (_ : @EqL Tn lla llb) (_ : @EqL Tn la lb), @Lcos3 Tn lb llb a b c *)
intros.
(* Goal: @Lcos3 Tn lb llb a b c *)
unfold Lcos3 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (and (@Lcos Tn lab la b) (@Lcos Tn lb lab c)))) *)
ex_and H lpa.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la llb a) (and (@Lcos Tn lab la b) (@Lcos Tn lb lab c)))) *)
exists lpa.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lpa llb a) (and (@Lcos Tn lab lpa b) (@Lcos Tn lb lab c))) *)
ex_and H2 lpab.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lpa llb a) (and (@Lcos Tn lab lpa b) (@Lcos Tn lb lab c))) *)
exists lpab.
(* Goal: and (@Lcos Tn lpa llb a) (and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c)) *)
apply lcos_lg_anga in H.
(* Goal: and (@Lcos Tn lpa llb a) (and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c)) *)
apply lcos_lg_anga in H2.
(* Goal: and (@Lcos Tn lpa llb a) (and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c)) *)
apply lcos_lg_anga in H3.
(* Goal: and (@Lcos Tn lpa llb a) (and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c)) *)
spliter.
(* Goal: and (@Lcos Tn lpa llb a) (and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c)) *)
split.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
(* Goal: @Lcos Tn lpa llb a *)
rewrite <- H0;auto.
(* Goal: and (@Lcos Tn lpab lpa b) (@Lcos Tn lb lpab c) *)
split.
(* Goal: @Lcos Tn lb lpab c *)
(* Goal: @Lcos Tn lpab lpa b *)
auto.
(* Goal: @Lcos Tn lb lpab c *)
rewrite <- H1;auto.
Qed.
Lemma lcos3_lg_anga : forall lp l a b c, Lcos3 lp l a b c -> Lcos3 lp l a b c /\ Q_Cong lp /\ Q_Cong l /\ Q_CongA_Acute a /\ Q_CongA_Acute b /\ Q_CongA_Acute c.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos3 Tn lp l a b c), and (@Lcos3 Tn lp l a b c) (and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c))))) *)
intros.
(* Goal: and (@Lcos3 Tn lp l a b c) (and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c))))) *)
split; auto.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
unfold Lcos3 in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
ex_and H la.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
ex_and H0 lab.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
apply lcos_lg_anga in H.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
apply lcos_lg_anga in H0.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
apply lcos_lg_anga in H1.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
spliter.
(* Goal: and (@Q_Cong Tn lp) (and (@Q_Cong Tn l) (and (@Q_CongA_Acute Tn a) (and (@Q_CongA_Acute Tn b) (@Q_CongA_Acute Tn c)))) *)
split; auto.
Qed.
Lemma lcos3_lg_not_null: forall lp l a b c, Lcos3 lp l a b c -> ~ Q_Cong_Null l /\ ~ Q_Cong_Null lp.
Proof.
(* Goal: forall (lp l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Lcos3 Tn lp l a b c), and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
intros.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
unfold Lcos3 in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
ex_and H la.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
ex_and H0 lab.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
apply lcos_lg_not_null in H.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
apply lcos_lg_not_null in H1.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
spliter.
(* Goal: and (not (@Q_Cong_Null Tn l)) (not (@Q_Cong_Null Tn lp)) *)
split; auto.
Qed.
Lemma lcos3_eq_trans : forall l1 a b c l2 d e f l3 g h i,
Eq_Lcos3 l1 a b c l2 d e f -> Eq_Lcos3 l2 d e f l3 g h i -> Eq_Lcos3 l1 a b c l3 g h i.
Proof.
(* Goal: forall (l1 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (d e f : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l3 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (g h i : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Eq_Lcos3 Tn l1 a b c l2 d e f) (_ : @Eq_Lcos3 Tn l2 d e f l3 g h i), @Eq_Lcos3 Tn l1 a b c l3 g h i *)
intros.
(* Goal: @Eq_Lcos3 Tn l1 a b c l3 g h i *)
unfold Eq_Lcos3 in *.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
ex_and H lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
ex_and H0 lq.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i)) *)
exists lp.
(* Goal: and (@Lcos3 Tn lp l1 a b c) (@Lcos3 Tn lp l3 g h i) *)
split; auto.
(* Goal: @Lcos3 Tn lp l3 g h i *)
assert(EqL lp lq).
(* Goal: @Lcos3 Tn lp l3 g h i *)
(* Goal: @EqL Tn lp lq *)
eapply (lcos3_uniqueness l2 _ _ d e f); auto.
(* Goal: @Lcos3 Tn lp l3 g h i *)
apply lcos3_lg_anga in H2.
(* Goal: @Lcos3 Tn lp l3 g h i *)
apply lcos3_lg_anga in H1.
(* Goal: @Lcos3 Tn lp l3 g h i *)
spliter.
(* Goal: @Lcos3 Tn lp l3 g h i *)
eapply (lcos3_eql_lcos3 l3 _ lq); auto.
(* Goal: @EqL Tn lq lp *)
(* Goal: @EqL Tn l3 l3 *)
reflexivity.
(* Goal: @EqL Tn lq lp *)
symmetry; auto.
Qed.
Lemma lcos_eq_lcos3_eq : forall la lb a b c d, Q_CongA_Acute c -> Q_CongA_Acute d -> Eq_Lcos la a lb b -> Eq_Lcos3 la a c d lb b c d.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn c) (_ : @Q_CongA_Acute Tn d) (_ : @Eq_Lcos Tn la a lb b), @Eq_Lcos3 Tn la a c d lb b c d *)
intros.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
assert(HH1:=H1).
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
unfold Eq_Lcos in HH1.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
ex_and HH1 lp.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
apply lcos_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
apply lcos_lg_anga in H3.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
spliter.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
assert(~ Q_Cong_Null lp /\ ~ Q_Cong_Null la).
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
(* Goal: and (not (@Q_Cong_Null Tn lp)) (not (@Q_Cong_Null Tn la)) *)
apply (lcos_lg_not_null _ _ a).
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
(* Goal: @Lcos Tn lp la a *)
auto.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
spliter.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
assert(HH:= lcos_exists lp c H H5 H10).
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
ex_and HH lq.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
apply lcos_lg_anga in H12.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
spliter.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
assert(~ Q_Cong_Null lq /\ ~ Q_Cong_Null lp).
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
(* Goal: and (not (@Q_Cong_Null Tn lq)) (not (@Q_Cong_Null Tn lp)) *)
apply (lcos_lg_not_null _ _ c); auto.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
spliter.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
assert(HH:= lcos_exists lq d H0 H14 H16).
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
ex_and HH lm.
(* Goal: @Eq_Lcos3 Tn la a c d lb b c d *)
unfold Eq_Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp la a c d) (@Lcos3 Tn lp lb b c d)) *)
exists lm.
(* Goal: and (@Lcos3 Tn lm la a c d) (@Lcos3 Tn lm lb b c d) *)
split; unfold Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la0 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la0 la a) (and (@Lcos Tn lab la0 c) (@Lcos Tn lm lab d)))) *)
exists lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp la a) (and (@Lcos Tn lab lp c) (@Lcos Tn lm lab d))) *)
exists lq.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
(* Goal: and (@Lcos Tn lp la a) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
split; auto.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun la : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn la lb b) (and (@Lcos Tn lab la c) (@Lcos Tn lm lab d)))) *)
exists lp.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lab : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos Tn lp lb b) (and (@Lcos Tn lab lp c) (@Lcos Tn lm lab d))) *)
exists lq.
(* Goal: and (@Lcos Tn lp lb b) (and (@Lcos Tn lq lp c) (@Lcos Tn lm lq d)) *)
split; auto.
Qed.
Lemma lcos2_eq_lcos3_eq : forall la lb a b c d e, Q_CongA_Acute e -> Eq_Lcos2 la a b lb c d -> Eq_Lcos3 la a b e lb c d e.
Proof.
(* Goal: forall (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (a b c d e : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn e) (_ : @Eq_Lcos2 Tn la a b lb c d), @Eq_Lcos3 Tn la a b e lb c d e *)
intros.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
assert(HH0:=H0).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
unfold Eq_Lcos2 in HH0.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
ex_and HH0 lp.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply lcos2_lg_anga in H1.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply lcos2_lg_anga in H2.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
assert(~ Q_Cong_Null la /\ ~ Q_Cong_Null lp).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lp)) *)
eapply (lcos2_lg_not_null _ _ a b).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
(* Goal: @Lcos2 Tn lp la a b *)
auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
assert(HH:= lcos_exists lp e H H3 H12).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
ex_and HH lq.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
apply lcos_lg_anga in H13.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
assert(~ Q_Cong_Null lq /\ ~ Q_Cong_Null lp).
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
(* Goal: and (not (@Q_Cong_Null Tn lq)) (not (@Q_Cong_Null Tn lp)) *)
apply (lcos_lg_not_null _ _ e); auto.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
spliter.
(* Goal: @Eq_Lcos3 Tn la a b e lb c d e *)
unfold Eq_Lcos3.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun lp : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Lcos3 Tn lp la a b e) (@Lcos3 Tn lp lb c d e)) *)
exists lq.
(* Goal: and (@Lcos3 Tn lq la a b e) (@Lcos3 Tn lq lb c d e) *)
split; apply lcos3_lcos_2_1; exists lp; split; auto.
Qed.
End Cosinus2. |
From Coq Require Import ssreflect ssrbool ssrfun.
From mathcomp Require Import ssrnat eqtype seq.
From fcsl Require Import pred ordtype pcm unionmap.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Section Helpers.
Variable A : Type.
Fixpoint onth (s : seq A) n : option A :=
if s is x::sx then if n is nx.+1 then onth sx nx else Some x else None.
Definition prefix s1 s2 :=
forall n x, onth s1 n = some x -> onth s2 n = some x.
Lemma size_onth s n : n < size s -> exists x, onth s n = Some x.
Proof.
(* Goal: forall _ : is_true (leq (S n) (@size A s)), @ex A (fun x : A => @eq (option A) (onth s n) (@Some A x)) *)
elim: s n=>[//|a s IH] [|n] /=; first by exists a.
(* Goal: forall _ : is_true (leq (S (S n)) (S (@size A s))), @ex A (fun x : A => @eq (option A) (onth s n) (@Some A x)) *)
by rewrite -(addn1 n) -(addn1 (size s)) ltn_add2r; apply: IH.
Qed.
Lemma onth_size s n x : onth s n = Some x -> n < size s.
Proof.
(* Goal: forall _ : @eq (option A) (onth s n) (@Some A x), is_true (leq (S n) (@size A s)) *)
by elim: s n=>[//|a s IH] [//|n]; apply: IH.
Qed.
Lemma prefix_refl s : prefix s s.
Proof.
(* Goal: prefix s s *)
by move=>n x <-.
Qed.
Lemma prefix_trans s2 s1 s3 : prefix s1 s2 -> prefix s2 s3 -> prefix s1 s3.
Proof.
(* Goal: forall (_ : prefix s1 s2) (_ : prefix s2 s3), prefix s1 s3 *)
by move=>H1 H2 n x E; apply: H2; apply: H1.
Qed.
Lemma prefix_cons x s1 s2 : prefix (x :: s1) (x :: s2) <-> prefix s1 s2.
Proof.
(* Goal: iff (prefix (@cons A x s1) (@cons A x s2)) (prefix s1 s2) *)
by split=>E n; [apply: (E n.+1) | case: n].
Qed.
Lemma prefix_cons' x y s1 s2 :
prefix (x :: s1) (y :: s2) -> x = y /\ prefix s1 s2.
Proof.
(* Goal: forall _ : prefix (@cons A x s1) (@cons A y s2), and (@eq A x y) (prefix s1 s2) *)
by move=>H; case: (H 0 x (erefl _)) (H)=>-> /prefix_cons.
Qed.
Lemma prefix_size s1 s2 : prefix s1 s2 -> size s1 <= size s2.
Proof.
(* Goal: forall _ : prefix s1 s2, is_true (leq (@size A s1) (@size A s2)) *)
elim: s1 s2=>[//|a s1 IH] [|b s2] H; first by move: (H 0 a (erefl _)).
(* Goal: is_true (leq (@size A (@cons A a s1)) (@size A (@cons A b s2))) *)
by rewrite ltnS; apply: (IH _ (proj2 (prefix_cons' H))).
Qed.
Lemma prefix_onth s t x : x < size s -> prefix s t -> onth s x = onth t x.
Proof.
(* Goal: forall (_ : is_true (leq (S x) (@size A s))) (_ : prefix s t), @eq (option A) (onth s x) (onth t x) *)
elim:s t x =>[//|a s IH] [|b t] x H1 H2; first by move: (H2 0 a (erefl _)).
(* Goal: @eq (option A) (onth (@cons A a s) x) (onth (@cons A b t) x) *)
by case/prefix_cons': H2=><- H2; case: x H1=>[|n] //= H1; apply: IH.
Qed.
End Helpers.
Hint Resolve prefix_refl : core.
Lemma onth_mem (A : eqType) (s : seq A) n x : onth s n = Some x -> x \in s.
Proof.
(* Goal: forall _ : @eq (option (Equality.sort A)) (@onth (Equality.sort A) s n) (@Some (Equality.sort A) x), is_true (@in_mem (Equality.sort A) x (@mem (Equality.sort A) (seq_predType A) s)) *)
by elim: s n=>//= a s IH [[->]|n /IH]; rewrite inE ?eq_refl // orbC => ->.
Qed.
Section ReflectionContexts.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Structure ctx := Context {keyx : seq K; varx : seq U}.
Definition empx := Context [::] [::].
Definition sub_ctx i j := prefix (keyx i) (keyx j) /\ prefix (varx i) (varx j).
Lemma sc_refl i : sub_ctx i i.
Proof.
(* Goal: sub_ctx i i *)
by [].
Qed.
Lemma sc_trans i j k : sub_ctx i j -> sub_ctx j k -> sub_ctx i k.
Proof.
(* Goal: forall (_ : sub_ctx i j) (_ : sub_ctx j k), sub_ctx i k *)
by case=>K1 V1 [K2 V2]; split; [move: K2 | move: V2]; apply: prefix_trans.
Qed.
End ReflectionContexts.
Section OneShotFilter.
Variables (A : Type) (p : pred A).
Fixpoint rfilter ts : seq A :=
if ts is t :: ts' then if p t then ts' else t :: rfilter ts' else [::].
End OneShotFilter.
Section Reflection.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Type i : ctx U.
Inductive term := Pts of nat & T | Var of nat.
Definition interp' i t :=
match t with
Pts n v => if onth (keyx i) n is Some k then pts k v else um_undef
| Var n => if onth (varx i) n is Some f then f else um_undef
end.
Notation fx i := (fun t f => interp' i t \+ f).
Definition interp i ts := foldr (fx i) Unit ts.
Lemma fE i ts x : foldr (fx i) x ts = x \+ interp i ts.
Proof.
(* Goal: @eq (PCM.sort (@union_map_classPCM K T U)) (@foldr term (PCM.sort (@union_map_classPCM K T U)) (fun (t : term) (f : PCM.sort (@union_map_classPCM K T U)) => @PCM.join (@union_map_classPCM K T U) (interp' i t) f) x ts) (@PCM.join (@union_map_classPCM K T U) x (interp i ts)) *)
by elim: ts x=>[|t ts IH] x; rewrite /= ?unitR // IH joinCA.
Qed.
Lemma interp_rev i ts : interp i (rev ts) = interp i ts.
Proof.
(* Goal: @eq (PCM.sort (@union_map_classPCM K T U)) (interp i (@rev term ts)) (interp i ts) *)
elim: ts=>[|t ts IH] //=; rewrite rev_cons -cats1.
(* Goal: @eq (@UMC.sort K T U) (interp i (@cat term (@rev term ts) (@cons term t (@nil term)))) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) *)
by rewrite /interp foldr_cat fE /= unitR IH.
Qed.
Fixpoint pprint i ts :=
if ts is t :: ts' then
if ts' is [::] then interp' i t else interp' i t \+ pprint i ts'
else Unit.
Lemma pp_interp i ts : pprint i ts = interp i ts.
Proof.
(* Goal: @eq (PCM.sort (@union_map_classPCM K T U)) (pprint i ts) (interp i ts) *)
by elim: ts=>[|t ts /= <-] //; case: ts=>//; rewrite unitR.
Qed.
Definition key n t := if t is Pts m _ then n == m else false.
Definition var n t := if t is Var m then n == m else false.
Definition kfree n t := rfilter (key n) t.
Definition vfree n t := rfilter (var n) t.
Lemma keyN i n ts : ~~ has (key n) ts -> interp i (kfree n ts) = interp i ts.
Proof.
(* Goal: forall _ : is_true (negb (@has term (key n) ts)), @eq (PCM.sort (@union_map_classPCM K T U)) (interp i (kfree n ts)) (interp i ts) *)
by elim: ts=>[|t ts IH] //=; case: ifP=>//= _ /IH ->.
Qed.
Lemma varN i n ts : ~~ has (var n) ts -> interp i (vfree n ts) = interp i ts.
Proof.
(* Goal: forall _ : is_true (negb (@has term (var n) ts)), @eq (PCM.sort (@union_map_classPCM K T U)) (interp i (vfree n ts)) (interp i ts) *)
by elim: ts=>[|t ts IH] //=; case: ifP=>//= _ /IH ->.
Qed.
Lemma keyP i n k ts :
has (key n) ts -> onth (keyx i) n = Some k ->
exists v, interp i ts = pts k v \+ interp i (kfree n ts).
Proof.
(* Goal: forall (_ : is_true (@has term (key n) ts)) (_ : @eq (option (Ordered.sort K)) (@onth (Ordered.sort K) (@keyx K T U i) n) (@Some (Ordered.sort K) k)), @ex T (fun v : T => @eq (PCM.sort (@union_map_classPCM K T U)) (interp i ts) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (interp i (kfree n ts)))) *)
elim: ts=>[|t ts IH] //=; case: ifP=>[|_ H].
(* Goal: forall _ : @eq (option (Ordered.sort K)) (@onth (Ordered.sort K) (@keyx K T U i) n) (@Some (Ordered.sort K) k), @ex T (fun v : T => @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (interp i (@cons term t (kfree n ts))))) *)
(* Goal: forall (_ : is_true (key n t)) (_ : is_true (orb true (@has term (key n) ts))) (_ : @eq (option (Ordered.sort K)) (@onth (Ordered.sort K) (@keyx K T U i) n) (@Some (Ordered.sort K) k)), @ex T (fun v : T => @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (interp i ts))) *)
-
(* Goal: forall _ : @eq (option (Ordered.sort K)) (@onth (Ordered.sort K) (@keyx K T U i) n) (@Some (Ordered.sort K) k), @ex T (fun v : T => @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (interp i (@cons term t (kfree n ts))))) *)
(* Goal: forall (_ : is_true (key n t)) (_ : is_true (orb true (@has term (key n) ts))) (_ : @eq (option (Ordered.sort K)) (@onth (Ordered.sort K) (@keyx K T U i) n) (@Some (Ordered.sort K) k)), @ex T (fun v : T => @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (interp i ts))) *)
by case: t=>//= _ v /eqP <- _ ->; exists v.
(* Goal: forall _ : @eq (option (Ordered.sort K)) (@onth (Ordered.sort K) (@keyx K T U i) n) (@Some (Ordered.sort K) k), @ex T (fun v : T => @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (interp i (@cons term t (kfree n ts))))) *)
by case/(IH H)=>v ->; exists v; rewrite joinCA.
Qed.
Lemma varP i n u ts :
has (var n) ts -> onth (varx i) n = Some u ->
interp i ts = u \+ interp i (vfree n ts).
Proof.
(* Goal: forall (_ : is_true (@has term (var n) ts)) (_ : @eq (option (@UMC.sort K T U)) (@onth (@UMC.sort K T U) (@varx K T U i) n) (@Some (@UMC.sort K T U) u)), @eq (PCM.sort (@union_map_classPCM K T U)) (interp i ts) (@PCM.join (@union_map_classPCM K T U) u (interp i (vfree n ts))) *)
elim: ts=>[|t ts IH] //=; case: ifP=>[|_ H].
(* Goal: forall _ : @eq (option (@UMC.sort K T U)) (@onth (@UMC.sort K T U) (@varx K T U i) n) (@Some (@UMC.sort K T U) u), @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) u (interp i (@cons term t (vfree n ts)))) *)
(* Goal: forall (_ : is_true (var n t)) (_ : is_true (orb true (@has term (var n) ts))) (_ : @eq (option (@UMC.sort K T U)) (@onth (@UMC.sort K T U) (@varx K T U i) n) (@Some (@UMC.sort K T U) u)), @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) u (interp i ts)) *)
-
(* Goal: forall _ : @eq (option (@UMC.sort K T U)) (@onth (@UMC.sort K T U) (@varx K T U i) n) (@Some (@UMC.sort K T U) u), @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) u (interp i (@cons term t (vfree n ts)))) *)
(* Goal: forall (_ : is_true (var n t)) (_ : is_true (orb true (@has term (var n) ts))) (_ : @eq (option (@UMC.sort K T U)) (@onth (@UMC.sort K T U) (@varx K T U i) n) (@Some (@UMC.sort K T U) u)), @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) u (interp i ts)) *)
by case: t=>//= _ /eqP <- _ ->.
(* Goal: forall _ : @eq (option (@UMC.sort K T U)) (@onth (@UMC.sort K T U) (@varx K T U i) n) (@Some (@UMC.sort K T U) u), @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp i ts)) (@PCM.join (@union_map_classPCM K T U) u (interp i (@cons term t (vfree n ts)))) *)
by move/(IH H)=>->; rewrite joinCA.
Qed.
Definition wf i t :=
match t with
Pts n _ => n < size (keyx i)
| Var n => n < size (varx i)
end.
Lemma sc_wf i j ts : sub_ctx i j -> all (wf i) ts -> all (wf j) ts.
Proof.
(* Goal: forall (_ : @sub_ctx K T U i j) (_ : is_true (@all term (wf i) ts)), is_true (@all term (wf j) ts) *)
case=>/prefix_size H1 /prefix_size H2; elim: ts=>[|t ts IH] //=.
(* Goal: forall _ : is_true (andb (wf i t) (@all term (wf i) ts)), is_true (andb (wf j t) (@all term (wf j) ts)) *)
case/andP=>H /IH ->; rewrite andbT.
(* Goal: is_true (wf j t) *)
by case: t H=>[n v|v] H; apply: leq_trans H _.
Qed.
Lemma sc_interp i j ts :
sub_ctx i j -> all (wf i) ts -> interp i ts = interp j ts.
Proof.
(* Goal: forall (_ : @sub_ctx K T U i j) (_ : is_true (@all term (wf i) ts)), @eq (PCM.sort (@union_map_classPCM K T U)) (interp i ts) (interp j ts) *)
case=>H1 H2; elim: ts=>[|t ts IH] //= /andP [H] /IH ->.
(* Goal: @eq (@UMC.sort K T U) (@PCM.join (@union_map_classPCM K T U) (interp' i t) (interp j ts)) (@PCM.join (@union_map_classPCM K T U) (interp' j t) (interp j ts)) *)
by case: t H=>[n v|n] /= /prefix_onth <-.
Qed.
Lemma valid_wf i ts : valid (interp i ts) -> all (wf i) ts.
Proof.
(* Goal: forall _ : is_true (@PCM.valid (@union_map_classPCM K T U) (interp i ts)), is_true (@all term (wf i) ts) *)
elim: ts=>[|t ts IH] //= V; rewrite (IH (validR V)) andbT.
(* Goal: is_true (wf i t) *)
case: t {V IH} (validL V)=>[n v|n] /=; by case X : (onth _ _)=>[a|]; rewrite ?(onth_size X) // valid_undef.
Qed.
Lemma wf_kfree i n ts : all (wf i) ts -> all (wf i) (kfree n ts).
Proof.
(* Goal: forall _ : is_true (@all term (wf i) ts), is_true (@all term (wf i) (kfree n ts)) *)
by elim: ts=>//= t ts IH; case: ifP=>_ /andP [] //= -> /IH ->.
Qed.
Lemma wf_vfree i n ts : all (wf i) ts -> all (wf i) (vfree n ts).
Proof.
(* Goal: forall _ : is_true (@all term (wf i) ts), is_true (@all term (wf i) (vfree n ts)) *)
by elim: ts=>//= t ts IH; case: ifP=>_ /andP [] //= -> /IH ->.
Qed.
Definition getkeys :=
foldr (fun t ks => if t is Pts k _ then k :: ks else ks) [::].
Lemma has_getkeys ts n : n \in getkeys ts = has (key n) ts.
Proof.
(* Goal: @eq bool (@in_mem (Equality.sort nat_eqType) n (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (getkeys ts))) (@has term (key n) ts) *)
by elim: ts=>//= t ts IH; case: t=>[m v|m] //; rewrite inE IH.
Qed.
End Reflection.
Section Subterm.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (i : ctx U) (ts : seq (term T)).
Fixpoint subterm ts1 ts2 :=
match ts1 with
Pts n _ :: tsx1 =>
if has (key n) ts2 then subterm tsx1 (kfree n ts2) else false
| Var n :: tsx1 =>
if has (var n) ts2 then subterm tsx1 (vfree n ts2) else false
| [::] => true
end.
Lemma subterm_sound i ts1 ts2 :
all (wf i) ts1 -> all (wf i) ts2 -> subterm ts1 ts2 ->
exists u, dom_eq (interp i ts1 \+ u) (interp i ts2).
Proof.
(* Goal: forall (_ : is_true (@all (term T) (@wf K T U i) ts1)) (_ : is_true (@all (term T) (@wf K T U i) ts2)) (_ : is_true (subterm ts1 ts2)), @ex (PCM.sort (@union_map_classPCM K T U)) (fun u : PCM.sort (@union_map_classPCM K T U) => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@interp K T U i ts1) u) (@interp K T U i ts2))) *)
elim: ts1 ts2=>[|t ts1 IH] ts2 /= A1 A2.
(* Goal: forall _ : is_true match t with | Pts n t => if @has (term T) (@key T n) ts2 then subterm ts1 (@kfree T n ts2) else false | @Var _ n => if @has (term T) (@var T n) ts2 then subterm ts1 (@vfree T n ts2) else false end, @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@interp' K T U i t) (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
(* Goal: forall _ : is_true true, @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.unit (@union_map_classPCM K T U)) u) (@interp K T U i ts2))) *)
-
(* Goal: forall _ : is_true match t with | Pts n t => if @has (term T) (@key T n) ts2 then subterm ts1 (@kfree T n ts2) else false | @Var _ n => if @has (term T) (@var T n) ts2 then subterm ts1 (@vfree T n ts2) else false end, @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@interp' K T U i t) (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
(* Goal: forall _ : is_true true, @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.unit (@union_map_classPCM K T U)) u) (@interp K T U i ts2))) *)
by exists (interp i ts2); rewrite unitL.
(* Goal: forall _ : is_true match t with | Pts n t => if @has (term T) (@key T n) ts2 then subterm ts1 (@kfree T n ts2) else false | @Var _ n => if @has (term T) (@var T n) ts2 then subterm ts1 (@vfree T n ts2) else false end, @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@interp' K T U i t) (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
case/andP: A1; case: t=>[n v|n] /= /size_onth [k] X A1; rewrite X; case: ifP=>Y //.
(* Goal: forall _ : is_true (subterm ts1 (@vfree T n ts2)), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) k (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
(* Goal: forall _ : is_true (subterm ts1 (@kfree T n ts2)), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
-
(* Goal: forall _ : is_true (subterm ts1 (@vfree T n ts2)), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) k (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
(* Goal: forall _ : is_true (subterm ts1 (@kfree T n ts2)), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
case: (keyP Y X)=>w -> /(IH _ A1 (wf_kfree n A2)) [xs D].
(* Goal: forall _ : is_true (subterm ts1 (@vfree T n ts2)), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) k (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
(* Goal: @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts1)) u) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k w) (@interp K T U i (@kfree T n ts2))))) *)
by exists xs; rewrite -joinA; apply: domeqUn D.
(* Goal: forall _ : is_true (subterm ts1 (@vfree T n ts2)), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) k (@interp K T U i ts1)) u) (@interp K T U i ts2))) *)
move: (varP Y X)=>-> /(IH _ A1 (wf_vfree n A2)) [xs D].
(* Goal: @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) k (@interp K T U i ts1)) u) (@PCM.join (@union_map_classPCM K T U) k (@interp K T U i (@vfree T n ts2))))) *)
by exists xs; rewrite -joinA; apply: domeqUn D.
Qed.
End Subterm.
Section Subtract.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (i : ctx U) (ts : seq (term T)).
Fixpoint subtract ts1 ts2 xs :=
match ts1 with
Pts n v :: tsx1 =>
if has (key n) ts2 then subtract tsx1 (kfree n ts2) xs
else subtract tsx1 ts2 (Pts n v :: xs)
| Var n :: tsx1 =>
if has (var n) ts2 then subtract tsx1 (vfree n ts2) xs
else subtract tsx1 ts2 (Var T n :: xs)
| [::] => (xs, ts2)
end.
Lemma subtract_sound i ts1 ts2 rs1 rs2 xs :
all (wf i) ts1 -> all (wf i) ts2 ->
subtract ts1 ts2 xs = (rs1, rs2) ->
exists u, dom_eq (interp i ts1 \+ interp i xs) (interp i rs1 \+ u) /\
dom_eq (interp i ts2) (interp i rs2 \+ u).
Proof.
(* Goal: forall (_ : is_true (@all (term T) (@wf K T U i) ts1)) (_ : is_true (@all (term T) (@wf K T U i) ts2)) (_ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 xs) (@pair (list (term T)) (list (term T)) rs1 rs2)), @ex (PCM.sort (@union_map_classPCM K T U)) (fun u : PCM.sort (@union_map_classPCM K T U) => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@interp K T U i ts1) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
elim: ts1 ts2 xs=>[|t ts1 IH] ts2 xs /= A1 A2.
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) match t with | Pts n v => if @has (term T) (@key T n) ts2 then subtract ts1 (@kfree T n ts2) xs else subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs) | @Var _ n => if @has (term T) (@var T n) ts2 then subtract ts1 (@vfree T n ts2) xs else subtract ts1 ts2 (@cons (term T) (Var T n) xs) end (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@interp' K T U i t) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (@pair (list (term T)) (list (term T)) xs ts2) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.unit (@union_map_classPCM K T U)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
-
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) match t with | Pts n v => if @has (term T) (@key T n) ts2 then subtract ts1 (@kfree T n ts2) xs else subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs) | @Var _ n => if @has (term T) (@var T n) ts2 then subtract ts1 (@vfree T n ts2) xs else subtract ts1 ts2 (@cons (term T) (Var T n) xs) end (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@interp' K T U i t) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (@pair (list (term T)) (list (term T)) xs ts2) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.unit (@union_map_classPCM K T U)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
by case=><-<-; exists Unit; rewrite unitL !unitR.
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) match t with | Pts n v => if @has (term T) (@key T n) ts2 then subtract ts1 (@kfree T n ts2) xs else subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs) | @Var _ n => if @has (term T) (@var T n) ts2 then subtract ts1 (@vfree T n ts2) xs else subtract ts1 ts2 (@cons (term T) (Var T n) xs) end (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@interp' K T U i t) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
case/andP: A1; case: t=>[n v|n] /= /size_onth [x X] A1; rewrite X; case: ifP=>Y.
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@vfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@kfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
-
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@vfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@kfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
case: (keyP Y X)=>w -> /(IH _ _ A1 (wf_kfree n A2)) [u][H1 H2].
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@vfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x w) (@interp K T U i (@kfree T n ts2))) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
exists (pts x v \+ u); rewrite -joinA !(pull (pts x _)).
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@vfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i ts1) (@interp K T U i xs))) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u)))) (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x w) (@interp K T U i (@kfree T n ts2))) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
by split=>//; apply: domeqUn.
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@vfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
-
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@vfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (@Pts T n v) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U x v) (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
by case/(IH _ _ A1 A2)=>u [/= H1 H2]; rewrite X joinCA joinA in H1; exists u.
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@vfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
-
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 (@vfree T n ts2) xs) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
move: (varP Y X)=>-> /(IH _ _ A1 (wf_vfree n A2)) [u][H1 H2].
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
(* Goal: @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i (@vfree T n ts2))) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
by exists (x \+ u); rewrite -joinA !(pull x); split=>//; apply: domeqUn.
(* Goal: forall _ : @eq (prod (list (term T)) (list (term T))) (subtract ts1 ts2 (@cons (term T) (Var T n) xs)) (@pair (list (term T)) (list (term T)) rs1 rs2), @ex (@UMC.sort K T U) (fun u : @UMC.sort K T U => and (is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) x (@interp K T U i ts1)) (@interp K T U i xs)) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs1) u))) (is_true (@UMC.dom_eq K T U (@interp K T U i ts2) (@PCM.join (@union_map_classPCM K T U) (@interp K T U i rs2) u)))) *)
by case/(IH _ _ A1 A2)=>u [/= H1 H2]; rewrite X joinCA joinA in H1; exists u.
Qed.
End Subtract.
Section Invalid.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (i : ctx U) (t : term T) (ts : seq (term T)).
Definition undefx i t :=
if t is Var n then
if onth (varx i) n is Some x then undefb x else false
else false.
Definition isundef i ts := ~~ uniq (getkeys ts) || has (undefx i) ts.
Lemma isundef_sound i ts :
all (wf i) ts -> isundef i ts -> ~~ valid (interp i ts).
Proof.
(* Goal: forall (_ : is_true (@all (term T) (@wf K T U i) ts)) (_ : is_true (isundef i ts)), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@interp K T U i ts))) *)
elim: ts=>[|t ts IH] //= /andP [W A].
(* Goal: forall _ : is_true (isundef i (@cons (term T) t ts)), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@interp' K T U i t) (@interp K T U i ts)))) *)
case: t W=>[n v|n] /= /size_onth [k] X; rewrite /isundef /= X; last first.
(* Goal: forall _ : is_true (orb (negb (andb (negb (@in_mem nat n (@mem nat (seq_predType nat_eqType) (@getkeys T ts)))) (@uniq nat_eqType (@getkeys T ts)))) (@has (term T) (undefx i) ts)), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts)))) *)
(* Goal: forall _ : is_true (orb (negb (@uniq nat_eqType (@getkeys T ts))) (orb (@UMC.undefb K T U k) (@has (term T) (undefx i) ts))), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) k (@interp K T U i ts)))) *)
-
(* Goal: forall _ : is_true (orb (negb (andb (negb (@in_mem nat n (@mem nat (seq_predType nat_eqType) (@getkeys T ts)))) (@uniq nat_eqType (@getkeys T ts)))) (@has (term T) (undefx i) ts)), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts)))) *)
(* Goal: forall _ : is_true (orb (negb (@uniq nat_eqType (@getkeys T ts))) (orb (@UMC.undefb K T U k) (@has (term T) (undefx i) ts))), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) k (@interp K T U i ts)))) *)
rewrite orbCA=>H; case: validUn=>// V; rewrite (negbTE (IH A _)) //.
(* Goal: forall _ : is_true (orb (negb (andb (negb (@in_mem nat n (@mem nat (seq_predType nat_eqType) (@getkeys T ts)))) (@uniq nat_eqType (@getkeys T ts)))) (@has (term T) (undefx i) ts)), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts)))) *)
(* Goal: is_true (isundef i ts) *)
by case/orP: H V=>// /undefbE ->; rewrite valid_undef.
(* Goal: forall _ : is_true (orb (negb (andb (negb (@in_mem nat n (@mem nat (seq_predType nat_eqType) (@getkeys T ts)))) (@uniq nat_eqType (@getkeys T ts)))) (@has (term T) (undefx i) ts)), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts)))) *)
rewrite negb_and negbK has_getkeys -orbA /=.
(* Goal: forall _ : is_true (orb (@has (term T) (@key T n) ts) (orb (negb (@uniq nat_eqType (@getkeys T ts))) (@has (term T) (undefx i) ts))), is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts)))) *)
case/orP=>// V; last by rewrite validPtUn andbCA (negbTE (IH A _)).
(* Goal: is_true (negb (@PCM.valid (@union_map_classPCM K T U) (@PCM.join (@union_map_classPCM K T U) (@UMC.pts K T U k v) (@interp K T U i ts)))) *)
by case: (keyP V X)=>u ->; rewrite joinA pts_undef join_undefL valid_undef.
Qed.
End Invalid.
Section XFind.
Variable A : Type.
Structure tagged_elem := XTag {xuntag :> A}.
Definition extend_tag := XTag.
Definition recurse_tag := extend_tag.
Canonical found_tag x := recurse_tag x.
Definition axiom xs1 xs2 i (pivot : tagged_elem) :=
onth xs2 i = Some (xuntag pivot) /\ prefix xs1 xs2.
Structure xfind (xs1 xs2 : seq A) (i : nat) :=
Form {pivot :> tagged_elem; _ : axiom xs1 xs2 i pivot}.
Lemma found_pf x t : axiom (x :: t) (x :: t) 0 (found_tag x).
Proof.
(* Goal: axiom (@cons A x t) (@cons A x t) O (found_tag x) *)
by [].
Qed.
Canonical found_form x t := Form (@found_pf x t).
Lemma recurse_pf i x xs1 xs2 (f : xfind xs1 xs2 i) :
axiom (x :: xs1) (x :: xs2) i.+1 (recurse_tag (xuntag f)).
Proof.
(* Goal: axiom (@cons A x xs1) (@cons A x xs2) (S i) (recurse_tag (xuntag (@pivot xs1 xs2 i f))) *)
by case: f=>pv [H1 H2]; split=>//; apply/prefix_cons.
Qed.
Canonical recurse_form i x xs1 xs2 f := Form (@recurse_pf i x xs1 xs2 f).
Lemma extend_pf x : axiom [::] [:: x] 0 (extend_tag x).
Proof.
(* Goal: axiom (@nil A) (@cons A x (@nil A)) O (extend_tag x) *)
by [].
Qed.
Canonical extend_form x := Form (@extend_pf x).
End XFind.
Module Syntactify.
Section Syntactify.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (i : ctx U) (ts : seq (term T)).
Structure tagged_map := Tag {untag : U}.
Local Coercion untag : tagged_map >-> UMC.sort.
Definition var_tag := Tag.
Definition key_tag := var_tag.
Definition empty_tag := key_tag.
Canonical Structure union_tag hc := empty_tag hc.
Definition axiom i j ts (pivot : tagged_map) :=
[/\ interp j ts = pivot :> U, sub_ctx i j & all (wf j) ts].
Structure form i j ts := Form {pivot : tagged_map; _ : axiom i j ts pivot}.
Local Coercion pivot : form >-> tagged_map.
Lemma union_pf i j k ts1 ts2 (f1 : form i j ts1) (f2 : form j k ts2) :
axiom i k (ts1 ++ ts2) (union_tag (untag f1 \+ untag f2)).
Proof.
(* Goal: axiom i k (@cat (term T) ts1 ts2) (union_tag (@PCM.join (@union_map_classPCM K T U) (untag (@pivot i j ts1 f1)) (untag (@pivot j k ts2 f2)))) *)
case: f1 f2=>_ [<- S1 W1][_][<- S2 W2]; split.
(* Goal: is_true (@all (term T) (@wf K T U k) (@cat (term T) ts1 ts2)) *)
(* Goal: @sub_ctx K T U i k *)
(* Goal: @eq (@UMC.sort K T U) (@interp K T U k (@cat (term T) ts1 ts2)) (untag (union_tag (@PCM.join (@union_map_classPCM K T U) (@interp K T U j ts1) (@interp K T U k ts2)))) *)
-
(* Goal: is_true (@all (term T) (@wf K T U k) (@cat (term T) ts1 ts2)) *)
(* Goal: @sub_ctx K T U i k *)
(* Goal: @eq (@UMC.sort K T U) (@interp K T U k (@cat (term T) ts1 ts2)) (untag (union_tag (@PCM.join (@union_map_classPCM K T U) (@interp K T U j ts1) (@interp K T U k ts2)))) *)
by rewrite /interp foldr_cat fE joinC -(sc_interp S2 W1).
(* Goal: is_true (@all (term T) (@wf K T U k) (@cat (term T) ts1 ts2)) *)
(* Goal: @sub_ctx K T U i k *)
-
(* Goal: is_true (@all (term T) (@wf K T U k) (@cat (term T) ts1 ts2)) *)
(* Goal: @sub_ctx K T U i k *)
by apply: sc_trans S1 S2.
(* Goal: is_true (@all (term T) (@wf K T U k) (@cat (term T) ts1 ts2)) *)
by rewrite all_cat (sc_wf S2 W1) W2.
Qed.
Canonical union_form i j k ts1 ts2 f1 f2 :=
Form (@union_pf i j k ts1 ts2 f1 f2).
Lemma empty_pf i : axiom i i [::] (empty_tag Unit).
Proof.
(* Goal: axiom i i (@nil (term T)) (empty_tag (@PCM.unit (@union_map_classPCM K T U))) *)
by [].
Qed.
Canonical empty_form i := Form (@empty_pf i).
Lemma pts_pf vars keys1 keys2 k v (f : xfind keys1 keys2 k):
axiom (Context keys1 vars) (Context keys2 vars)
[:: Pts k v] (key_tag (pts (xuntag f) v)).
Proof.
(* Goal: axiom (@Context K T U keys1 vars) (@Context K T U keys2 vars) (@cons (term T) (@Pts T k v) (@nil (term T))) (key_tag (@UMC.pts K T U (@xuntag (Ordered.sort K) (@SerTop.pivot (Ordered.sort K) keys1 keys2 k f)) v)) *)
by case: f=>p [E H]; split=>//=; rewrite ?E ?unitR // (onth_size E).
Qed.
Canonical pts_form vars keys1 keys2 k v f :=
Form (@pts_pf vars keys1 keys2 k v f).
Lemma var_pf keys vars1 vars2 n (f : xfind vars1 vars2 n) :
axiom (Context keys vars1) (Context keys vars2)
[:: Var T n] (var_tag (xuntag f)).
Proof.
(* Goal: axiom (@Context K T U keys vars1) (@Context K T U keys vars2) (@cons (term T) (Var T n) (@nil (term T))) (var_tag (@xuntag (@UMC.sort K T U) (@SerTop.pivot (@UMC.sort K T U) vars1 vars2 n f))) *)
by case: f=>p [E H]; split=>//=; rewrite ?E ?unitR // (onth_size E).
Qed.
Canonical var_form keys vars1 vars2 v f := Form (@var_pf keys vars1 vars2 v f).
End Syntactify.
Module Exports.
Coercion untag : tagged_map >-> UMC.sort.
Coercion pivot : form >-> tagged_map.
Canonical union_tag.
Canonical union_form.
Canonical empty_form.
Canonical pts_form.
Canonical var_form.
End Exports.
End Syntactify.
Export Syntactify.Exports.
Section ValidO.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (i : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Lemma validO j k ts1 ts2 (f1 : form (@empx K T U) j ts1)
(f2 : form j k ts2) :
valid (untag f1) -> subterm ts2 ts1 -> valid (untag f2).
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (@union_map_classPCM K T U) (@Syntactify.untag K T U (@Syntactify.pivot K T U (@empx K T U) j ts1 f1)))) (_ : is_true (@subterm T ts2 ts1)), is_true (@PCM.valid (@union_map_classPCM K T U) (@Syntactify.untag K T U (@Syntactify.pivot K T U j k ts2 f2))) *)
case: f1 f2=>f1 [<- _ A1][f2][<- S2 A2] /= V; rewrite (sc_interp S2 A1) in V.
(* Goal: forall _ : is_true (@subterm T ts2 ts1), is_true (@PCM.valid (@union_map_classPCM K T U) (@interp K T U k ts2)) *)
by case/(subterm_sound A2 (sc_wf S2 A1))=>xs /domeqP []; rewrite V=>/validL ->.
Qed.
End ValidO.
Arguments validO [K T U j k ts1 ts2 f1 f2] _ _.
Example ex0 (x y z : nat) (v1 v2 : nat) h:
valid (Unit \+ y \\-> v1 \+ h \+ x \\-> v1) ->
valid (x \\-> v2 \+ Unit).
Proof. by move=>V; rewrite (validO V). Abort.
Module ValidX.
Section ValidX.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (j : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Structure packed_map (m : U) := Pack {unpack : U}.
Canonical equate (m : U) := Pack m m.
Definition raxiom j ts1 m (b : bool) (pivot : packed_map m) :=
all (wf j) ts1 -> valid (interp j ts1) -> b -> valid (unpack pivot).
Structure rform j ts1 m b :=
RForm {pivot :> packed_map m; _ : raxiom j ts1 b pivot}.
Lemma start_pf j k ts1 ts2 (f2 : form j k ts2) :
@raxiom j ts1 (untag f2) (subterm ts2 ts1) (equate f2).
Proof.
(* Goal: @raxiom j ts1 (@Syntactify.untag K T U (@Syntactify.pivot K T U j k ts2 f2)) (@subterm T ts2 ts1) (equate (@Syntactify.untag K T U (@Syntactify.pivot K T U j k ts2 f2))) *)
case: f2=>f2 [<- S A2] A1; rewrite (sc_interp S A1)=>V.
(* Goal: forall _ : is_true (@subterm T ts2 ts1), is_true (@PCM.valid (@union_map_classPCM K T U) (@unpack (@interp K T U k ts2) (equate (@interp K T U k ts2)))) *)
case/(subterm_sound A2 (sc_wf S A1))=>xs.
(* Goal: forall _ : is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@interp K T U k ts2) xs) (@interp K T U k ts1)), is_true (@PCM.valid (@union_map_classPCM K T U) (@unpack (@interp K T U k ts2) (equate (@interp K T U k ts2)))) *)
by case/domeqP; rewrite V=>/validL ->.
Qed.
Canonical start j k ts1 ts2 f2 := RForm (@start_pf j k ts1 ts2 f2).
End ValidX.
Module Exports.
Canonical equate.
Canonical start.
Section Exports.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (j : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Lemma validX m j ts1 (f1 : form (empx U) j ts1) (g: rform j ts1 m true) :
valid (untag f1) -> valid (unpack (pivot g)).
Proof.
(* Goal: forall _ : is_true (@PCM.valid (@union_map_classPCM K T U) (@Syntactify.untag K T U (@Syntactify.pivot K T U (@empx K T U) j ts1 f1))), is_true (@PCM.valid (@union_map_classPCM K T U) (@unpack K T U m (@pivot K T U j ts1 m true g))) *)
by case: g f1; case=>pivot H [f1][<- Sc A] /(H A); apply.
Qed.
End Exports.
Arguments validX [K T U m j ts1 f1 g] _.
Example ex0 (x y z : nat) (v1 v2 : nat) h:
valid (Unit \+ y \\-> v1 \+ h \+ x \\-> v1) ->
valid (x \\-> v2 \+ Unit).
Proof. apply: validX. Abort.
End Exports.
End ValidX.
Export ValidX.Exports.
Section DomeqO.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (j : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Lemma domeqO j k rs1 rs2 ts1 ts2
(f1 : form (empx U) j ts1) (f2 : form j k ts2) :
subtract ts1 ts2 [::] = (rs1, rs2) ->
dom_eq (pprint k (rev rs1)) (pprint k rs2) ->
dom_eq (untag f1) (untag f2).
Proof.
(* Goal: forall (_ : @eq (prod (list (term T)) (list (term T))) (@subtract T ts1 ts2 (@nil (term T))) (@pair (list (term T)) (list (term T)) rs1 rs2)) (_ : is_true (@UMC.dom_eq K T U (@pprint K T U k (@rev (term T) rs1)) (@pprint K T U k rs2))), is_true (@UMC.dom_eq K T U (@Syntactify.untag K T U (@Syntactify.pivot K T U (@empx K T U) j ts1 f1)) (@Syntactify.untag K T U (@Syntactify.pivot K T U j k ts2 f2))) *)
case: f1 f2=>f1 [<- _ A1][f2][<- S A2].
(* Goal: forall (_ : @eq (prod (list (term T)) (list (term T))) (@subtract T ts1 ts2 (@nil (term T))) (@pair (list (term T)) (list (term T)) rs1 rs2)) (_ : is_true (@UMC.dom_eq K T U (@pprint K T U k (@rev (term T) rs1)) (@pprint K T U k rs2))), is_true (@UMC.dom_eq K T U (@interp K T U j ts1) (@interp K T U k ts2)) *)
case/(subtract_sound (sc_wf S A1) A2)=>// ys [/= D1 D2].
(* Goal: forall _ : is_true (@UMC.dom_eq K T U (@pprint K T U k (@rev (term T) rs1)) (@pprint K T U k rs2)), is_true (@UMC.dom_eq K T U (@interp K T U j ts1) (@interp K T U k ts2)) *)
rewrite unitR in D1; rewrite (sc_interp S A1).
(* Goal: forall _ : is_true (@UMC.dom_eq K T U (@pprint K T U k (@rev (term T) rs1)) (@pprint K T U k rs2)), is_true (@UMC.dom_eq K T U (@interp K T U k ts1) (@interp K T U k ts2)) *)
rewrite !pp_interp interp_rev => D; apply: domeq_trans D1 _.
(* Goal: is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@interp K T U k rs1) ys) (@interp K T U k ts2)) *)
rewrite domeq_sym; apply: domeq_trans D2 _.
(* Goal: is_true (@UMC.dom_eq K T U (@PCM.join (@union_map_classPCM K T U) (@interp K T U k rs2) ys) (@PCM.join (@union_map_classPCM K T U) (@interp K T U k rs1) ys)) *)
by rewrite domeq_sym; apply: domeqUn.
Qed.
End DomeqO.
Example ex0 (x y z : nat) (v1 v2 : nat) h:
dom_eq (Unit \+ y \\-> v1 \+ h \+ x \\-> v1) (x \\-> v2 \+ Unit).
Proof. apply: domeqO=>//=. Abort.
Module DomeqX.
Section DomeqX.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (j : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Structure packed_map (m : U) := Pack {unpack : U}.
Canonical equate (m : U) := Pack m m.
Definition raxiom j k ts1 m b (pivot : packed_map m) :=
all (wf j) ts1 -> sub_ctx j k /\
(dom_eq (interp k b.1) (interp k b.2) ->
dom_eq (interp k ts1) (unpack pivot)).
Structure rform j k ts1 m b :=
RForm {pivot :> packed_map m; _ : raxiom j k ts1 b pivot}.
Lemma start_pf j k ts1 ts2 (f2 : form j k ts2) :
@raxiom j k ts1 (untag f2) (subtract ts1 ts2 [::]) (equate f2).
Canonical start j k ts1 ts2 f2 := RForm (@start_pf j k ts1 ts2 f2).
End DomeqX.
Module Exports.
Canonical equate.
Canonical start.
Section Exports.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (j : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Lemma domeqX m j k rs1 rs2 ts1 (f1 : form (empx U) j ts1)
(g : rform j k ts1 m (rs1, rs2)) :
dom_eq (pprint k (rev rs1)) (pprint k rs2) ->
dom_eq (untag f1) (unpack (pivot g)).
Proof.
(* Goal: forall _ : is_true (@UMC.dom_eq K T U (@pprint K T U k (@rev (term T) rs1)) (@pprint K T U k rs2)), is_true (@UMC.dom_eq K T U (@Syntactify.untag K T U (@Syntactify.pivot K T U (@empx K T U) j ts1 f1)) (@unpack K T U m (@pivot K T U j k ts1 m (@pair (list (term T)) (list (term T)) rs1 rs2) g))) *)
case: g f1; case=>pivot R [f1][<- _ A1] /=; case/(_ A1): R=>S D.
(* Goal: forall _ : is_true (@UMC.dom_eq K T U (@pprint K T U k (@rev (term T) rs1)) (@pprint K T U k rs2)), is_true (@UMC.dom_eq K T U (@interp K T U j ts1) pivot) *)
by rewrite !pp_interp interp_rev (sc_interp S A1).
Qed.
End Exports.
Arguments domeqX [K T U m j k rs1 rs2 ts1 f1 g] _.
Example ex0 (x y z : nat) (v1 v2 : nat) h:
dom_eq (Unit \+ y \\-> v1 \+ h \+ x \\-> v1) (x \\-> v2 \+ Unit).
Proof. apply: domeqX=>/=. Abort.
End Exports.
End DomeqX.
Export DomeqX.Exports.
Section InvalidO.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (i : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Lemma undefO i ts (f : form (empx U) i ts) :
isundef i ts -> untag f = um_undef.
Proof.
(* Goal: forall _ : is_true (@isundef K T U i ts), @eq (@UMC.sort K T U) (@Syntactify.untag K T U (@Syntactify.pivot K T U (@empx K T U) i ts f)) (@UMC.um_undef K T U) *)
by case: f=>f [<- _ A] /(isundef_sound A)/invalidE.
Qed.
Lemma invalidO i ts (f : form (empx U) i ts) :
isundef i ts -> valid (untag f) = false.
Proof.
(* Goal: forall _ : is_true (@isundef K T U i ts), @eq bool (@PCM.valid (@union_map_classPCM K T U) (@Syntactify.untag K T U (@Syntactify.pivot K T U (@empx K T U) i ts f))) false *)
by move/undefO=>->; rewrite valid_undef.
Qed.
End InvalidO.
Example ex0 (x y z : nat) (v1 v2 : nat) h:
(Unit \+ y \\-> v1 \+ h \+ y \\-> v1) = um_undef.
Proof. by apply: undefO. Abort.
Module InvalidX.
Section InvalidX.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (i : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Structure packed_map (m : U) := Pack {unpack : U}.
Canonical equate (m : U) := Pack m m.
Definition raxiom i ts m b (pivot : packed_map m) :=
b -> valid (unpack pivot) = false.
Structure rform i ts m b :=
RForm {pivot :> packed_map m; _ : raxiom i ts b pivot}.
Lemma start_pf i ts (f : form (empx U) i ts) :
@raxiom i ts (untag f) (isundef i ts) (equate f).
Canonical start i ts f := RForm (@start_pf i ts f).
End InvalidX.
Module Exports.
Canonical equate.
Canonical start.
Section Exports.
Variables (K : ordType) (T : Type) (U : union_map_class K T).
Implicit Types (i : ctx U) (ts : seq (term T)).
Notation form := Syntactify.form.
Notation untag := Syntactify.untag.
Lemma undefX m i ts (g : rform i ts m true) : unpack (pivot g) = um_undef.
Proof.
(* Goal: @eq (@UMC.sort K T U) (@unpack K T U m (@pivot K T U i ts m (is_true true) g)) (@UMC.um_undef K T U) *)
by case: g; case=>pivot /= /(_ (erefl _))/negbT/invalidE.
Qed.
Lemma invalidX m i ts (g : rform i ts m true) :
valid (unpack (pivot g)) = false.
Proof.
(* Goal: @eq bool (@PCM.valid (@union_map_classPCM K T U) (@unpack K T U m (@pivot K T U i ts m (is_true true) g))) false *)
by rewrite undefX valid_undef.
Qed.
End Exports.
Arguments invalidX [K T U m i ts g].
Example ex0 (x y z : nat) (v1 v2 : nat) h:
valid (Unit \+ y \\-> v1 \+ h \+ y \\-> v1).
Proof. rewrite invalidX. Abort.
End Exports.
End InvalidX.
Export InvalidX.Exports.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Cfield_facts.
Section Def.
Variable R : CFIELD.
Record Ctype : Type := {real :> R; imag : R}.
Definition Cadd (z z' : Ctype) : Ctype :=
Build_Ctype (sgroup_law R (real z) (real z'))
(sgroup_law R (imag z) (imag z')).
Definition Cmult (z z' : Ctype) : Ctype :=
Build_Ctype
(sgroup_law R (ring_mult (real z) (real z'))
(group_inverse R (ring_mult (imag z) (imag z'))))
(sgroup_law R (ring_mult (real z) (imag z'))
(ring_mult (imag z) (real z'))).
Definition Copp (z : Ctype) : Ctype :=
Build_Ctype (group_inverse R (real z)) (group_inverse R (imag z)).
Definition Cone : Ctype := Build_Ctype (ring_unit R) (monoid_unit R).
Definition Czero : Ctype := Build_Ctype (monoid_unit R) (monoid_unit R).
Definition Ceq (z z' : Ctype) :=
Equal (real z) (real z') /\ Equal (imag z) (imag z').
Definition Cset : Setoid.
Proof.
(* Goal: Setoid *)
apply (Build_Setoid (Carrier:=Ctype) (Equal:=Ceq)).
(* Goal: @equivalence Ctype Ceq *)
red in |- *.
(* Goal: and (@reflexive Ctype Ceq) (@partial_equivalence Ctype Ceq) *)
split; [ red in |- * | red in |- * ].
(* Goal: and (@transitive Ctype Ceq) (@symmetric Ctype Ceq) *)
(* Goal: forall x : Ctype, @app_rel Ctype Ceq x x *)
intros x; red in |- *; red in |- *; auto with algebra.
(* Goal: and (@transitive Ctype Ceq) (@symmetric Ctype Ceq) *)
split; [ red in |- * | red in |- * ].
(* Goal: forall (x y : Ctype) (_ : @app_rel Ctype Ceq x y), @app_rel Ctype Ceq y x *)
(* Goal: forall (x y z : Ctype) (_ : @app_rel Ctype Ceq x y) (_ : @app_rel Ctype Ceq y z), @app_rel Ctype Ceq x z *)
unfold app_rel, Ceq in |- *.
(* Goal: forall (x y : Ctype) (_ : @app_rel Ctype Ceq x y), @app_rel Ctype Ceq y x *)
(* Goal: forall (x y z : Ctype) (_ : and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real x) (real y)) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag x) (imag y))) (_ : and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real y) (real z)) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag y) (imag z))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real x) (real z)) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag x) (imag z)) *)
intros x y z H' H'0; split; [ try assumption | idtac ].
(* Goal: forall (x y : Ctype) (_ : @app_rel Ctype Ceq x y), @app_rel Ctype Ceq y x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag x) (imag z) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real x) (real z) *)
apply Trans with (real y); intuition.
(* Goal: forall (x y : Ctype) (_ : @app_rel Ctype Ceq x y), @app_rel Ctype Ceq y x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag x) (imag z) *)
apply Trans with (imag y); intuition.
(* Goal: forall (x y : Ctype) (_ : @app_rel Ctype Ceq x y), @app_rel Ctype Ceq y x *)
unfold app_rel, Ceq in |- *.
(* Goal: forall (x y : Ctype) (_ : and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real x) (real y)) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag x) (imag y))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real y) (real x)) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag y) (imag x)) *)
intuition.
Qed.
Require Export Ring_util.
Lemma Build_Ctype_comp :
forall x x' y y' : R,
Equal x x' ->
Equal y y' -> Equal (s:=Cset) (Build_Ctype x y) (Build_Ctype x' y').
Proof.
(* Goal: forall (x x' y y' : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) x x') (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) y y'), @Equal Cset (Build_Ctype x y) (Build_Ctype x' y') *)
intros x x' y y' H' H'0; try assumption.
(* Goal: @Equal Cset (Build_Ctype x y) (Build_Ctype x' y') *)
simpl in |- *.
(* Goal: Ceq (Build_Ctype x y) (Build_Ctype x' y') *)
red in |- *; auto with algebra.
Qed.
Hint Resolve Build_Ctype_comp: algebra.
Lemma real_comp : forall x x' : Cset, Equal x x' -> Equal (real x) (real x').
Proof.
(* Goal: forall (x x' : Carrier Cset) (_ : @Equal Cset x x'), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real x) (real x') *)
simpl in |- *.
(* Goal: forall (x x' : Ctype) (_ : Ceq x x'), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real x) (real x') *)
unfold Ceq in |- *.
(* Goal: forall (x x' : Ctype) (_ : and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real x) (real x')) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag x) (imag x'))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real x) (real x') *)
intros x x' H'; elim H'; intros H'0 H'1; try exact H'0; clear H'.
Qed.
Hint Resolve real_comp: algebra.
Lemma imag_comp : forall x x' : Cset, Equal x x' -> Equal (imag x) (imag x').
Proof.
(* Goal: forall (x x' : Carrier Cset) (_ : @Equal Cset x x'), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag x) (imag x') *)
simpl in |- *.
(* Goal: forall (x x' : Ctype) (_ : Ceq x x'), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag x) (imag x') *)
unfold Ceq in |- *.
(* Goal: forall (x x' : Ctype) (_ : and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real x) (real x')) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag x) (imag x'))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag x) (imag x') *)
intros x x' H'; elim H'; intros H'0 H'1; try exact H'1; clear H'.
Qed.
Hint Resolve imag_comp: algebra.
Lemma Build_Ctype_comp2 :
forall x x' y y' : R,
Equal x x' -> Equal y y' -> Ceq (Build_Ctype x y) (Build_Ctype x' y').
Proof.
(* Goal: forall (x x' y y' : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) x x') (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) y y'), Ceq (Build_Ctype x y) (Build_Ctype x' y') *)
intros x x' y y' H' H'0; try assumption.
(* Goal: Ceq (Build_Ctype x y) (Build_Ctype x' y') *)
simpl in |- *.
(* Goal: Ceq (Build_Ctype x y) (Build_Ctype x' y') *)
red in |- *; auto with algebra.
Qed.
Hint Resolve Build_Ctype_comp2: algebra.
Definition Cring : RING.
Proof.
(* Goal: Ob RING *)
apply (BUILD_RING (E:=Cset) (ringplus:=Cadd) (ringmult:=Cmult) (zero:=Czero) (un:=Cone) (ringopp:=Copp)).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x Czero) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cadd (Cadd x y) z) (Cadd x (Cadd y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cadd x y) (Cadd x' y') *)
unfold Cadd in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x Czero) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cadd (Cadd x y) z) (Cadd x (Cadd y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag y))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x') (real y')) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x') (imag y'))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x Czero) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cadd (Cadd x y) z) (Cadd x (Cadd y z)) *)
unfold Cadd in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x Czero) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag y)))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag y)))) (imag z))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))))) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x Czero) x *)
(* Goal: forall x y z : Ctype, Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (imag z))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x Czero) x *)
unfold Cadd, Czero in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real (Build_Ctype (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag (Build_Ctype (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))))))) x *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: forall x : Ctype, Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))))) x *)
intros x; red in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) (real x)) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) (imag x)) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
(* Goal: and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (real x)) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (imag x)) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Copp x) (Copp y) *)
unfold Copp in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
(* Goal: forall (x y : Carrier Cset) (_ : @Equal Cset x y), @Equal Cset (Build_Ctype (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (real x)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x))) (Build_Ctype (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cadd x (Copp x)) Czero *)
unfold Cadd, Czero, Copp in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real (Build_Ctype (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (real x)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag (Build_Ctype (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (real x)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)))))) (Build_Ctype (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
(* Goal: forall x : Ctype, Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (real x))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))) (Build_Ctype (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Cadd x y) (Cadd y x) *)
unfold Cadd in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
(* Goal: forall x y : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag y))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real y) (real x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag x))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Cmult x y) (Cmult x' y') *)
unfold Cmult in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: forall (x x' y y' : Carrier Cset) (_ : @Equal Cset x x') (_ : @Equal Cset y y'), @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x') (real y')) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x') (imag y')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x') (imag y')) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x') (real y')))) *)
intros x x' y y' H' H'0; try assumption.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x') (real y')) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x') (imag y')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x') (imag y')) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x') (real y')))) *)
apply Build_Ctype_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x') (imag y')) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x') (real y'))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x') (real y')) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x') (imag y')))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x') (imag y')) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x') (real y'))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cmult x y) z) (Cmult x (Cmult y z)) *)
unfold Cmult in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y))))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y))))) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y))))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y))))) (real z)))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))))) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: forall x y z : Ctype, Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z)))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))))) *)
intros x y z; try assumption.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z)))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))))) *)
apply Build_Ctype_comp2.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
apply Trans with (sgroup_law R (sgroup_law R (ring_mult (ring_mult x y) z) (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) z)) (group_inverse R (sgroup_law R (ring_mult (ring_mult x (imag y)) (imag z)) (ring_mult (ring_mult (imag x) y) (imag z))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
apply Trans with (sgroup_law R (sgroup_law R (ring_mult x (ring_mult y z)) (ring_mult x (group_inverse R (ring_mult (imag y) (imag z))))) (group_inverse R (sgroup_law R (ring_mult (imag x) (ring_mult y (imag z))) (ring_mult (imag x) (ring_mult (imag y) z))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
apply Trans with (sgroup_law R (ring_mult (ring_mult x y) z) (sgroup_law R (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) z) (group_inverse R (sgroup_law R (ring_mult (ring_mult x (imag y)) (imag z)) (ring_mult (ring_mult (imag x) y) (imag z)))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
apply Trans with (sgroup_law R (ring_mult x (ring_mult y z)) (sgroup_law R (ring_mult x (group_inverse R (ring_mult (imag y) (imag z)))) (group_inverse R (sgroup_law R (ring_mult (imag x) (ring_mult y (imag z))) (ring_mult (imag x) (ring_mult (imag y) z)))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) *)
apply SGROUP_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
apply Trans with (sgroup_law R (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) z) (sgroup_law R (group_inverse R (ring_mult (ring_mult (imag x) y) (imag z))) (group_inverse R (ring_mult (ring_mult x (imag y)) (imag z))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
apply Trans with (sgroup_law R (ring_mult x (group_inverse R (ring_mult (imag y) (imag z)))) (sgroup_law R (group_inverse R (ring_mult (imag x) (ring_mult (imag y) z))) (group_inverse R (ring_mult (imag x) (ring_mult y (imag z)))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) *)
apply Trans with (sgroup_law R (group_inverse R (ring_mult (ring_mult x (imag y)) (imag z))) (sgroup_law R (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) z) (group_inverse R (ring_mult (ring_mult (imag x) y) (imag z))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) z) (sgroup_law R (group_inverse R (ring_mult (ring_mult x (imag y)) (imag z))) (group_inverse R (ring_mult (ring_mult (imag x) y) (imag z))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) *)
apply Trans with (sgroup_law R (group_inverse R (ring_mult (ring_mult x (imag y)) (imag z))) (sgroup_law R (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) z) (group_inverse R (ring_mult (ring_mult (imag x) y) (imag z))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) *)
apply SGROUP_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
apply Trans with (ring_mult (group_inverse R (ring_mult x (imag y))) (imag z)).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y))) (imag z)) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
apply Trans with (ring_mult (ring_mult x (group_inverse R (imag y))) (imag z)).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y))) (imag z)) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
apply Trans with (ring_mult x (ring_mult (group_inverse R (imag y)) (imag z))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)) (imag z))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))))) *)
apply SGROUP_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) *)
apply Trans with (group_inverse R (ring_mult (ring_mult (imag x) (imag y)) z)).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)) (real z))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
apply Trans with (sgroup_law R (sgroup_law R (ring_mult (ring_mult x y) (imag z)) (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) (imag z))) (sgroup_law R (ring_mult (ring_mult x (imag y)) z) (ring_mult (ring_mult (imag x) y) z))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
apply Trans with (sgroup_law R (sgroup_law R (ring_mult x (ring_mult y (imag z))) (ring_mult x (ring_mult (imag y) z))) (sgroup_law R (ring_mult (imag x) (ring_mult y z)) (ring_mult (imag x) (group_inverse R (ring_mult (imag y) (imag z)))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
apply Trans with (sgroup_law R (ring_mult (ring_mult x y) (imag z)) (sgroup_law R (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) (imag z)) (sgroup_law R (ring_mult (ring_mult x (imag y)) z) (ring_mult (ring_mult (imag x) y) z)))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
apply Trans with (sgroup_law R (ring_mult x (ring_mult y (imag z))) (sgroup_law R (ring_mult x (ring_mult (imag y) z)) (sgroup_law R (ring_mult (imag x) (ring_mult y z)) (ring_mult (imag x) (group_inverse R (ring_mult (imag y) (imag z))))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) *)
apply SGROUP_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
apply Trans with (sgroup_law R (ring_mult (ring_mult x (imag y)) z) (sgroup_law R (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) (imag z)) (ring_mult (ring_mult (imag x) y) z))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
apply SGROUP_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult (ring_mult (imag x) y) z) (ring_mult (group_inverse R (ring_mult (imag x) (imag y))) (imag z))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
apply SGROUP_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
apply Trans with (group_inverse R (ring_mult (ring_mult (imag x) (imag y)) (imag z))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (imag z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)) (imag z))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
apply Trans with (group_inverse R (ring_mult (imag x) (ring_mult (imag y) (imag z)))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult x Cone) x *)
unfold Cmult, Cone in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real (Build_Ctype (ring_unit (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag (Build_Ctype (ring_unit (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag (Build_Ctype (ring_unit (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real (Build_Ctype (ring_unit (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))))))) x *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall x : Ctype, Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (ring_unit (cring_ring (cfield_ring R)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (ring_unit (cring_ring (cfield_ring R)))))) x *)
intros x; try assumption.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (ring_unit (cring_ring (cfield_ring R)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (ring_unit (cring_ring (cfield_ring R)))))) x *)
elim x.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall real0 imag0 : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))), Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype real0 imag0)) (ring_unit (cring_ring (cfield_ring R)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype real0 imag0)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype real0 imag0)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype real0 imag0)) (ring_unit (cring_ring (cfield_ring R)))))) (Build_Ctype real0 imag0) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall real imag : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))), Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real (ring_unit (cring_ring (cfield_ring R)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) imag (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) imag (ring_unit (cring_ring (cfield_ring R)))))) (Build_Ctype real imag) *)
unfold Ceq in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall real0 imag0 : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real0 (ring_unit (cring_ring (cfield_ring R)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) imag0 (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real0 (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) imag0 (ring_unit (cring_ring (cfield_ring R))))))) (real (Build_Ctype real0 imag0))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real0 (ring_unit (cring_ring (cfield_ring R)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) imag0 (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real0 (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) imag0 (ring_unit (cring_ring (cfield_ring R))))))) (imag (Build_Ctype real0 imag0))) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: forall real imag : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real (ring_unit (cring_ring (cfield_ring R)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) imag (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) real) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) imag (ring_unit (cring_ring (cfield_ring R))))) imag) *)
intros real0 imag0; split; [ try assumption | idtac ].
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real0 (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) imag0 (ring_unit (cring_ring (cfield_ring R))))) imag0 *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real0 (ring_unit (cring_ring (cfield_ring R)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) imag0 (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))) real0 *)
apply Trans with (sgroup_law R real0 (group_inverse R (monoid_unit R))); auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real0 (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) imag0 (ring_unit (cring_ring (cfield_ring R))))) imag0 *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) real0 (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))))) real0 *)
apply Trans with (sgroup_law R real0 (monoid_unit R)); auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) real0 (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@ring_mult (cring_ring (cfield_ring R)) imag0 (ring_unit (cring_ring (cfield_ring R))))) imag0 *)
apply Trans with (sgroup_law R (monoid_unit R) imag0); auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Cmult Cone x) x *)
unfold Cmult, Cone in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype (ring_unit (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))))) (real x)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag (Build_Ctype (ring_unit (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))))) (imag x)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype (ring_unit (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))))) (imag x)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag (Build_Ctype (ring_unit (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))))) (real x)))) x *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall x : Ctype, Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag x)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) (imag x)) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real x)))) x *)
intros x; try assumption.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag x)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) (imag x)) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real x)))) x *)
elim x.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall real0 imag0 : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))), Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) (real (Build_Ctype real0 imag0))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag (Build_Ctype real0 imag0))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) (imag (Build_Ctype real0 imag0))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real (Build_Ctype real0 imag0))))) (Build_Ctype real0 imag0) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall real imag : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))), Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) real) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) imag))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) imag) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) real))) (Build_Ctype real imag) *)
unfold Ceq in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall real0 imag0 : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) real0) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) imag0))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) imag0) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) real0)))) (real (Build_Ctype real0 imag0))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) real0) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) imag0))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) imag0) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) real0)))) (imag (Build_Ctype real0 imag0))) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: forall real imag : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) real) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) imag))) real) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) imag) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) real)) imag) *)
intros real0 imag0; split; [ try assumption | idtac ].
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) imag0) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) real0)) imag0 *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) real0) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) imag0))) real0 *)
apply Trans with (sgroup_law R real0 (group_inverse R (monoid_unit R))); auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) imag0) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) real0)) imag0 *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) real0 (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))))) real0 *)
apply Trans with (sgroup_law R real0 (monoid_unit R)); auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (ring_unit (cring_ring (cfield_ring R))) imag0) (@ring_mult (cring_ring (cfield_ring R)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) real0)) imag0 *)
apply Trans with (sgroup_law R imag0 (monoid_unit R)); auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult x (Cadd y z)) (Cadd (Cmult x y) (Cmult x z)) *)
unfold Cmult, Cadd in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))))) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Ctype, Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z))))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))))) *)
unfold Ceq in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Ctype, and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))))))) *)
simpl in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: forall x y z : Ctype, and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))))) *)
intros x y z; split; [ try assumption | idtac ].
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
apply Trans with (sgroup_law R (sgroup_law R (ring_mult x y) (ring_mult x z)) (group_inverse R (ring_mult (imag x) (sgroup_law R (imag y) (imag z))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult x y) (sgroup_law R (ring_mult x z) (group_inverse R (ring_mult (imag x) (sgroup_law R (imag y) (imag z)))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult x y) (sgroup_law R (group_inverse R (ring_mult (imag x) (imag y))) (sgroup_law R (ring_mult x z) (group_inverse R (ring_mult (imag x) (imag z)))))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) *)
apply SGROUP_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult x z) (ring_mult (group_inverse R (imag x)) (sgroup_law R (imag y) (imag z)))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult x z) (sgroup_law R (ring_mult (group_inverse R (imag x)) (imag y)) (ring_mult (group_inverse R (imag x)) (imag z)))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult (group_inverse R (imag x)) (imag y)) (sgroup_law R (ring_mult x z) (ring_mult (group_inverse R (imag x)) (imag z)))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
apply Trans with (sgroup_law R (sgroup_law R (ring_mult x (imag y)) (ring_mult x (imag z))) (sgroup_law R (ring_mult (imag x) y) (ring_mult (imag x) z))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag y) (imag z))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
apply Trans with (sgroup_law R (ring_mult x (imag y)) (sgroup_law R (ring_mult x (imag z)) (sgroup_law R (ring_mult (imag x) y) (ring_mult (imag x) z)))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
apply Trans with (sgroup_law R (ring_mult x (imag y)) (sgroup_law R (ring_mult (imag x) y) (sgroup_law R (ring_mult x (imag z)) (ring_mult (imag x) z)))).
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) *)
apply SGROUP_comp.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z)))) *)
auto with algebra.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Cmult (Cadd x y) z) (Cadd (Cmult x z) (Cmult y z)) *)
unfold Cmult, Cadd in |- *.
(* Goal: forall x y z : Carrier Cset, @Equal Cset (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag y)))) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag y)))) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag y)))) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real x) (real y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag x) (imag y)))) (real z)))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))))) *)
simpl in |- *.
(* Goal: forall x y z : Ctype, Ceq (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z)))) (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z))))) *)
unfold Ceq in |- *.
(* Goal: forall x y z : Ctype, and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))))) (real (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))))) (imag (Build_Ctype (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z))))))) *)
simpl in |- *.
(* Goal: forall x y z : Ctype, and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z)))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z))))) *)
intros x y z; split; [ try assumption | idtac ].
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
apply Trans with (sgroup_law R (sgroup_law R (ring_mult x z) (ring_mult y z)) (group_inverse R (sgroup_law R (ring_mult (imag x) (imag z)) (ring_mult (imag y) (imag z))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult x z) (sgroup_law R (ring_mult y z) (group_inverse R (sgroup_law R (ring_mult (imag x) (imag z)) (ring_mult (imag y) (imag z)))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult x z) (sgroup_law R (group_inverse R (ring_mult (imag x) (imag z))) (sgroup_law R (ring_mult y z) (group_inverse R (ring_mult (imag y) (imag z)))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) *)
apply SGROUP_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult y z) (sgroup_law R (group_inverse R (ring_mult (imag y) (imag z))) (group_inverse R (ring_mult (imag x) (imag z))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
apply Trans with (sgroup_law R (ring_mult y z) (sgroup_law R (group_inverse R (ring_mult (imag x) (imag z))) (group_inverse R (ring_mult (imag y) (imag z))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (imag z)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real z)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag z))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
apply Trans with (sgroup_law R (sgroup_law R (ring_mult x (imag z)) (ring_mult y (imag z))) (sgroup_law R (ring_mult (imag x) z) (ring_mult (imag y) z))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (real x) (real y)) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (imag x) (imag y)) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
apply Trans with (sgroup_law R (ring_mult x (imag z)) (sgroup_law R (ring_mult y (imag z)) (sgroup_law R (ring_mult (imag x) z) (ring_mult (imag y) z)))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
apply Trans with (sgroup_law R (ring_mult x (imag z)) (sgroup_law R (ring_mult (imag x) z) (sgroup_law R (ring_mult y (imag z)) (ring_mult (imag y) z)))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) *)
apply SGROUP_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z)))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (imag z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag x) (real z)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real z))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real z))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag z)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real z)))) *)
auto with algebra.
Qed.
Definition Ccring : CRING.
Proof.
(* Goal: Ob CRING *)
apply (Build_cring (cring_ring:=Cring)).
(* Goal: cring_on Cring *)
apply (Build_cring_on (R:=Cring)).
(* Goal: @commutative (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (sgroup_on_def (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring)))))) *)
red in |- *.
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))), @Equal (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (@Ap (cart (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring)))))) (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (sgroup_on_def (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring)))))) (@couple (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) x y)) (@Ap (cart (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring)))))) (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (sgroup_on_def (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring)))))) (@couple (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) (sgroup_set (monoid_sgroup (@Build_monoid (@Build_sgroup (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group Cring))))) (@ring_mult_sgroup (ring_group Cring) (ring_on_def Cring))) (@ring_mult_monoid (ring_group Cring) (ring_on_def Cring))))) y x)) *)
simpl in |- *.
(* Goal: forall x y : Ctype, Ceq (Cmult x y) (Cmult y x) *)
unfold Cmult, Ceq in |- *; simpl in |- *.
(* Goal: forall x y : Ctype, and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag x))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag x)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real x)))) *)
intros x y; split; [ try assumption | idtac ].
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag x)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real x))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (imag y)))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (imag x)))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (imag x)) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (real x))) *)
apply Trans with (sgroup_law R (ring_mult (imag y) x) (ring_mult y (imag x))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real x)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag x))) *)
apply SGROUP_comp; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag x)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (imag y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (imag y) (real x)) *)
exact (CRING_com (R1:=R) x (imag y)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (real y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (imag x)) *)
exact (CRING_com (R1:=R) (imag x) y).
Qed.
Definition conjugate (z : Ctype) : Ctype :=
Build_Ctype (real z) (group_inverse R (imag z)).
Definition CdivR (z : Ctype) (r : R) : Ctype :=
Build_Ctype (field_div (real z) r) (field_div (imag z) r).
Definition Cinv (z : Ctype) : Ctype :=
CdivR (conjugate z) (Cmult z (conjugate z)).
Definition Cinv_map : MAP Ccring Ccring.
Proof.
(* Goal: Carrier (MAP (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) *)
apply (Build_Map (A:=Ccring) (B:=Ccring) (Ap:=Cinv)).
(* Goal: @fun_compatible (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv *)
red in |- *.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (Cinv x) (Cinv y) *)
unfold Cinv in |- *.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (CdivR (conjugate x) (real (Cmult x (conjugate x)))) (CdivR (conjugate y) (real (Cmult y (conjugate y)))) *)
unfold CdivR in |- *.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (Build_Ctype (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real (conjugate x)) (real (Cmult x (conjugate x)))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (imag (conjugate x)) (real (Cmult x (conjugate x))))) (Build_Ctype (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real (conjugate y)) (real (Cmult y (conjugate y)))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (imag (conjugate y)) (real (Cmult y (conjugate y))))) *)
unfold conjugate in |- *.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (Build_Ctype (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real (Build_Ctype (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)))) (real (Cmult x (Build_Ctype (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (imag (Build_Ctype (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)))) (real (Cmult x (Build_Ctype (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x))))))) (Build_Ctype (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real (Build_Ctype (real y) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)))) (real (Cmult y (Build_Ctype (real y) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (imag (Build_Ctype (real y) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)))) (real (Cmult y (Build_Ctype (real y) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y))))))) *)
intros x y H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (Build_Ctype (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real (Build_Ctype (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)))) (real (Cmult x (Build_Ctype (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (imag (Build_Ctype (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x)))) (real (Cmult x (Build_Ctype (real x) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag x))))))) (Build_Ctype (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real (Build_Ctype (real y) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)))) (real (Cmult y (Build_Ctype (real y) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (imag (Build_Ctype (real y) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y)))) (real (Cmult y (Build_Ctype (real y) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (imag y))))))) *)
simpl in |- *.
(* Goal: Ceq (Build_Ctype (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))))) (Build_Ctype (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real y) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) *)
unfold Ceq in |- *; simpl in |- *.
(* Goal: and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real y) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) *)
simpl in H'.
(* Goal: and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real y) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) *)
red in H'.
(* Goal: and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real y) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) *)
elim H'; intros H'0 H'1; try exact H'0; clear H'.
(* Goal: and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real y) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) *)
split; [ try assumption | idtac ].
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real y) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
unfold field_div in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real y) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) *)
apply RING_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real x) (real y) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
apply FIELD_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))) *)
apply SGROUP_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
unfold field_div in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))))) *)
apply RING_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))))) *)
apply FIELD_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y))))) *)
apply SGROUP_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (@ring_mult (cring_ring (cfield_ring R)) (real y) (real y)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag y) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag y)))) *)
auto with algebra.
Qed.
Hypothesis
sum_of_square :
forall x y : R,
Equal (sgroup_law R (ring_mult x x) (ring_mult y y)) (monoid_unit R) ->
Equal x (monoid_unit R) /\ Equal y (monoid_unit R).
Lemma C_inv_r :
forall x : Ccring,
~ Equal x (monoid_unit Ccring) ->
Equal (ring_mult x (Ap Cinv_map x)) (ring_unit Ccring).
Proof.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x)) (ring_unit (cring_ring Ccring)) *)
intros x; try assumption.
(* Goal: forall _ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x)) (ring_unit (cring_ring Ccring)) *)
simpl in |- *.
(* Goal: forall _ : not (Ceq x Czero), Ceq (@ring_mult Cring x (Cinv x)) (ring_unit Cring) *)
unfold Ceq in |- *; simpl in |- *.
(* Goal: forall _ : not (and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))))))) (ring_unit (cring_ring (cfield_ring R)))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (@field_div (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (real x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) *)
unfold field_div in |- *.
(* Goal: forall _ : not (and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))))))) (ring_unit (cring_ring (cfield_ring R)))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x)))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real x) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real x) (real x)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag x) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag x))))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) *)
elim x.
(* Goal: forall (real0 imag0 : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))) (_ : not (and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real (Build_Ctype real0 imag0)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag (Build_Ctype real0 imag0)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype real0 imag0)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype real0 imag0)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype real0 imag0)) (real (Build_Ctype real0 imag0))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype real0 imag0)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype real0 imag0))))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype real0 imag0)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype real0 imag0))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype real0 imag0)) (real (Build_Ctype real0 imag0))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype real0 imag0)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype real0 imag0))))))))))) (ring_unit (cring_ring (cfield_ring R)))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype real0 imag0)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype real0 imag0))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype real0 imag0)) (real (Build_Ctype real0 imag0))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype real0 imag0)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype real0 imag0))))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype real0 imag0)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype real0 imag0)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype real0 imag0)) (real (Build_Ctype real0 imag0))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype real0 imag0)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype real0 imag0)))))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) *)
intros r i; try assumption.
(* Goal: forall _ : not (and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (real (Build_Ctype r i)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (imag (Build_Ctype r i)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype r i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype r i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype r i)) (real (Build_Ctype r i))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype r i)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype r i))))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype r i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype r i))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype r i)) (real (Build_Ctype r i))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype r i)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype r i))))))))))) (ring_unit (cring_ring (cfield_ring R)))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype r i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype r i))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype r i)) (real (Build_Ctype r i))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype r i)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype r i))))))))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype r i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (real (Build_Ctype r i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) (real (Build_Ctype r i)) (real (Build_Ctype r i))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) (imag (Build_Ctype r i)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (imag (Build_Ctype r i)))))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) *)
simpl in |- *.
(* Goal: forall _ : not (and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) r (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) i (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))))), and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))))) (ring_unit (cring_ring (cfield_ring R)))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) *)
intros H'; split; [ try assumption | idtac ].
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))))) (ring_unit (cring_ring (cfield_ring R))) *)
apply Trans with (sgroup_law R (ring_mult (ring_mult r r) (field_inverse (sgroup_law R (ring_mult r r) (group_inverse R (ring_mult i (group_inverse R i)))))) (group_inverse R (ring_mult (ring_mult i (group_inverse R i)) (field_inverse (sgroup_law R (ring_mult r r) (group_inverse R (ring_mult i (group_inverse R i)))))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))))) (ring_unit (cring_ring (cfield_ring R))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))))) (ring_unit (cring_ring (cfield_ring R))) *)
apply Trans with (sgroup_law (Build_field R) (ring_mult (ring_mult r r) (field_inverse (sgroup_law (Build_field R) (ring_mult r r) (group_inverse (Build_field R) (ring_mult i (group_inverse (Build_field R) i)))))) (ring_mult (group_inverse (Build_field R) (ring_mult i (group_inverse (Build_field R) i))) (field_inverse (sgroup_law (Build_field R) (ring_mult r r) (group_inverse (Build_field R) (ring_mult i (group_inverse (Build_field R) i))))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))))) (ring_unit (cring_ring (cfield_ring R))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))))) (ring_unit (cring_ring (cfield_ring R))) *)
apply Trans with (ring_mult (sgroup_law (Build_field R) (ring_mult r r) (group_inverse (Build_field R) (ring_mult i (group_inverse (Build_field R) i)))) (field_inverse (sgroup_law (Build_field R) (ring_mult r r) (group_inverse (Build_field R) (ring_mult i (group_inverse (Build_field R) i)))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (ring_unit (cring_ring (cfield_ring R))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (ring_unit (cring_ring (cfield_ring R))) *)
apply (FIELD_inverse_r (K:=R)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))))) *)
red in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))), False *)
intros H'0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: False *)
cut (Equal (sgroup_law (Build_field R) (ring_mult r r) (ring_mult i i)) (monoid_unit (Build_field R))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))), False *)
intros H'1; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: False *)
absurd (Equal r (monoid_unit R) /\ Equal i (monoid_unit R)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
apply Trans with (sgroup_law (Build_field R) (ring_mult r r) (group_inverse (Build_field R) (ring_mult i (group_inverse (Build_field R) i)))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) *)
apply SGROUP_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))) *)
apply Trans with (group_inverse (Build_field R) (group_inverse (Build_field R) (ring_mult i i))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i i))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
apply Trans with (sgroup_law R (ring_mult (ring_mult r (group_inverse R i)) (field_inverse (sgroup_law R (ring_mult r r) (group_inverse R (ring_mult i (group_inverse R i)))))) (ring_mult (ring_mult i r) (field_inverse (sgroup_law R (ring_mult r r) (group_inverse R (ring_mult i (group_inverse R i))))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r (@ring_mult (cring_ring (cfield_ring R)) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i))))))) (@ring_mult (cring_ring (cfield_ring R)) i (@ring_mult (cring_ring (cfield_ring R)) r (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (@ring_mult (cring_ring (cfield_ring R)) r r) (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) (@ring_mult (cring_ring (cfield_ring R)) i (group_inverse (abelian_group_group (ring_group (cring_ring (cfield_ring R)))) i)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
apply Trans with (ring_mult (sgroup_law (Build_field R) (ring_mult r (group_inverse (Build_field R) i)) (ring_mult i r)) (field_inverse (sgroup_law R (ring_mult r r) (group_inverse R (ring_mult i (group_inverse R i)))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
apply Trans with (ring_mult (monoid_unit R) (field_inverse (sgroup_law R (ring_mult r r) (group_inverse R (ring_mult i (group_inverse R i)))))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) *)
apply RING_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
apply Trans with (sgroup_law (Build_field R) (group_inverse (Build_field R) (ring_mult r i)) (ring_mult i r)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
apply Trans with (sgroup_law (Build_field R) (group_inverse (Build_field R) (ring_mult i r)) (ring_mult i r)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r i)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i r)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) r r) (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))) i (group_inverse (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R))))) i)))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) *)
auto with algebra.
Qed.
Definition C_field_on : field_on Ccring.
Proof.
(* Goal: field_on (cring_ring Ccring) *)
apply (Build_field_on (R:=Ccring) (field_inverse_map:=Cinv_map)).
(* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (ring_unit (cring_ring Ccring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x) x) (ring_unit (cring_ring Ccring)) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x)) (ring_unit (cring_ring Ccring)) *)
exact C_inv_r.
(* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (ring_unit (cring_ring Ccring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x) x) (ring_unit (cring_ring Ccring)) *)
intros x H'; try assumption.
(* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (ring_unit (cring_ring Ccring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x) x) (ring_unit (cring_ring Ccring)) *)
apply Trans with (ring_mult x (Ap Cinv_map x)).
(* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (ring_unit (cring_ring Ccring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x)) (ring_unit (cring_ring Ccring)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x) x) (@ring_mult (cring_ring Ccring) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x)) *)
auto with algebra.
(* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (ring_unit (cring_ring Ccring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (@ring_mult (cring_ring Ccring) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) Cinv_map x)) (ring_unit (cring_ring Ccring)) *)
apply C_inv_r; auto with algebra.
(* Goal: not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring)))))) (ring_unit (cring_ring Ccring)) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring Ccring))))))) *)
simpl in |- *.
(* Goal: not (Ceq (ring_unit Cring) Czero) *)
unfold Ceq in |- *.
(* Goal: not (and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (real (ring_unit Cring)) (real Czero)) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring R)) (cfield_on_def R)))))))) (imag (ring_unit Cring)) (imag Czero))) *)
simpl in |- *.
(* Goal: not (and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (ring_unit (cring_ring (cfield_ring R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))))) *)
red in |- *.
(* Goal: forall _ : and (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (ring_unit (cring_ring (cfield_ring R))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R))))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (cfield_ring R)))))))), False *)
intros H'; try assumption.
(* Goal: False *)
elim H'; intros H'0 H'1; try exact H'0; clear H'.
(* Goal: False *)
absurd (Equal (ring_unit R) (monoid_unit R)); auto with algebra.
Qed.
Definition CC : CFIELD := Build_cfield C_field_on.
End Def. |
Require Export Arith.
Require Export Compare.
Lemma not_S_eq : forall n m : nat, S n <> S m -> n <> m.
Proof.
(* Goal: forall (n m : nat) (_ : not (@eq nat (S n) (S m))), not (@eq nat n m) *)
red in |- *; intros.
(* Goal: False *)
apply H; auto with arith.
Qed.
Hint Resolve not_S_eq.
Lemma neq_O_le : forall n : nat, n <> 0 -> 1 <= n.
Proof.
(* Goal: forall (n : nat) (_ : not (@eq nat n O)), le (S O) n *)
simple induction n; auto with arith.
Qed.
Hint Resolve neq_O_le.
Lemma lt_O : forall m n : nat, m < n -> 0 < n.
Proof.
(* Goal: forall (m n : nat) (_ : lt m n), lt O n *)
intros m n H.
(* Goal: lt O n *)
apply le_lt_trans with m; auto with arith.
Qed.
Hint Immediate lt_O.
Lemma lt_Ex_n : forall n : nat, 0 < n -> exists n0 : nat, n = S n0.
Proof.
(* Goal: forall (n : nat) (_ : lt O n), @ex nat (fun n0 : nat => @eq nat n (S n0)) *)
intros.
(* Goal: @ex nat (fun n0 : nat => @eq nat n (S n0)) *)
elim H.
(* Goal: forall (m : nat) (_ : le (S O) m) (_ : @ex nat (fun n0 : nat => @eq nat m (S n0))), @ex nat (fun n0 : nat => @eq nat (S m) (S n0)) *)
(* Goal: @ex nat (fun n0 : nat => @eq nat (S O) (S n0)) *)
exists 0; try trivial with arith.
(* Goal: forall (m : nat) (_ : le (S O) m) (_ : @ex nat (fun n0 : nat => @eq nat m (S n0))), @ex nat (fun n0 : nat => @eq nat (S m) (S n0)) *)
intros; exists m; try trivial with arith.
Qed.
Hint Resolve lt_Ex_n.
Lemma lt_m_neq : forall m n : nat, m < n -> n <> m.
Proof.
(* Goal: forall (m n : nat) (_ : lt m n), not (@eq nat n m) *)
simple induction m.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : lt n n0), not (@eq nat n0 n)) (n0 : nat) (_ : lt (S n) n0), not (@eq nat n0 (S n)) *)
(* Goal: forall (n : nat) (_ : lt O n), not (@eq nat n O) *)
simple induction n; auto with arith.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : lt n n0), not (@eq nat n0 n)) (n0 : nat) (_ : lt (S n) n0), not (@eq nat n0 (S n)) *)
clear m; intros m H_rec n H.
(* Goal: not (@eq nat n (S m)) *)
cut (exists p : nat, n = S p).
(* Goal: @ex nat (fun p : nat => @eq nat n (S p)) *)
(* Goal: forall _ : @ex nat (fun p : nat => @eq nat n (S p)), not (@eq nat n (S m)) *)
intros G; elim G; clear G.
(* Goal: @ex nat (fun p : nat => @eq nat n (S p)) *)
(* Goal: forall (x : nat) (_ : @eq nat n (S x)), not (@eq nat n (S m)) *)
intros p e.
(* Goal: @ex nat (fun p : nat => @eq nat n (S p)) *)
(* Goal: not (@eq nat n (S m)) *)
rewrite e.
(* Goal: @ex nat (fun p : nat => @eq nat n (S p)) *)
(* Goal: not (@eq nat (S p) (S m)) *)
apply not_eq_S.
(* Goal: @ex nat (fun p : nat => @eq nat n (S p)) *)
(* Goal: not (@eq nat p m) *)
apply H_rec.
(* Goal: @ex nat (fun p : nat => @eq nat n (S p)) *)
(* Goal: lt m p *)
apply lt_S_n.
(* Goal: @ex nat (fun p : nat => @eq nat n (S p)) *)
(* Goal: lt (S m) (S p) *)
elim e; try trivial with arith.
(* Goal: @ex nat (fun p : nat => @eq nat n (S p)) *)
apply lt_Ex_n.
(* Goal: lt O n *)
apply lt_O with (S m); try trivial with arith.
Qed.
Hint Resolve lt_m_neq.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Fpart.
Require Export Inter.
Require Export Arith.
Section fparts2_def.
Variable E : Setoid.
Definition disjoint (A B : part_set E) := Equal (inter A B) (empty E).
Lemma disjoint_comp :
forall A A' B B' : part_set E,
Equal A A' -> Equal B B' -> disjoint A B -> disjoint A' B'.
Proof.
(* Goal: forall (A A' B B' : Carrier (part_set E)) (_ : @Equal (part_set E) A A') (_ : @Equal (part_set E) B B') (_ : disjoint A B), disjoint A' B' *)
unfold disjoint in |- *.
(* Goal: forall (A A' B B' : Carrier (part_set E)) (_ : @Equal (part_set E) A A') (_ : @Equal (part_set E) B B') (_ : @Equal (part_set E) (@inter E A B) (empty E)), @Equal (part_set E) (@inter E A' B') (empty E) *)
intros A A' B B' H' H'0 H'1; try assumption.
(* Goal: @Equal (part_set E) (@inter E A' B') (empty E) *)
apply Trans with (inter A B).
(* Goal: @Equal (part_set E) (@inter E A B) (empty E) *)
(* Goal: @Equal (part_set E) (@inter E A' B') (@inter E A B) *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E A B) (empty E) *)
auto with *.
Qed.
Lemma empty_not_in :
forall A : part_set E, Equal A (empty E) -> forall x : E, ~ in_part x A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (_ : @Equal (part_set E) A (empty E)) (x : Carrier E), not (@in_part E x A) *)
intros A; case A; intros a pa; simpl in |- *.
(* Goal: forall (_ : @eq_part E (@Build_Predicate E a pa) (empty E)) (x : Carrier E), not (a x) *)
unfold eq_part, empty in |- *; simpl in |- *.
(* Goal: forall (_ : forall x : Carrier E, and (forall _ : a x, False) (forall _ : False, a x)) (x : Carrier E), not (a x) *)
intuition.
(* Goal: False *)
intros.
(* Goal: False *)
elim (H x); auto with *.
Qed.
Lemma disjoint_inclus :
forall A B C : part_set E, included A B -> disjoint B C -> disjoint A C.
Proof.
(* Goal: forall (A B C : Carrier (part_set E)) (_ : @included E A B) (_ : disjoint B C), disjoint A C *)
unfold included, disjoint in |- *.
(* Goal: forall (A B C : Carrier (part_set E)) (_ : forall (x : Carrier E) (_ : @in_part E x A), @in_part E x B) (_ : @Equal (part_set E) (@inter E B C) (empty E)), @Equal (part_set E) (@inter E A C) (empty E) *)
intros A B C H' H'0; try assumption.
(* Goal: @Equal (part_set E) (@inter E A C) (empty E) *)
apply not_in_empty.
(* Goal: forall x : Carrier E, not (@in_part E x (@inter E A C)) *)
unfold not in |- *; intros.
(* Goal: False *)
cut (in_part x (inter B C)).
(* Goal: @in_part E x (@inter E B C) *)
(* Goal: forall _ : @in_part E x (@inter E B C), False *)
generalize (empty_not_in (A:=inter B C) H'0).
(* Goal: @in_part E x (@inter E B C) *)
(* Goal: forall (_ : forall x : Carrier E, not (@in_part E x (@inter E B C))) (_ : @in_part E x (@inter E B C)), False *)
unfold not in |- *; intros.
(* Goal: @in_part E x (@inter E B C) *)
(* Goal: False *)
apply H0 with (x := x).
(* Goal: @in_part E x (@inter E B C) *)
(* Goal: @in_part E x (@inter E B C) *)
auto with *.
(* Goal: @in_part E x (@inter E B C) *)
auto with *.
(* Goal: @in_part E x (@inter E B C) *)
apply in_part_inter.
(* Goal: @in_part E x C *)
(* Goal: @in_part E x B *)
apply H'.
(* Goal: @in_part E x C *)
(* Goal: @in_part E x A *)
apply in_part_inter_l with C.
(* Goal: @in_part E x C *)
(* Goal: @in_part E x (@inter E A C) *)
auto with *.
(* Goal: @in_part E x C *)
apply in_part_inter_r with A.
(* Goal: @in_part E x (@inter E A C) *)
auto with *.
Qed.
Lemma included_add_part :
forall (A : part_set E) (x : E), included A (add_part A x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E), @included E A (@add_part E A x) *)
intros A x; red in |- *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 A), @in_part E x0 (@add_part E A x) *)
unfold add_part in |- *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 A), @in_part E x0 (@union E A (@single E x)) *)
auto with *.
Qed.
Hint Resolve included_add_part: algebra.
Lemma union_not_in :
forall (A B : part_set E) (x : E),
~ in_part x A -> ~ in_part x B -> ~ in_part x (union A B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)) (_ : not (@in_part E x B)), not (@in_part E x (@union E A B)) *)
unfold not in |- *; intros.
(* Goal: False *)
cut (in_part x A \/ in_part x B).
(* Goal: or (@in_part E x A) (@in_part E x B) *)
(* Goal: forall _ : or (@in_part E x A) (@in_part E x B), False *)
intros H'; try assumption.
(* Goal: or (@in_part E x A) (@in_part E x B) *)
(* Goal: False *)
intuition.
(* Goal: or (@in_part E x A) (@in_part E x B) *)
auto with *.
Qed.
Hint Resolve union_not_in: algebra.
Lemma disjoint_not_in_r :
forall (A B : part_set E) (x : E),
disjoint A B -> in_part x A -> ~ in_part x B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : disjoint A B) (_ : @in_part E x A), not (@in_part E x B) *)
unfold disjoint in |- *.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : @Equal (part_set E) (@inter E A B) (empty E)) (_ : @in_part E x A), not (@in_part E x B) *)
unfold not in |- *; intros.
(* Goal: False *)
cut (in_part x (empty E)).
(* Goal: @in_part E x (empty E) *)
(* Goal: forall _ : @in_part E x (empty E), False *)
auto with *.
(* Goal: @in_part E x (empty E) *)
apply in_part_comp_r with (inter A B).
(* Goal: @Equal (part_set E) (@inter E A B) (empty E) *)
(* Goal: @in_part E x (@inter E A B) *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E A B) (empty E) *)
auto with *.
Qed.
Lemma cardinal_union_disjoint :
forall (a b : nat) (A B : part_set E),
cardinal A a -> cardinal B b -> disjoint A B -> cardinal (union A B) (a + b).
Proof.
(* Goal: forall (a b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A a) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add a b) *)
simple induction a.
(* Goal: forall (n : nat) (_ : forall (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A n) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add n b)) (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A (S n)) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
(* Goal: forall (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A O) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add O b) *)
intros.
(* Goal: forall (n : nat) (_ : forall (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A n) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add n b)) (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A (S n)) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
(* Goal: @cardinal E (@union E A B) (Init.Nat.add O b) *)
apply cardinal_comp_l with (union (empty E) B); auto with *.
(* Goal: forall (n : nat) (_ : forall (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A n) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add n b)) (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A (S n)) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
(* Goal: @cardinal E (@union E (empty E) B) (Init.Nat.add O b) *)
(* Goal: @Equal (part_set E) (@union E (empty E) B) (@union E A B) *)
apply union_comp; auto with *.
(* Goal: forall (n : nat) (_ : forall (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A n) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add n b)) (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A (S n)) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
(* Goal: @cardinal E (@union E (empty E) B) (Init.Nat.add O b) *)
(* Goal: @Equal (part_set E) (empty E) A *)
apply Sym.
(* Goal: forall (n : nat) (_ : forall (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A n) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add n b)) (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A (S n)) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
(* Goal: @cardinal E (@union E (empty E) B) (Init.Nat.add O b) *)
(* Goal: @Equal (part_set E) A (empty E) *)
auto with *.
(* Goal: forall (n : nat) (_ : forall (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A n) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add n b)) (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A (S n)) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
(* Goal: @cardinal E (@union E (empty E) B) (Init.Nat.add O b) *)
apply cardinal_comp_l with B; auto with *.
(* Goal: forall (n : nat) (_ : forall (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A n) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add n b)) (b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A (S n)) (_ : @cardinal E B b) (_ : disjoint A B), @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
intros.
(* Goal: @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
inversion H0.
(* Goal: @cardinal E (@union E A B) (Init.Nat.add (S n) b) *)
simpl in |- *.
(* Goal: @cardinal E (@union E A B) (S (Init.Nat.add n b)) *)
apply cardinal_add with (union B0 B) x; auto with *.
(* Goal: @Equal (part_set E) (@union E A B) (@add_part E (@union E B0 B) x) *)
(* Goal: not (@in_part E x (@union E B0 B)) *)
(* Goal: @cardinal E (@union E B0 B) (Init.Nat.add n b) *)
apply H; auto with *.
(* Goal: @Equal (part_set E) (@union E A B) (@add_part E (@union E B0 B) x) *)
(* Goal: not (@in_part E x (@union E B0 B)) *)
(* Goal: disjoint B0 B *)
apply disjoint_inclus with (add_part B0 x); auto with *.
(* Goal: @Equal (part_set E) (@union E A B) (@add_part E (@union E B0 B) x) *)
(* Goal: not (@in_part E x (@union E B0 B)) *)
(* Goal: disjoint (@add_part E B0 x) B *)
apply disjoint_comp with A B; auto with *.
(* Goal: @Equal (part_set E) (@union E A B) (@add_part E (@union E B0 B) x) *)
(* Goal: not (@in_part E x (@union E B0 B)) *)
apply union_not_in; auto with *.
(* Goal: @Equal (part_set E) (@union E A B) (@add_part E (@union E B0 B) x) *)
(* Goal: not (@in_part E x B) *)
apply disjoint_not_in_r with A; auto with *.
(* Goal: @Equal (part_set E) (@union E A B) (@add_part E (@union E B0 B) x) *)
(* Goal: @in_part E x A *)
apply in_part_comp_r with (add_part B0 x); auto with *.
(* Goal: @Equal (part_set E) (@union E A B) (@add_part E (@union E B0 B) x) *)
apply Trans with (union (add_part B0 x) B); auto with *.
(* Goal: @Equal (part_set E) (@union E (@add_part E B0 x) B) (@add_part E (@union E B0 B) x) *)
unfold add_part in |- *.
(* Goal: @Equal (part_set E) (@union E (@union E B0 (@single E x)) B) (@union E (@union E B0 B) (@single E x)) *)
apply Trans with (union B0 (union (single x) B)); auto with *.
(* Goal: @Equal (part_set E) (@union E B0 (@union E (@single E x) B)) (@union E (@union E B0 B) (@single E x)) *)
apply Trans with (union B0 (union B (single x))); auto with *.
Qed.
Hint Resolve cardinal_union_disjoint: algebra.
Lemma in_eq_part :
forall A B : part_set E,
(forall x : E, in_part x A -> in_part x B) ->
(forall x : E, in_part x B -> in_part x A) -> Equal A B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : forall (x : Carrier E) (_ : @in_part E x A), @in_part E x B) (_ : forall (x : Carrier E) (_ : @in_part E x B), @in_part E x A), @Equal (part_set E) A B *)
intros A B.
(* Goal: forall (_ : forall (x : Carrier E) (_ : @in_part E x A), @in_part E x B) (_ : forall (x : Carrier E) (_ : @in_part E x B), @in_part E x A), @Equal (part_set E) A B *)
case A; case B; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (Pred_compatible_prf : @pred_compatible E Pred_fun) (Pred_fun0 : forall _ : Carrier E, Prop) (Pred_compatible_prf0 : @pred_compatible E Pred_fun0) (_ : forall (x : Carrier E) (_ : Pred_fun0 x), Pred_fun x) (_ : forall (x : Carrier E) (_ : Pred_fun x), Pred_fun0 x), @eq_part E (@Build_Predicate E Pred_fun0 Pred_compatible_prf0) (@Build_Predicate E Pred_fun Pred_compatible_prf) *)
intros a pa b pb.
(* Goal: forall (_ : forall (x : Carrier E) (_ : b x), a x) (_ : forall (x : Carrier E) (_ : a x), b x), @eq_part E (@Build_Predicate E b pb) (@Build_Predicate E a pa) *)
unfold eq_part in |- *; simpl in |- *.
(* Goal: forall (_ : forall (x : Carrier E) (_ : b x), a x) (_ : forall (x : Carrier E) (_ : a x), b x) (x : Carrier E), and (forall _ : b x, a x) (forall _ : a x, b x) *)
intuition.
Qed.
Lemma diff_in_l :
forall (A B : part_set E) (x : E), in_part x (diff A B) -> in_part x A.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x A *)
intros A B.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x A *)
case A; case B; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (Pred_fun0 : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun0) (x : Carrier E) (_ : and (Pred_fun0 x) (not (Pred_fun x))), Pred_fun0 x *)
intros a pa b pb.
(* Goal: forall (x : Carrier E) (_ : and (b x) (not (a x))), b x *)
unfold eq_part in |- *; simpl in |- *.
(* Goal: forall (x : Carrier E) (_ : and (b x) (not (a x))), b x *)
intuition.
Qed.
Lemma diff_in_r :
forall (A B : part_set E) (x : E), in_part x (diff A B) -> ~ in_part x B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x (@diff E A B)), not (@in_part E x B) *)
intros A B.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), not (@in_part E x B) *)
case A; case B; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (Pred_fun0 : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun0) (x : Carrier E) (_ : and (Pred_fun0 x) (not (Pred_fun x))), not (Pred_fun x) *)
intros a pa b pb.
(* Goal: forall (x : Carrier E) (_ : and (b x) (not (a x))), not (a x) *)
unfold eq_part in |- *; simpl in |- *.
(* Goal: forall (x : Carrier E) (_ : and (b x) (not (a x))), not (a x) *)
intuition.
Qed.
Lemma in_diff :
forall (A B : part_set E) (x : E),
in_part x A -> ~ in_part x B -> in_part x (diff A B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x A) (_ : not (@in_part E x B)), @in_part E x (@diff E A B) *)
intros A B.
(* Goal: forall (x : Carrier E) (_ : @in_part E x A) (_ : not (@in_part E x B)), @in_part E x (@diff E A B) *)
case A; case B; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (Pred_fun0 : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun0) (x : Carrier E) (_ : Pred_fun0 x) (_ : not (Pred_fun x)), and (Pred_fun0 x) (not (Pred_fun x)) *)
intros a pa b pb.
(* Goal: forall (x : Carrier E) (_ : b x) (_ : not (a x)), and (b x) (not (a x)) *)
unfold eq_part in |- *; simpl in |- *.
(* Goal: forall (x : Carrier E) (_ : b x) (_ : not (a x)), and (b x) (not (a x)) *)
intuition.
Qed.
Hint Resolve in_diff: algebra.
Lemma union_diff :
forall A B : part_set E, Equal (union A (diff B A)) (union A B).
Proof.
(* Goal: forall A B : Carrier (part_set E), @Equal (part_set E) (@union E A (@diff E B A)) (@union E A B) *)
intros A B; try assumption.
(* Goal: @Equal (part_set E) (@union E A (@diff E B A)) (@union E A B) *)
apply in_eq_part.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A B)), @in_part E x (@union E A (@diff E B A)) *)
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A (@diff E B A))), @in_part E x (@union E A B) *)
intros x H'; try assumption.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A B)), @in_part E x (@union E A (@diff E B A)) *)
(* Goal: @in_part E x (@union E A B) *)
elim (in_part_union H').
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A B)), @in_part E x (@union E A (@diff E B A)) *)
(* Goal: forall _ : @in_part E x (@diff E B A), @in_part E x (@union E A B) *)
(* Goal: forall _ : @in_part E x A, @in_part E x (@union E A B) *)
auto with *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A B)), @in_part E x (@union E A (@diff E B A)) *)
(* Goal: forall _ : @in_part E x (@diff E B A), @in_part E x (@union E A B) *)
intros H'0; try assumption.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A B)), @in_part E x (@union E A (@diff E B A)) *)
(* Goal: @in_part E x (@union E A B) *)
cut (in_part x B).
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A B)), @in_part E x (@union E A (@diff E B A)) *)
(* Goal: @in_part E x B *)
(* Goal: forall _ : @in_part E x B, @in_part E x (@union E A B) *)
auto with *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A B)), @in_part E x (@union E A (@diff E B A)) *)
(* Goal: @in_part E x B *)
exact (diff_in_l H'0).
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@union E A B)), @in_part E x (@union E A (@diff E B A)) *)
intros x H'; try assumption.
(* Goal: @in_part E x (@union E A (@diff E B A)) *)
elim (in_part_union H').
(* Goal: forall _ : @in_part E x B, @in_part E x (@union E A (@diff E B A)) *)
(* Goal: forall _ : @in_part E x A, @in_part E x (@union E A (@diff E B A)) *)
auto with *.
(* Goal: forall _ : @in_part E x B, @in_part E x (@union E A (@diff E B A)) *)
intros H'0; try assumption.
(* Goal: @in_part E x (@union E A (@diff E B A)) *)
elim (classic (in_part x A)).
(* Goal: forall _ : not (@in_part E x A), @in_part E x (@union E A (@diff E B A)) *)
(* Goal: forall _ : @in_part E x A, @in_part E x (@union E A (@diff E B A)) *)
auto with *.
(* Goal: forall _ : not (@in_part E x A), @in_part E x (@union E A (@diff E B A)) *)
intros H'1; try assumption.
(* Goal: @in_part E x (@union E A (@diff E B A)) *)
cut (in_part x (diff B A)).
(* Goal: @in_part E x (@diff E B A) *)
(* Goal: forall _ : @in_part E x (@diff E B A), @in_part E x (@union E A (@diff E B A)) *)
auto with *.
(* Goal: @in_part E x (@diff E B A) *)
auto with *.
Qed.
Hint Resolve union_diff: algebra.
Lemma disjoint_diff : forall A B : part_set E, disjoint A (diff B A).
Proof.
(* Goal: forall A B : Carrier (part_set E), disjoint A (@diff E B A) *)
red in |- *.
(* Goal: forall A B : Carrier (part_set E), @Equal (part_set E) (@inter E A (@diff E B A)) (empty E) *)
intros A B; try assumption.
(* Goal: @Equal (part_set E) (@inter E A (@diff E B A)) (empty E) *)
apply not_in_empty.
(* Goal: forall x : Carrier E, not (@in_part E x (@inter E A (@diff E B A))) *)
intros x; red in |- *; intros H'; try exact H'.
(* Goal: False *)
absurd (in_part x A).
(* Goal: @in_part E x A *)
(* Goal: not (@in_part E x A) *)
apply diff_in_r with B.
(* Goal: @in_part E x A *)
(* Goal: @in_part E x (@diff E B A) *)
auto with *.
(* Goal: @in_part E x A *)
(* Goal: @in_part E x (@diff E B A) *)
apply in_part_inter_r with A; auto with *.
(* Goal: @in_part E x A *)
apply in_part_inter_l with (diff B A); auto with *.
Qed.
Hint Resolve disjoint_diff: algebra.
Lemma cardinal_union :
forall (a b : nat) (A B : part_set E),
cardinal A a -> cardinal (diff B A) b -> cardinal (union A B) (a + b).
Proof.
(* Goal: forall (a b : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A a) (_ : @cardinal E (@diff E B A) b), @cardinal E (@union E A B) (Init.Nat.add a b) *)
intros.
(* Goal: @cardinal E (@union E A B) (Init.Nat.add a b) *)
apply cardinal_comp_l with (union A (diff B A)); auto with *.
Qed.
Hint Resolve cardinal_union: algebra.
Lemma empty_diff : forall A : part_set E, Equal (diff (empty E) A) (empty E).
Proof.
(* Goal: forall A : Carrier (part_set E), @Equal (part_set E) (@diff E (empty E) A) (empty E) *)
intros A; try assumption.
(* Goal: @Equal (part_set E) (@diff E (empty E) A) (empty E) *)
apply in_eq_part.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (empty E)), @in_part E x (@diff E (empty E) A) *)
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E (empty E) A)), @in_part E x (empty E) *)
intro.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (empty E)), @in_part E x (@diff E (empty E) A) *)
(* Goal: forall _ : @in_part E x (@diff E (empty E) A), @in_part E x (empty E) *)
intros H'; try assumption.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (empty E)), @in_part E x (@diff E (empty E) A) *)
(* Goal: @in_part E x (empty E) *)
apply diff_in_l with A; auto with *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (empty E)), @in_part E x (@diff E (empty E) A) *)
intros x H'; try assumption.
(* Goal: @in_part E x (@diff E (empty E) A) *)
absurd (in_part x (empty E)); auto with *.
Qed.
Hint Resolve empty_diff: algebra.
Lemma empty_inter :
forall A : part_set E, Equal (inter (empty E) A) (empty E).
Proof.
(* Goal: forall A : Carrier (part_set E), @Equal (part_set E) (@inter E (empty E) A) (empty E) *)
intros A; try assumption.
(* Goal: @Equal (part_set E) (@inter E (empty E) A) (empty E) *)
apply in_eq_part.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (empty E)), @in_part E x (@inter E (empty E) A) *)
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@inter E (empty E) A)), @in_part E x (empty E) *)
intros x H'; try assumption.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (empty E)), @in_part E x (@inter E (empty E) A) *)
(* Goal: @in_part E x (empty E) *)
apply in_part_inter_l with A; auto with *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (empty E)), @in_part E x (@inter E (empty E) A) *)
intros x H'; try assumption.
(* Goal: @in_part E x (@inter E (empty E) A) *)
absurd (in_part x (empty E)); auto with *.
Qed.
Hint Resolve empty_inter: algebra.
Lemma in_part_trans_eq :
forall (A : part_set E) (x y : E), in_part x A -> Equal y x -> in_part y A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E) (_ : @in_part E x A) (_ : @Equal E y x), @in_part E y A *)
intros A; case A; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (x y : Carrier E) (_ : Pred_fun x) (_ : @Equal E y x), Pred_fun y *)
intros a pa.
(* Goal: forall (x y : Carrier E) (_ : a x) (_ : @Equal E y x), a y *)
intros x y H' H'0; try assumption.
(* Goal: a y *)
apply pa with x; auto with *.
Qed.
Lemma diff_add_part :
forall (A B0 B : part_set E) (x : E),
~ in_part x B0 ->
Equal A (add_part B0 x) -> in_part x B -> Equal (diff B0 B) (diff A B).
Proof.
(* Goal: forall (A B0 B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B0)) (_ : @Equal (part_set E) A (@add_part E B0 x)) (_ : @in_part E x B), @Equal (part_set E) (@diff E B0 B) (@diff E A B) *)
intros A B0 B x H' H'0 H'1; try assumption.
(* Goal: @Equal (part_set E) (@diff E B0 B) (@diff E A B) *)
apply in_eq_part.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E B0 B)), @in_part E x (@diff E A B) *)
intros x0 H'2; try assumption.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: @in_part E x0 (@diff E A B) *)
apply in_diff.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 A *)
apply in_part_comp_r with (add_part B0 x).
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @Equal (part_set E) (@add_part E B0 x) A *)
(* Goal: @in_part E x0 (@add_part E B0 x) *)
cut (in_part x0 B0).
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @Equal (part_set E) (@add_part E B0 x) A *)
(* Goal: @in_part E x0 B0 *)
(* Goal: forall _ : @in_part E x0 B0, @in_part E x0 (@add_part E B0 x) *)
unfold add_part in |- *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @Equal (part_set E) (@add_part E B0 x) A *)
(* Goal: @in_part E x0 B0 *)
(* Goal: forall _ : @in_part E x0 B0, @in_part E x0 (@union E B0 (@single E x)) *)
auto with *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @Equal (part_set E) (@add_part E B0 x) A *)
(* Goal: @in_part E x0 B0 *)
apply diff_in_l with B; auto with *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @Equal (part_set E) (@add_part E B0 x) A *)
auto with *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
(* Goal: not (@in_part E x0 B) *)
apply diff_in_r with B0; auto with *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x (@diff E A B)), @in_part E x (@diff E B0 B) *)
intros x0 H'2; try assumption.
(* Goal: @in_part E x0 (@diff E B0 B) *)
elim (classic (Equal x0 x)).
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@diff E B0 B) *)
(* Goal: forall _ : @Equal E x0 x, @in_part E x0 (@diff E B0 B) *)
intros H'3; try assumption.
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@diff E B0 B) *)
(* Goal: @in_part E x0 (@diff E B0 B) *)
absurd (in_part x B); auto with *.
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@diff E B0 B) *)
(* Goal: not (@in_part E x B) *)
cut (in_part x (diff A B)).
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@diff E B0 B) *)
(* Goal: @in_part E x (@diff E A B) *)
(* Goal: forall _ : @in_part E x (@diff E A B), not (@in_part E x B) *)
intros H'4; try assumption.
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@diff E B0 B) *)
(* Goal: @in_part E x (@diff E A B) *)
(* Goal: not (@in_part E x B) *)
apply diff_in_r with A; auto with *.
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@diff E B0 B) *)
(* Goal: @in_part E x (@diff E A B) *)
apply in_part_trans_eq with x0; auto with *.
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@diff E B0 B) *)
intros H'3; try assumption.
(* Goal: @in_part E x0 (@diff E B0 B) *)
apply in_diff.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 B0 *)
apply add_part_in_el_diff with x; auto with *.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 (@add_part E B0 x) *)
apply in_part_comp_r with A; auto with *.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 A *)
apply diff_in_l with B; auto with *.
(* Goal: not (@in_part E x0 B) *)
apply diff_in_r with A; auto with *.
Qed.
Lemma diff_not_in :
forall (A B : part_set E) (x : E), ~ in_part x A -> ~ in_part x (diff A B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)), not (@in_part E x (@diff E A B)) *)
unfold not in |- *; intros.
(* Goal: False *)
apply H.
(* Goal: @in_part E x A *)
apply diff_in_l with B; auto with *.
Qed.
Hint Resolve diff_not_in: algebra.
Lemma inter_not_in :
forall (A B : part_set E) (x : E), ~ in_part x A -> ~ in_part x (inter A B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)), not (@in_part E x (@inter E A B)) *)
unfold not in |- *; intros.
(* Goal: False *)
apply H.
(* Goal: @in_part E x A *)
apply in_part_inter_l with B; auto with *.
Qed.
Hint Resolve inter_not_in: algebra.
Lemma inter_add_part :
forall (A B0 B : part_set E) (x : E),
~ in_part x B0 ->
Equal A (add_part B0 x) ->
in_part x B -> Equal (inter A B) (add_part (inter B0 B) x).
Proof.
(* Goal: forall (A B0 B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B0)) (_ : @Equal (part_set E) A (@add_part E B0 x)) (_ : @in_part E x B), @Equal (part_set E) (@inter E A B) (@add_part E (@inter E B0 B) x) *)
unfold add_part in |- *.
(* Goal: forall (A B0 B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B0)) (_ : @Equal (part_set E) A (@union E B0 (@single E x))) (_ : @in_part E x B), @Equal (part_set E) (@inter E A B) (@union E (@inter E B0 B) (@single E x)) *)
intros A B0 B x H' H'0 H'1; try assumption.
(* Goal: @Equal (part_set E) (@inter E A B) (@union E (@inter E B0 B) (@single E x)) *)
apply Trans with (inter (union B0 (single x)) B).
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@union E (@inter E B0 B) (@single E x)) *)
(* Goal: @Equal (part_set E) (@inter E A B) (@inter E (@union E B0 (@single E x)) B) *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@union E (@inter E B0 B) (@single E x)) *)
apply Trans with (union (inter B0 B) (inter (single x) B)).
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@union E (@inter E B0 B) (@single E x)) *)
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@union E (@inter E B0 B) (@inter E (@single E x) B)) *)
auto with *.
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@union E (@inter E B0 B) (@single E x)) *)
apply union_comp; auto with *.
(* Goal: @Equal (part_set E) (@inter E (@single E x) B) (@single E x) *)
apply in_eq_part.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@single E x)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@inter E (@single E x) B)), @in_part E x0 (@single E x) *)
intros x0 H'2; try assumption.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@single E x)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @in_part E x0 (@single E x) *)
apply in_part_inter_l with B; auto with *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@single E x)), @in_part E x0 (@inter E (@single E x) B) *)
intros x0 H'2; try assumption.
(* Goal: @in_part E x0 (@inter E (@single E x) B) *)
apply in_part_inter; auto with *.
(* Goal: @in_part E x0 B *)
apply in_part_trans_eq with x; auto with *.
Qed.
Hint Resolve inter_add_part: algebra.
Lemma diff_add_part_not_in :
forall (A B0 B : part_set E) (x : E),
~ in_part x B0 ->
Equal A (add_part B0 x) ->
~ in_part x B -> Equal (diff A B) (add_part (diff B0 B) x).
Proof.
(* Goal: forall (A B0 B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B0)) (_ : @Equal (part_set E) A (@add_part E B0 x)) (_ : not (@in_part E x B)), @Equal (part_set E) (@diff E A B) (@add_part E (@diff E B0 B) x) *)
intros A B0 B x H' H'0 H'1; try assumption.
(* Goal: @Equal (part_set E) (@diff E A B) (@add_part E (@diff E B0 B) x) *)
apply in_eq_part.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@diff E A B)), @in_part E x0 (@add_part E (@diff E B0 B) x) *)
intros x0 H'2; try assumption.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: @in_part E x0 (@add_part E (@diff E B0 B) x) *)
elim (classic (Equal x0 x)).
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@add_part E (@diff E B0 B) x) *)
(* Goal: forall _ : @Equal E x0 x, @in_part E x0 (@add_part E (@diff E B0 B) x) *)
intros H'3; try assumption.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@add_part E (@diff E B0 B) x) *)
(* Goal: @in_part E x0 (@add_part E (@diff E B0 B) x) *)
apply in_part_trans_eq with x; auto with *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@add_part E (@diff E B0 B) x) *)
intros H'3; try assumption.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: @in_part E x0 (@add_part E (@diff E B0 B) x) *)
unfold add_part in |- *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: @in_part E x0 (@union E (@diff E B0 B) (@single E x)) *)
apply in_part_union_or.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: or (@in_part E x0 (@diff E B0 B)) (@in_part E x0 (@single E x)) *)
left.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: @in_part E x0 (@diff E B0 B) *)
apply in_diff.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 B0 *)
apply add_part_in_el_diff with x; auto with *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 (@add_part E B0 x) *)
apply in_part_comp_r with A; auto with *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 A *)
apply diff_in_l with B; auto with *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
(* Goal: not (@in_part E x0 B) *)
apply diff_in_r with A; auto with *.
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@add_part E (@diff E B0 B) x)), @in_part E x0 (@diff E A B) *)
intros x0 H'2; try assumption.
(* Goal: @in_part E x0 (@diff E A B) *)
apply in_diff.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 A *)
apply in_part_comp_r with (add_part B0 x); auto with *.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 (@add_part E B0 x) *)
elim (classic (Equal x0 x)).
(* Goal: not (@in_part E x0 B) *)
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@add_part E B0 x) *)
(* Goal: forall _ : @Equal E x0 x, @in_part E x0 (@add_part E B0 x) *)
intros H'3; try assumption.
(* Goal: not (@in_part E x0 B) *)
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@add_part E B0 x) *)
(* Goal: @in_part E x0 (@add_part E B0 x) *)
apply in_part_trans_eq with x; auto with *.
(* Goal: not (@in_part E x0 B) *)
(* Goal: forall _ : not (@Equal E x0 x), @in_part E x0 (@add_part E B0 x) *)
intros H'3; try assumption.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 (@add_part E B0 x) *)
unfold add_part in |- *.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 (@union E B0 (@single E x)) *)
apply in_part_union_or.
(* Goal: not (@in_part E x0 B) *)
(* Goal: or (@in_part E x0 B0) (@in_part E x0 (@single E x)) *)
left.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 B0 *)
unfold add_part in H'2.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 B0 *)
elim (in_part_union H'2).
(* Goal: not (@in_part E x0 B) *)
(* Goal: forall _ : @in_part E x0 (@single E x), @in_part E x0 B0 *)
(* Goal: forall _ : @in_part E x0 (@diff E B0 B), @in_part E x0 B0 *)
intros H'4; try assumption.
(* Goal: not (@in_part E x0 B) *)
(* Goal: forall _ : @in_part E x0 (@single E x), @in_part E x0 B0 *)
(* Goal: @in_part E x0 B0 *)
apply diff_in_l with B; auto with *.
(* Goal: not (@in_part E x0 B) *)
(* Goal: forall _ : @in_part E x0 (@single E x), @in_part E x0 B0 *)
intros H'4; try assumption.
(* Goal: not (@in_part E x0 B) *)
(* Goal: @in_part E x0 B0 *)
absurd (in_part x0 (single x)); auto with *.
(* Goal: not (@in_part E x0 B) *)
elim (classic (Equal x0 x)).
(* Goal: forall _ : not (@Equal E x0 x), not (@in_part E x0 B) *)
(* Goal: forall _ : @Equal E x0 x, not (@in_part E x0 B) *)
intros H'3; try assumption.
(* Goal: forall _ : not (@Equal E x0 x), not (@in_part E x0 B) *)
(* Goal: not (@in_part E x0 B) *)
unfold not in |- *; intros.
(* Goal: forall _ : not (@Equal E x0 x), not (@in_part E x0 B) *)
(* Goal: False *)
unfold not in H'1.
(* Goal: forall _ : not (@Equal E x0 x), not (@in_part E x0 B) *)
(* Goal: False *)
apply H'1.
(* Goal: forall _ : not (@Equal E x0 x), not (@in_part E x0 B) *)
(* Goal: @in_part E x B *)
apply in_part_trans_eq with x0; auto with *.
(* Goal: forall _ : not (@Equal E x0 x), not (@in_part E x0 B) *)
intros H'3; try assumption.
(* Goal: not (@in_part E x0 B) *)
apply diff_in_r with B0; auto with *.
(* Goal: @in_part E x0 (@diff E B0 B) *)
apply add_part_in_el_diff with x; auto with *.
Qed.
Hint Resolve diff_add_part_not_in: algebra.
Lemma inter_add_part_not_in :
forall (A B0 B : part_set E) (x : E),
~ in_part x B0 ->
Equal A (add_part B0 x) -> ~ in_part x B -> Equal (inter B0 B) (inter A B).
Proof.
(* Goal: forall (A B0 B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B0)) (_ : @Equal (part_set E) A (@add_part E B0 x)) (_ : not (@in_part E x B)), @Equal (part_set E) (@inter E B0 B) (@inter E A B) *)
unfold add_part in |- *.
(* Goal: forall (A B0 B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B0)) (_ : @Equal (part_set E) A (@union E B0 (@single E x))) (_ : not (@in_part E x B)), @Equal (part_set E) (@inter E B0 B) (@inter E A B) *)
intros A B0 B x H' H'0 H'1; try assumption.
(* Goal: @Equal (part_set E) (@inter E B0 B) (@inter E A B) *)
apply Trans with (inter (union B0 (single x)) B).
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@inter E B0 B) (@inter E (@union E B0 (@single E x)) B) *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@inter E B0 B) (@inter E (@union E B0 (@single E x)) B) *)
apply Trans with (union (inter B0 B) (inter (single x) B)).
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: @Equal (part_set E) (@inter E B0 B) (@union E (@inter E B0 B) (@inter E (@single E x) B)) *)
apply Trans with (union (inter B0 B) (empty E)).
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (empty E)) (@union E (@inter E B0 B) (@inter E (@single E x) B)) *)
(* Goal: @Equal (part_set E) (@inter E B0 B) (@union E (@inter E B0 B) (empty E)) *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (empty E)) (@union E (@inter E B0 B) (@inter E (@single E x) B)) *)
apply union_comp; auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: @Equal (part_set E) (empty E) (@inter E (@single E x) B) *)
apply Sym.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: @Equal (part_set E) (@inter E (@single E x) B) (empty E) *)
apply in_eq_part.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (@inter E (@single E x) B)), @in_part E x0 (empty E) *)
intros x0 H'2; try assumption.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @in_part E x0 (empty E) *)
cut (Equal x x0).
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
(* Goal: forall _ : @Equal E x x0, @in_part E x0 (empty E) *)
intros H'3; try assumption.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
(* Goal: @in_part E x0 (empty E) *)
absurd (in_part x0 B).
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
(* Goal: @in_part E x0 B *)
(* Goal: not (@in_part E x0 B) *)
unfold not in |- *; intro.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
(* Goal: @in_part E x0 B *)
(* Goal: False *)
unfold not in H'1.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
(* Goal: @in_part E x0 B *)
(* Goal: False *)
apply H'1.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
(* Goal: @in_part E x0 B *)
(* Goal: @in_part E x B *)
apply in_part_trans_eq with x0; auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
(* Goal: @in_part E x0 B *)
apply in_part_inter_r with (single x).
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
(* Goal: @in_part E x0 (@inter E (@single E x) B) *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @Equal E x x0 *)
cut (in_part x0 (single x)).
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @in_part E x0 (@single E x) *)
(* Goal: forall _ : @in_part E x0 (@single E x), @Equal E x x0 *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @in_part E x0 (@single E x) *)
apply in_part_inter_l with B.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
(* Goal: @in_part E x0 (@inter E (@single E x) B) *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: forall (x0 : Carrier E) (_ : @in_part E x0 (empty E)), @in_part E x0 (@inter E (@single E x) B) *)
intros x0 H'2; try assumption.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
(* Goal: @in_part E x0 (@inter E (@single E x) B) *)
absurd (in_part x0 (empty E)); auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
(* Goal: @Equal (part_set E) (@union E (@inter E B0 B) (@inter E (@single E x) B)) (@inter E (@union E B0 (@single E x)) B) *)
auto with *.
(* Goal: @Equal (part_set E) (@inter E (@union E B0 (@single E x)) B) (@inter E A B) *)
auto with *.
Qed.
Lemma cardinal_diff :
forall (a : nat) (A B : part_set E),
cardinal A a ->
exists b : nat,
(exists c : nat,
cardinal (diff A B) b /\ cardinal (inter A B) c /\ a = b + c).
Proof.
(* Goal: forall (a : nat) (A B : Carrier (part_set E)) (_ : @cardinal E A a), @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat a (Init.Nat.add b c))))) *)
simple induction a; intros.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat O (Init.Nat.add b c))))) *)
exists 0; intros.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @ex nat (fun c : nat => and (@cardinal E (@diff E A B) O) (and (@cardinal E (@inter E A B) c) (@eq nat O (Init.Nat.add O c)))) *)
exists 0; intros.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@diff E A B) O) (and (@cardinal E (@inter E A B) O) (@eq nat O (Init.Nat.add O O))) *)
simpl in |- *.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@diff E A B) O) (and (@cardinal E (@inter E A B) O) (@eq nat O O)) *)
split.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@inter E A B) O) (@eq nat O O) *)
(* Goal: @cardinal E (@diff E A B) O *)
apply cardinal_empty.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@inter E A B) O) (@eq nat O O) *)
(* Goal: @Equal (part_set E) (@diff E A B) (empty E) *)
apply Trans with (diff (empty E) B); auto with *.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@inter E A B) O) (@eq nat O O) *)
split.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @eq nat O O *)
(* Goal: @cardinal E (@inter E A B) O *)
apply cardinal_empty.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @eq nat O O *)
(* Goal: @Equal (part_set E) (@inter E A B) (empty E) *)
apply Trans with (inter (empty E) B); auto with *.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @eq nat O O *)
auto with *.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
inversion H0.
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
elim (H B0 B); intros.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
case H6; clear H6; intros.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
case H6; clear H6; intros.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
case H7; clear H7; intros.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
case (classic (in_part x B)); intros.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
exists x0.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @ex nat (fun c : nat => and (@cardinal E (@diff E A B) x0) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add x0 c)))) *)
exists (S x1).
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@diff E A B) x0) (and (@cardinal E (@inter E A B) (S x1)) (@eq nat (S n) (Init.Nat.add x0 (S x1)))) *)
split.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@inter E A B) (S x1)) (@eq nat (S n) (Init.Nat.add x0 (S x1))) *)
(* Goal: @cardinal E (@diff E A B) x0 *)
apply cardinal_comp_l with (diff B0 B); auto with *.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@inter E A B) (S x1)) (@eq nat (S n) (Init.Nat.add x0 (S x1))) *)
(* Goal: @Equal (part_set E) (@diff E B0 B) (@diff E A B) *)
apply diff_add_part with x; auto with *.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: and (@cardinal E (@inter E A B) (S x1)) (@eq nat (S n) (Init.Nat.add x0 (S x1))) *)
split.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @eq nat (S n) (Init.Nat.add x0 (S x1)) *)
(* Goal: @cardinal E (@inter E A B) (S x1) *)
apply cardinal_add with (inter B0 B) x; auto with *.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @eq nat (S n) (Init.Nat.add x0 (S x1)) *)
rewrite H8.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
(* Goal: @eq nat (S (Init.Nat.add x0 x1)) (Init.Nat.add x0 (S x1)) *)
auto with *.
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun b : nat => @ex nat (fun c : nat => and (@cardinal E (@diff E A B) b) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add b c))))) *)
exists (S x0).
(* Goal: @cardinal E B0 n *)
(* Goal: @ex nat (fun c : nat => and (@cardinal E (@diff E A B) (S x0)) (and (@cardinal E (@inter E A B) c) (@eq nat (S n) (Init.Nat.add (S x0) c)))) *)
exists x1.
(* Goal: @cardinal E B0 n *)
(* Goal: and (@cardinal E (@diff E A B) (S x0)) (and (@cardinal E (@inter E A B) x1) (@eq nat (S n) (Init.Nat.add (S x0) x1))) *)
split.
(* Goal: @cardinal E B0 n *)
(* Goal: and (@cardinal E (@inter E A B) x1) (@eq nat (S n) (Init.Nat.add (S x0) x1)) *)
(* Goal: @cardinal E (@diff E A B) (S x0) *)
apply cardinal_add with (diff B0 B) x; auto with *.
(* Goal: @cardinal E B0 n *)
(* Goal: and (@cardinal E (@inter E A B) x1) (@eq nat (S n) (Init.Nat.add (S x0) x1)) *)
split.
(* Goal: @cardinal E B0 n *)
(* Goal: @eq nat (S n) (Init.Nat.add (S x0) x1) *)
(* Goal: @cardinal E (@inter E A B) x1 *)
apply cardinal_comp_l with (inter B0 B); auto with *.
(* Goal: @cardinal E B0 n *)
(* Goal: @eq nat (S n) (Init.Nat.add (S x0) x1) *)
(* Goal: @Equal (part_set E) (@inter E B0 B) (@inter E A B) *)
apply inter_add_part_not_in with x; auto with *.
(* Goal: @cardinal E B0 n *)
(* Goal: @eq nat (S n) (Init.Nat.add (S x0) x1) *)
rewrite H8; auto with *.
(* Goal: @cardinal E B0 n *)
auto with *.
Qed.
Lemma cardinal_union_inter :
forall (A B : part_set E) (a b c : nat),
cardinal A a ->
cardinal B b -> cardinal (inter A B) c -> cardinal (union A B) (a + b - c).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (a b c : nat) (_ : @cardinal E A a) (_ : @cardinal E B b) (_ : @cardinal E (@inter E A B) c), @cardinal E (@union E A B) (Init.Nat.sub (Init.Nat.add a b) c) *)
intros.
(* Goal: @cardinal E (@union E A B) (Init.Nat.sub (Init.Nat.add a b) c) *)
case (cardinal_diff A H0); intros.
(* Goal: @cardinal E (@union E A B) (Init.Nat.sub (Init.Nat.add a b) c) *)
case H2; clear H2; intros.
(* Goal: @cardinal E (@union E A B) (Init.Nat.sub (Init.Nat.add a b) c) *)
case H2; clear H2; intros.
(* Goal: @cardinal E (@union E A B) (Init.Nat.sub (Init.Nat.add a b) c) *)
case H3; clear H3; intros.
(* Goal: @cardinal E (@union E A B) (Init.Nat.sub (Init.Nat.add a b) c) *)
apply cardinal_comp with (union A (diff B A)) (a + x); auto with *.
(* Goal: @eq nat (Init.Nat.add a x) (Init.Nat.sub (Init.Nat.add a b) c) *)
rewrite H4.
(* Goal: @eq nat (Init.Nat.add a x) (Init.Nat.sub (Init.Nat.add a (Init.Nat.add x x0)) c) *)
replace c with x0.
(* Goal: @eq nat x0 c *)
(* Goal: @eq nat (Init.Nat.add a x) (Init.Nat.sub (Init.Nat.add a (Init.Nat.add x x0)) x0) *)
rewrite plus_assoc.
(* Goal: @eq nat x0 c *)
(* Goal: @eq nat (Init.Nat.add a x) (Init.Nat.sub (Nat.add (Nat.add a x) x0) x0) *)
replace (a + x + x0) with (x0 + (a + x)); auto with *.
(* Goal: @eq nat x0 c *)
apply (cardinal_unique H3); auto with *.
(* Goal: @cardinal E (@inter E B A) c *)
apply cardinal_comp_l with (inter A B); auto with *.
Qed.
Hint Resolve cardinal_union_inter: algebra.
End fparts2_def.
|
Require Export GeoCoq.Elements.OriginalProofs.proposition_27.
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearparallel.
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelsymmetric.
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelflip.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_27B :
forall A D E F,
CongA A E F E F D -> TS A E F D ->
Par A E F D.
Proof.
(* Goal: forall (A D E F : @Point Ax0) (_ : @CongA Ax0 A E F E F D) (_ : @TS Ax0 A E F D), @Par Ax0 A E F D *)
intros.
(* Goal: @Par Ax0 A E F D *)
assert (neq A E) by (forward_using lemma_angledistinct).
(* Goal: @Par Ax0 A E F D *)
let Tf:=fresh in assert (Tf:exists B, (BetS A E B /\ Cong E B A E)) by (conclude lemma_extension);destruct Tf as [B];spliter.
(* Goal: @Par Ax0 A E F D *)
assert (neq F D) by (forward_using lemma_angledistinct).
(* Goal: @Par Ax0 A E F D *)
assert (neq D F) by (conclude lemma_inequalitysymmetric).
(* Goal: @Par Ax0 A E F D *)
let Tf:=fresh in assert (Tf:exists C, (BetS D F C /\ Cong F C F D)) by (conclude lemma_extension);destruct Tf as [C];spliter.
(* Goal: @Par Ax0 A E F D *)
assert (BetS C F D) by (conclude axiom_betweennesssymmetry).
(* Goal: @Par Ax0 A E F D *)
assert (Par A B C D) by (conclude proposition_27).
(* Goal: @Par Ax0 A E F D *)
assert (Col D F C) by (conclude_def Col ).
(* Goal: @Par Ax0 A E F D *)
assert (Col C D F) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A E F D *)
assert (Par A B F D) by (conclude lemma_collinearparallel).
(* Goal: @Par Ax0 A E F D *)
assert (Par F D A B) by (conclude lemma_parallelsymmetric).
(* Goal: @Par Ax0 A E F D *)
assert (Par F D B A) by (forward_using lemma_parallelflip).
(* Goal: @Par Ax0 A E F D *)
assert (Col A E B) by (conclude_def Col ).
(* Goal: @Par Ax0 A E F D *)
assert (Col B A E) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A E F D *)
assert (neq A E) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A E F D *)
assert (neq E A) by (conclude lemma_inequalitysymmetric).
(* Goal: @Par Ax0 A E F D *)
assert (Par F D E A) by (conclude lemma_collinearparallel).
(* Goal: @Par Ax0 A E F D *)
assert (Par F D A E) by (forward_using lemma_parallelflip).
(* Goal: @Par Ax0 A E F D *)
assert (Par A E F D) by (conclude lemma_parallelsymmetric).
(* Goal: @Par Ax0 A E F D *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearorder.
Require Export GeoCoq.Elements.OriginalProofs.lemma_inequalitysymmetric.
Section Euclid.
Context `{Ax:euclidean_neutral}.
Lemma lemma_parallelflip :
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.
Proof.
(* Goal: forall (A B C D : @Point Ax) (_ : @Par Ax A B C D), and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
intros.
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
let Tf:=fresh in assert (Tf:exists M a b c d, (neq A B /\ neq C D /\ Col A B a /\ Col A B b /\ neq a b /\ Col C D c /\ Col C D d /\ neq c d /\ ~ Meet A B C D /\ BetS a M d /\ BetS c M b)) by (conclude_def Par );destruct Tf as [M[a[b[c[d]]]]];spliter.
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (Col B A a) by (forward_using lemma_collinearorder).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (Col B A b) by (forward_using lemma_collinearorder).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (Col D C c) by (forward_using lemma_collinearorder).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (Col D C d) by (forward_using lemma_collinearorder).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (neq D C) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (BetS d M a) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (BetS b M c) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (neq d c) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (neq b a) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (~ Meet A B D C).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
(* Goal: not (@Meet Ax A B D C) *)
{
(* Goal: not (@Meet Ax A B D C) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists P, (neq A B /\ neq D C /\ Col A B P /\ Col D C P)) by (conclude_def Meet );destruct Tf as [P];spliter.
(* Goal: False *)
assert (Col C D P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
}
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (~ Meet B A C D).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
(* Goal: not (@Meet Ax B A C D) *)
{
(* Goal: not (@Meet Ax B A C D) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists P, (neq B A /\ neq C D /\ Col B A P /\ Col C D P)) by (conclude_def Meet );destruct Tf as [P];spliter.
(* Goal: False *)
assert (Col A B P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
}
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (~ Meet B A D C).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
(* Goal: not (@Meet Ax B A D C) *)
{
(* Goal: not (@Meet Ax B A D C) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists P, (neq B A /\ neq D C /\ Col B A P /\ Col D C P)) by (conclude_def Meet );destruct Tf as [P];spliter.
(* Goal: False *)
assert (Col A B P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col C D P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
}
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (Par B A C D) by (conclude_def Par ).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (Par A B D C) by (conclude_def Par ).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
assert (Par B A D C) by (conclude_def Par ).
(* Goal: and (@Par Ax B A C D) (and (@Par Ax A B D C) (@Par Ax B A D C)) *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_congruenceflip.
Require Export GeoCoq.Elements.OriginalProofs.lemma_extensionunique.
Section Euclid.
Context `{Ax:euclidean_neutral}.
Lemma lemma_rightreverse :
forall A B C D,
Per A B C -> BetS A B D -> Cong A B B D ->
Cong A C D C.
Proof.
(* Goal: forall (A B C D : @Point Ax) (_ : @Per Ax A B C) (_ : @BetS Ax A B D) (_ : @Cong Ax A B B D), @Cong Ax A C D C *)
intros.
(* Goal: @Cong Ax A C D C *)
let Tf:=fresh in assert (Tf:exists E, (BetS A B E /\ Cong A B E B /\ Cong A C E C /\ neq B C)) by (conclude_def Per );destruct Tf as [E];spliter.
(* Goal: @Cong Ax A C D C *)
assert (Cong B D A B) by (conclude lemma_congruencesymmetric).
(* Goal: @Cong Ax A C D C *)
assert (Cong B D E B) by (conclude lemma_congruencetransitive).
(* Goal: @Cong Ax A C D C *)
assert (Cong B D B E) by (forward_using lemma_congruenceflip).
(* Goal: @Cong Ax A C D C *)
assert (eq D E) by (conclude lemma_extensionunique).
(* Goal: @Cong Ax A C D C *)
assert (Cong A C D C) by (conclude cn_equalitysub).
(* Goal: @Cong Ax A C D C *)
close.
Qed.
End Euclid.
|
Require Import Arith List.
Require Import BellantoniCook.Lib BellantoniCook.Bitstring BellantoniCook.BC BellantoniCook.BCI.
Fixpoint conv n s (e : BCI) : BC :=
match e with
| zeroI => comp n s zero nil nil
| projIn i => proj n s i
| projIs i => proj n s (n + i)
| succI b => comp n s (succ b) nil [proj n s n]
| predI => comp n s pred nil [proj n s n]
| condI => comp n s cond nil
[proj n s n; proj n s (S n); proj n s (S (S n)); proj n s (S (S (S n)))]
| recI g h0 h1 => rec (conv (n-1) s g)
(conv n (S s) h0)
(conv n (S s) h1)
| compI g ln ls =>
comp n s (conv (length ln) (length ls) g)
(map (conv n 0) ln) (map (conv n s) ls)
end.
Definition zeroI_e := compI zeroI nil nil.
Definition leftI (d:nat)(x:TypeI) : nat :=
match x with
| I n _ => n
| E _ => d
end.
Lemma inf_list_maxl_l : forall l n s,
inf_list l = I n s ->
n = maxl (map (leftI 0) l).
Definition rightI (d:nat)(x:TypeI) : nat :=
match x with
| I _ n => n
| E _ => d
end.
Lemma inf_list_maxl_r : forall l n s,
inf_list l = I n s ->
s = maxl (map (rightI 0) l).
Lemma in_inf_list_le_l l n s n' s' :
In (I n' s') l -> inf_list l = I n s -> n' <= n.
Proof.
(* Goal: forall (_ : @In TypeI (I n' s') l) (_ : @eq TypeI (inf_list l) (I n s)), le n' n *)
intros.
(* Goal: le n' n *)
apply inf_list_maxl_l in H0.
(* Goal: le n' n *)
subst.
(* Goal: le n' (maxl (@map TypeI nat (leftI Datatypes.O) l)) *)
apply in_map with (f:=leftI 0) in H.
(* Goal: le n' (maxl (@map TypeI nat (leftI Datatypes.O) l)) *)
induction (map (leftI 0) l); simpl in *.
(* Goal: le n' (Init.Nat.max a (maxl l0)) *)
(* Goal: le n' Datatypes.O *)
elim H.
(* Goal: le n' (Init.Nat.max a (maxl l0)) *)
destruct H.
(* Goal: le n' (Init.Nat.max a (maxl l0)) *)
(* Goal: le n' (Init.Nat.max a (maxl l0)) *)
subst a.
(* Goal: le n' (Init.Nat.max a (maxl l0)) *)
(* Goal: le n' (Init.Nat.max n' (maxl l0)) *)
apply maxl_cons.
(* Goal: le n' (Init.Nat.max a (maxl l0)) *)
apply le_maxl_cons.
(* Goal: le n' (maxl l0) *)
tauto.
Qed.
Lemma in_inf_list_le_r l n s n' s' :
In (I n' s') l -> inf_list l = I n s -> s' <= s.
Proof.
(* Goal: forall (_ : @In TypeI (I n' s') l) (_ : @eq TypeI (inf_list l) (I n s)), le s' s *)
intros.
(* Goal: le s' s *)
apply inf_list_maxl_r in H0.
(* Goal: le s' s *)
subst.
(* Goal: le s' (maxl (@map TypeI nat (rightI Datatypes.O) l)) *)
apply in_map with (f:=rightI 0) in H.
(* Goal: le s' (maxl (@map TypeI nat (rightI Datatypes.O) l)) *)
induction (map (rightI 0) l); simpl in *.
(* Goal: le s' (Init.Nat.max a (maxl l0)) *)
(* Goal: le s' Datatypes.O *)
elim H.
(* Goal: le s' (Init.Nat.max a (maxl l0)) *)
destruct H.
(* Goal: le s' (Init.Nat.max a (maxl l0)) *)
(* Goal: le s' (Init.Nat.max a (maxl l0)) *)
subst a.
(* Goal: le s' (Init.Nat.max a (maxl l0)) *)
(* Goal: le s' (Init.Nat.max s' (maxl l0)) *)
apply maxl_cons.
(* Goal: le s' (Init.Nat.max a (maxl l0)) *)
apply le_maxl_cons.
(* Goal: le s' (maxl l0) *)
tauto.
Qed.
Lemma in_inf_list_le l n s n' s' :
In (I n' s') l -> inf_list l = I n s -> n' <= n /\ s' <= s.
Proof.
(* Goal: forall (_ : @In TypeI (I n' s') l) (_ : @eq TypeI (inf_list l) (I n s)), and (le n' n) (le s' s) *)
intros.
(* Goal: and (le n' n) (le s' s) *)
generalize H0; intros.
(* Goal: and (le n' n) (le s' s) *)
eapply in_inf_list_le_r in H0; eauto.
(* Goal: and (le n' n) (le s' s) *)
eapply in_inf_list_le_l in H1; eauto.
Qed.
Lemma in_inf_list_err : forall l err,
In (E err) l -> exists err', inf_list l = E err'.
Proof.
(* Goal: forall (l : list TypeI) (err : ErrorI) (_ : @In TypeI (E err) l), @ex ErrorI (fun err' : ErrorI => @eq TypeI (inf_list l) (E err')) *)
induction l; simpl; intros.
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (unionI a (inf_list l)) (E err')) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (I Datatypes.O Datatypes.O) (E err')) *)
elim H.
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (unionI a (inf_list l)) (E err')) *)
destruct H.
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (unionI a (inf_list l)) (E err')) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (unionI a (inf_list l)) (E err')) *)
subst; simpl.
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (unionI a (inf_list l)) (E err')) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (E (Enat (S (S (S Datatypes.O))))) (E err')) *)
eauto.
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (unionI a (inf_list l)) (E err')) *)
destruct (IHl err H).
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (unionI a (inf_list l)) (E err')) *)
rewrite H0; simpl.
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (unionI a (E x)) (E err')) *)
destruct a; simpl.
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (E (Enat (S (S (S Datatypes.O))))) (E err')) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (E (Enat (S (S (S Datatypes.O))))) (E err')) *)
eauto.
(* Goal: @ex ErrorI (fun err' : ErrorI => @eq TypeI (E (Enat (S (S (S Datatypes.O))))) (E err')) *)
eauto.
Qed.
Lemma in_inf_list_err_conv : forall l err,
inf_list l = E err ->
exists err', In (E err') l.
Proof.
(* Goal: forall (l : list TypeI) (err : ErrorI) (_ : @eq TypeI (inf_list l) (E err)), @ex ErrorI (fun err' : ErrorI => @In TypeI (E err') l) *)
induction l; simpl; intros; trivial.
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI a (E err')) (@In TypeI (E err') l)) *)
(* Goal: @ex ErrorI (fun _ : ErrorI => False) *)
discriminate.
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI a (E err')) (@In TypeI (E err') l)) *)
destruct a; simpl in H.
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (E e) (E err')) (@In TypeI (E err') l)) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (I n n0) (E err')) (@In TypeI (E err') l)) *)
case_eq (inf_list l); intros; rewrite H0 in H.
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (E e) (E err')) (@In TypeI (E err') l)) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (I n n0) (E err')) (@In TypeI (E err') l)) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (I n n0) (E err')) (@In TypeI (E err') l)) *)
discriminate.
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (E e) (E err')) (@In TypeI (E err') l)) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (I n n0) (E err')) (@In TypeI (E err') l)) *)
destruct (IHl e); trivial.
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (E e) (E err')) (@In TypeI (E err') l)) *)
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (I n n0) (E err')) (@In TypeI (E err') l)) *)
exists x; auto.
(* Goal: @ex ErrorI (fun err' : ErrorI => or (@eq TypeI (E e) (E err')) (@In TypeI (E err') l)) *)
eexists; eauto.
Qed.
Lemma inf_list_ex : forall l e n s,
In e l -> inf_list (map inf l) = I n s ->
exists n', exists s', n' <= n /\ s' <= s /\ inf e = I n' s'.
Opaque maxl.
Lemma inf_correct : forall (e : BCI) n s n' s',
n' <= n ->
s' <= s ->
inf e = I n' s' ->
arities (conv n s e) = ok_arities n s.
Lemma conv_correct : forall (e : BCI) (vnl vsl : list bs)
n s n' s',
n' <= n ->
s' <= s ->
inf e = I n' s' ->
sem (conv n s e) vnl vsl = semI e vnl vsl.
Proof.
(* Goal: forall (e : BCI) (vnl vsl : list (list bool)) (n s n' s' : nat) (_ : le n' n) (_ : le s' s) (_ : @eq TypeI (inf e) (I n' s')), @eq (list bool) (sem (conv n s e) vnl vsl) (semI e vnl vsl) *)
induction e using BCI_ind2; simpl; intros; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (Init.Nat.add n i) m' end then @nth (list bool) (Init.Nat.add n i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add n i) n) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb i m' end then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i n) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *)
injection H1; clear H1; intros; subst.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (Init.Nat.add n i) m' end then @nth (list bool) (Init.Nat.add n i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add n i) n) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb i m' end then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i n) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *)
destruct n.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (Init.Nat.add n i) m' end then @nth (list bool) (Init.Nat.add n i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add n i) n) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i Datatypes.O) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *)
contradict H; omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (Init.Nat.add n i) m' end then @nth (list bool) (Init.Nat.add n i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add n i) n) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (if Nat.leb i n then @nth (list bool) i vnl (@nil bool) else @nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *)
case_eq (leb i n); intros; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (Init.Nat.add n i) m' end then @nth (list bool) (Init.Nat.add n i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add n i) n) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *)
apply leb_complete_conv in H1.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (Init.Nat.add n i) m' end then @nth (list bool) (Init.Nat.add n i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add n i) n) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub i (S n)) vsl (@nil bool)) (@nth (list bool) i vnl (@nil bool)) *)
contradict H; omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (Init.Nat.add n i) m' end then @nth (list bool) (Init.Nat.add n i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add n i) n) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
injection H1; clear H1; intros; subst.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (Init.Nat.add n i) m' end then @nth (list bool) (Init.Nat.add n i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add n i) n) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
destruct n.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if Nat.leb (Init.Nat.add (S n) i) n then @nth (list bool) (Init.Nat.add (S n) i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub (Init.Nat.add Datatypes.O i) Datatypes.O) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
simpl; rewrite <- (minus_n_O i); trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (if Nat.leb (Init.Nat.add (S n) i) n then @nth (list bool) (Init.Nat.add (S n) i) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
case_eq (leb (S n + i) n); intros.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.add (S n) i) vnl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
apply leb_complete in H1.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.add (S n) i) vnl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
elimtype False; omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) vsl (@nil bool)) (@nth (list bool) i vsl (@nil bool)) *)
replace (S n + i - S n) with i; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq nat i (Init.Nat.sub (Init.Nat.add (S n) i) (S n)) *)
omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
injection H1; clear H1; intros; subst.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
case_eq n; simpl; intros.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n0 with | Datatypes.O => false | S m' => Nat.leb n0 m' end then @nth (list bool) (S n0) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n0 n0) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (@nth (list bool) Datatypes.O vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
destruct vsl; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if match n0 with | Datatypes.O => false | S m' => Nat.leb n0 m' end then @nth (list bool) (S n0) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n0 n0) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
destruct n0.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if Nat.leb (S n0) n0 then @nth (list bool) (S (S n0)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n0) (S n0)) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (@nth (list bool) (Init.Nat.sub Datatypes.O Datatypes.O) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
destruct vsl; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (if Nat.leb (S n0) n0 then @nth (list bool) (S (S n0)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n0) (S n0)) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
case_eq (leb (S n0) n0); intros.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (@nth (list bool) (Init.Nat.sub (S n0) (S n0)) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (@nth (list bool) (S (S n0)) vnl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
apply leb_complete in H2.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (@nth (list bool) (Init.Nat.sub (S n0) (S n0)) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (@nth (list bool) (S (S n0)) vnl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
elimtype False; omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (@nth (list bool) (Init.Nat.sub (S n0) (S n0)) vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
rewrite minus_diag.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@cons bool b (@nth (list bool) Datatypes.O vsl (@nil bool))) (@cons bool b (@hd (list bool) (@nil bool) vsl)) *)
destruct vsl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
destruct n.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@tl bool (@nth (list bool) (Init.Nat.sub Datatypes.O Datatypes.O) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
simpl.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
(* Goal: @eq (list bool) (@tl bool (@nth (list bool) Datatypes.O vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
erewrite hd_nth_0; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
rewrite leb_correct_conv;[ | omega].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (@nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
rewrite minus_diag; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) (@tl bool (@nth (list bool) Datatypes.O vsl (@nil bool))) (@tl bool (@hd (list bool) (@nil bool) vsl)) *)
erewrite hd_nth_0; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
injection H1; clear H1; intros; subst.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if match n with | Datatypes.O => false | S m' => Nat.leb n m' end then @nth (list bool) n vnl (@nil bool) else @nth (list bool) (Init.Nat.sub n n) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S (Datatypes.O as l0) => S n | S (S l1 as l0) => Init.Nat.sub n l1 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S (Datatypes.O as l1) as l0) => S n | S (S (S l2 as l1) as l0) => Init.Nat.sub n l2 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
destruct n.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match @nth (list bool) (Init.Nat.sub Datatypes.O Datatypes.O) vsl (@nil bool) with | nil => @nth (list bool) (S Datatypes.O) vsl (@nil bool) | cons (true as b) l => @nth (list bool) (S (S Datatypes.O)) vsl (@nil bool) | cons (false as b) l => @nth (list bool) (S (S (S Datatypes.O))) vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
simpl.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O vsl (@nil bool) with | nil => @nth (list bool) (S Datatypes.O) vsl (@nil bool) | cons (true as b) l => @nth (list bool) (S (S Datatypes.O)) vsl (@nil bool) | cons (false as b) l => @nth (list bool) (S (S (S Datatypes.O))) vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
destruct vsl; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match l with | nil => @nth (list bool) Datatypes.O vsl (@nil bool) | cons (true as b) l => @nth (list bool) (S Datatypes.O) vsl (@nil bool) | cons (false as b) l => @nth (list bool) (S (S Datatypes.O)) vsl (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l0) => match l with | nil => b | cons b0 l => @nil bool end | cons b (cons c (nil as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => @nil bool end | cons b (cons c (cons d l2 as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => d end end *)
destruct vsl; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match l with | nil => l0 | cons (true as b) l => @nth (list bool) Datatypes.O vsl (@nil bool) | cons (false as b) l => @nth (list bool) (S Datatypes.O) vsl (@nil bool) end match vsl with | nil => match l with | nil => l0 | cons b l => @nil bool end | cons c (nil as l1) => match l with | nil => l0 | cons (true as b) l => c | cons (false as b) l => @nil bool end | cons c (cons d l2 as l1) => match l with | nil => l0 | cons (true as b) l => c | cons (false as b) l => d end end *)
(* Goal: @eq (list bool) match l with | nil => @nil bool | cons (true as b) l => @nil bool | cons (false as b) l => @nil bool end (@nil bool) *)
destruct l; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match l with | nil => l0 | cons (true as b) l => @nth (list bool) Datatypes.O vsl (@nil bool) | cons (false as b) l => @nth (list bool) (S Datatypes.O) vsl (@nil bool) end match vsl with | nil => match l with | nil => l0 | cons b l => @nil bool end | cons c (nil as l1) => match l with | nil => l0 | cons (true as b) l => c | cons (false as b) l => @nil bool end | cons c (cons d l2 as l1) => match l with | nil => l0 | cons (true as b) l => c | cons (false as b) l => d end end *)
(* Goal: @eq (list bool) (if b then @nil bool else @nil bool) (@nil bool) *)
destruct b; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match l with | nil => l0 | cons (true as b) l => @nth (list bool) Datatypes.O vsl (@nil bool) | cons (false as b) l => @nth (list bool) (S Datatypes.O) vsl (@nil bool) end match vsl with | nil => match l with | nil => l0 | cons b l => @nil bool end | cons c (nil as l1) => match l with | nil => l0 | cons (true as b) l => c | cons (false as b) l => @nil bool end | cons c (cons d l2 as l1) => match l with | nil => l0 | cons (true as b) l => c | cons (false as b) l => d end end *)
destruct vsl; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => @nth (list bool) Datatypes.O vsl (@nil bool) end match vsl with | nil => match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => @nil bool end | cons d l2 => match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => d end end *)
(* Goal: @eq (list bool) match l with | nil => l0 | cons (true as b) l => @nil bool | cons (false as b) l => @nil bool end match l with | nil => l0 | cons b l => @nil bool end *)
destruct l; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => @nth (list bool) Datatypes.O vsl (@nil bool) end match vsl with | nil => match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => @nil bool end | cons d l2 => match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => d end end *)
(* Goal: @eq (list bool) (if b then @nil bool else @nil bool) (@nil bool) *)
destruct b; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
(* Goal: @eq (list bool) match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => @nth (list bool) Datatypes.O vsl (@nil bool) end match vsl with | nil => match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => @nil bool end | cons d l2 => match l with | nil => l0 | cons (true as b) l => l1 | cons (false as b) l => d end end *)
destruct vsl; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match (if Nat.leb (S n) n then @nth (list bool) (S n) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
rewrite leb_correct_conv;[ | omega].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match @nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
rewrite minus_diag.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O vsl (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) vsl (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end vsl (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end vsl (@nil bool) end match vsl with | nil => @nil bool | cons a (nil as l) => @nil bool | cons a (cons b (nil as l0) as l) => match a with | nil => b | cons b0 l1 => @nil bool end | cons a (cons b (cons c (nil as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l2 => c | cons (false as b0) l2 => @nil bool end | cons a (cons b (cons c (cons d l2 as l1) as l0) as l) => match a with | nil => b | cons (true as b0) l3 => c | cons (false as b0) l3 => d end end *)
destruct vsl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O (@cons (list bool) l vsl) (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) (@cons (list bool) l vsl) (@nil bool) | cons (true as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l => Init.Nat.sub (S n) l end (@cons (list bool) l vsl) (@nil bool) | cons (false as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S l1 as l) => Init.Nat.sub (S n) l1 end (@cons (list bool) l vsl) (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l0) => match l with | nil => b | cons b0 l => @nil bool end | cons b (cons c (nil as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => @nil bool end | cons b (cons c (cons d l2 as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => d end end *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O (@nil (list bool)) (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) (@nil (list bool)) (@nil bool) | cons (true as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l0 => Init.Nat.sub (S n) l0 end (@nil (list bool)) (@nil bool) | cons (false as b) l => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l0) => S (S n) | S (S l1 as l0) => Init.Nat.sub (S n) l1 end (@nil (list bool)) (@nil bool) end (@nil bool) *)
simpl.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O (@cons (list bool) l vsl) (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) (@cons (list bool) l vsl) (@nil bool) | cons (true as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l => Init.Nat.sub (S n) l end (@cons (list bool) l vsl) (@nil bool) | cons (false as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S l1 as l) => Init.Nat.sub (S n) l1 end (@cons (list bool) l vsl) (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l0) => match l with | nil => b | cons b0 l => @nil bool end | cons b (cons c (nil as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => @nil bool end | cons b (cons c (cons d l2 as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => d end end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S (S n)) vnl (@nil bool) else match match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end with | Datatypes.O => @nil bool | S m => @nil bool end) (@nil bool) *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O (@cons (list bool) l vsl) (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) (@cons (list bool) l vsl) (@nil bool) | cons (true as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l => Init.Nat.sub (S n) l end (@cons (list bool) l vsl) (@nil bool) | cons (false as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S l1 as l) => Init.Nat.sub (S n) l1 end (@cons (list bool) l vsl) (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l0) => match l with | nil => b | cons b0 l => @nil bool end | cons b (cons c (nil as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => @nil bool end | cons b (cons c (cons d l2 as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => d end end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match Init.Nat.sub (S n) n with | Datatypes.O => @nil bool | S m => @nil bool end) (@nil bool) *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O (@cons (list bool) l vsl) (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) (@cons (list bool) l vsl) (@nil bool) | cons (true as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l => Init.Nat.sub (S n) l end (@cons (list bool) l vsl) (@nil bool) | cons (false as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S l1 as l) => Init.Nat.sub (S n) l1 end (@cons (list bool) l vsl) (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l0) => match l with | nil => b | cons b0 l => @nil bool end | cons b (cons c (nil as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => @nil bool end | cons b (cons c (cons d l2 as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => d end end *)
(* Goal: @eq (list bool) (if Nat.leb (S (S n)) n then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match Init.Nat.sub (S (S n)) (S n) with | Datatypes.O => @nil bool | S m => @nil bool end) (@nil bool) *)
rewrite leb_correct_conv;[ | omega].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O (@cons (list bool) l vsl) (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) (@cons (list bool) l vsl) (@nil bool) | cons (true as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l => Init.Nat.sub (S n) l end (@cons (list bool) l vsl) (@nil bool) | cons (false as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S l1 as l) => Init.Nat.sub (S n) l1 end (@cons (list bool) l vsl) (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l0) => match l with | nil => b | cons b0 l => @nil bool end | cons b (cons c (nil as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => @nil bool end | cons b (cons c (cons d l2 as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => d end end *)
(* Goal: @eq (list bool) match Init.Nat.sub (S (S n)) (S n) with | Datatypes.O => @nil bool | S m => @nil bool end (@nil bool) *)
rewrite <- minus_Sn_m; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match @nth (list bool) Datatypes.O (@cons (list bool) l vsl) (@nil bool) with | nil => if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S n)) vnl (@nil bool) else @nth (list bool) (Init.Nat.sub (S n) n) (@cons (list bool) l vsl) (@nil bool) | cons (true as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S n) | S l => Init.Nat.sub (S n) l end (@cons (list bool) l vsl) (@nil bool) | cons (false as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else @nth (list bool) match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S l1 as l) => Init.Nat.sub (S n) l1 end (@cons (list bool) l vsl) (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l0) => match l with | nil => b | cons b0 l => @nil bool end | cons b (cons c (nil as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => @nil bool end | cons b (cons c (cons d l2 as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => d end end *)
simpl.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match l with | nil => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S (S n)) vnl (@nil bool) else match match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end with | Datatypes.O => l | S m => @nth (list bool) m vsl (@nil bool) end | cons (true as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l1 as l) => Init.Nat.sub n l1 end with | Datatypes.O => l | S m => @nth (list bool) m vsl (@nil bool) end | cons (false as b) l0 => if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l1) as l) => S n | S (S (S l2 as l1) as l) => Init.Nat.sub n l2 end with | Datatypes.O => l | S m => @nth (list bool) m vsl (@nil bool) end end match vsl with | nil => @nil bool | cons b (nil as l0) => match l with | nil => b | cons b0 l => @nil bool end | cons b (cons c (nil as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => @nil bool end | cons b (cons c (cons d l2 as l1) as l0) => match l with | nil => b | cons (true as b0) l => c | cons (false as b0) l => d end end *)
destruct l; simpl; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb n m'0 end then @nth (list bool) (S (S n)) vnl (@nil bool) else match match n with | Datatypes.O => S n | S l => Init.Nat.sub n l end with | Datatypes.O => @nil bool | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match Init.Nat.sub (S n) n with | Datatypes.O => @nil bool | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
(* Goal: @eq (list bool) (@nth (list bool) Datatypes.O vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (S n) m' end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match Init.Nat.sub (S n) n with | Datatypes.O => @nil bool | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) (if Nat.leb (S (S n)) n then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match Init.Nat.sub (S (S n)) (S n) with | Datatypes.O => @nil bool | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
(* Goal: @eq (list bool) match Init.Nat.sub (S Datatypes.O) Datatypes.O with | Datatypes.O => @nil bool | S m => @nth (list bool) m vsl (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
simpl.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) (if Nat.leb (S (S n)) n then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match Init.Nat.sub (S (S n)) (S n) with | Datatypes.O => @nil bool | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
(* Goal: @eq (list bool) (@nth (list bool) Datatypes.O vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) (if Nat.leb (S (S n)) n then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match Init.Nat.sub (S (S n)) (S n) with | Datatypes.O => @nil bool | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
rewrite leb_correct_conv;[ | omega].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) match Init.Nat.sub (S (S n)) (S n) with | Datatypes.O => @nil bool | S m => @nth (list bool) m vsl (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
rewrite <- minus_Sn_m; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub (S n) (S n)) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
rewrite minus_diag.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
(* Goal: @eq (list bool) (@nth (list bool) Datatypes.O vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => b | cons b (cons c (nil as l0) as l) => b | cons b (cons c (cons d l1 as l0) as l) => b end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if b then if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end else if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool b l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b0 (nil as l) => @nil bool | cons b0 (cons c (nil as l0) as l) => if b then c else @nil bool | cons b0 (cons c (cons d l1 as l0) as l) => if b then c else d end *)
destruct b.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb n m'1 end then @nth (list bool) (S (S (S n))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S (Datatypes.O as l) => S n | S (S l0 as l) => Init.Nat.sub n l0 end with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S l => Init.Nat.sub (S n) l end with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
(* Goal: @eq (list bool) (@nth (list bool) (S Datatypes.O) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S n) m'0 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S n) | S l => Init.Nat.sub (S n) l end with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (S (S n)) m' end then @nth (list bool) (S (S (S (S (S n))))) vnl (@nil bool) else match Init.Nat.sub (S (S n)) n with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
(* Goal: @eq (list bool) (@nth (list bool) (S Datatypes.O) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (S (S n)) m' end then @nth (list bool) (S (S (S (S (S n))))) vnl (@nil bool) else match Init.Nat.sub (S (S n)) n with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (if Nat.leb (S (S (S n))) n then @nth (list bool) (S (S (S (S (S (S n)))))) vnl (@nil bool) else match Init.Nat.sub (S (S (S n))) (S n) with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
(* Goal: @eq (list bool) match Init.Nat.sub (S (S Datatypes.O)) Datatypes.O with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
simpl.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (if Nat.leb (S (S (S n))) n then @nth (list bool) (S (S (S (S (S (S n)))))) vnl (@nil bool) else match Init.Nat.sub (S (S (S n))) (S n) with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
(* Goal: @eq (list bool) (@nth (list bool) (S Datatypes.O) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (if Nat.leb (S (S (S n))) n then @nth (list bool) (S (S (S (S (S (S n)))))) vnl (@nil bool) else match Init.Nat.sub (S (S (S n))) (S n) with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
rewrite leb_correct_conv;[ | omega].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) match Init.Nat.sub (S (S (S n))) (S n) with | Datatypes.O => @cons bool true l | S m => @nth (list bool) m vsl (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
rewrite <- minus_Sn_m; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: le (S n) (S (S n)) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub (S (S n)) (S n)) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
rewrite <- minus_Sn_m; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: le (S n) (S (S n)) *)
(* Goal: @eq (list bool) (@nth (list bool) (S (Init.Nat.sub (S n) (S n))) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
rewrite minus_diag.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: le (S n) (S (S n)) *)
(* Goal: @eq (list bool) (@nth (list bool) (S Datatypes.O) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => c | cons b (cons c (cons d l1 as l0) as l) => c end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: le (S n) (S (S n)) *)
omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S (Datatypes.O as m'1) as m'0) as m') => false | S (S (S (S m'2 as m'1) as m'0) as m') => Nat.leb n m'2 end then @nth (list bool) (S (S (S (S n)))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S (Datatypes.O as l0) as l) => S n | S (S (S l1 as l0) as l) => Init.Nat.sub n l1 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S (S n))))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S l0 as l) => Init.Nat.sub (S n) l0 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (@nth (list bool) (S (S Datatypes.O)) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S (Datatypes.O as m'0) as m') => false | S (S (S m'1 as m'0) as m') => Nat.leb (S n) m'1 end then @nth (list bool) (S (S (S (S (S n))))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S (Datatypes.O as l) => S (S n) | S (S l0 as l) => Init.Nat.sub (S n) l0 end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S (S n)) m'0 end then @nth (list bool) (S (S (S (S (S (S n)))))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S l => Init.Nat.sub (S (S n)) l end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (@nth (list bool) (S (S Datatypes.O)) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S (Datatypes.O as m') => false | S (S m'0 as m') => Nat.leb (S (S n)) m'0 end then @nth (list bool) (S (S (S (S (S (S n)))))) vnl (@nil bool) else match match n with | Datatypes.O => S (S (S n)) | S l => Init.Nat.sub (S (S n)) l end with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (S (S (S n))) m' end then @nth (list bool) (S (S (S (S (S (S (S n))))))) vnl (@nil bool) else match Init.Nat.sub (S (S (S n))) n with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) (@nth (list bool) (S (S Datatypes.O)) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if match n with | Datatypes.O => false | S m' => Nat.leb (S (S (S n))) m' end then @nth (list bool) (S (S (S (S (S (S (S n))))))) vnl (@nil bool) else match Init.Nat.sub (S (S (S n))) n with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
destruct n; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if Nat.leb (S (S (S (S n)))) n then @nth (list bool) (S (S (S (S (S (S (S (S n)))))))) vnl (@nil bool) else match Init.Nat.sub (S (S (S (S n)))) (S n) with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
(* Goal: @eq (list bool) match Init.Nat.sub (S (S (S Datatypes.O))) Datatypes.O with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) (if Nat.leb (S (S (S (S n)))) n then @nth (list bool) (S (S (S (S (S (S (S (S n)))))))) vnl (@nil bool) else match Init.Nat.sub (S (S (S (S n)))) (S n) with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
rewrite leb_correct_conv;[ | omega].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: @eq (list bool) match Init.Nat.sub (S (S (S (S n)))) (S n) with | Datatypes.O => @cons bool false l | S m => @nth (list bool) m vsl (@nil bool) end match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
rewrite <- minus_Sn_m; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: le (S n) (S (S (S n))) *)
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub (S (S (S n))) (S n)) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
rewrite <- minus_Sn_m; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: le (S n) (S (S (S n))) *)
(* Goal: le (S n) (S (S n)) *)
(* Goal: @eq (list bool) (@nth (list bool) (S (Init.Nat.sub (S (S n)) (S n))) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
rewrite <- minus_Sn_m; trivial.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: le (S n) (S (S (S n))) *)
(* Goal: le (S n) (S (S n)) *)
(* Goal: @eq (list bool) (@nth (list bool) (S (S (Init.Nat.sub (S n) (S n)))) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
rewrite minus_diag.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: le (S n) (S (S (S n))) *)
(* Goal: le (S n) (S (S n)) *)
(* Goal: @eq (list bool) (@nth (list bool) (S (S Datatypes.O)) vsl (@nil bool)) match vsl with | nil => @nil bool | cons b (nil as l) => @nil bool | cons b (cons c (nil as l0) as l) => @nil bool | cons b (cons c (cons d l1 as l0) as l) => d end *)
do 3 (destruct vsl; simpl; trivial).
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: le (S n) (S (S (S n))) *)
(* Goal: le (S n) (S (S n)) *)
omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
(* Goal: le (S n) (S (S (S n))) *)
omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
case_eq (inf e1); intros; rewrite H2 in H1;[ | discriminate ].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
case_eq (inf e2); intros; rewrite H3 in H1;[ | discriminate ].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
case_eq (inf e3); intros; rewrite H4 in H1;[ | discriminate ].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
injection H1; clear H1; intros; subst.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
apply maxl_le3 in H.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
apply maxl_le3 in H0.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) (sem_rec (semI e1) (semI e2) (semI e3) (@hd (list bool) (@nil bool) vnl) (@tl (list bool) vnl) vsl) *)
induction (hd nil vnl); simpl.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (if a then sem (conv n (S s) e3) (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) l (@tl (list bool) vnl) vsl) vsl) else sem (conv n (S s) e2) (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) l (@tl (list bool) vnl) vsl) vsl)) (if a then semI e3 (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl) else semI e2 (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl)) *)
(* Goal: @eq (list bool) (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1) (@tl (list bool) vnl) vsl) (semI e1 (@tl (list bool) vnl) vsl) *)
eapply IHe1; [ | | eauto ]; omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (if a then sem (conv n (S s) e3) (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) l (@tl (list bool) vnl) vsl) vsl) else sem (conv n (S s) e2) (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (sem (conv (Init.Nat.sub n (S Datatypes.O)) s e1)) (sem (conv n (S s) e2)) (sem (conv n (S s) e3)) l (@tl (list bool) vnl) vsl) vsl)) (if a then semI e3 (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl) else semI e2 (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl)) *)
case a; rewrite IHl.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem (conv n (S s) e2) (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl)) (semI e2 (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl)) *)
(* Goal: @eq (list bool) (sem (conv n (S s) e3) (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl)) (semI e3 (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl)) *)
eapply IHe3; [ | | eauto ]; omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
(* Goal: @eq (list bool) (sem (conv n (S s) e2) (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl)) (semI e2 (@cons (list bool) l (@tl (list bool) vnl)) (@cons (list bool) (sem_rec (semI e1) (semI e2) (semI e3) l (@tl (list bool) vnl) vsl) vsl)) *)
eapply IHe2; [ | | eauto ]; omega.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
case_eq (inf e); intros; rewrite H4 in H3;[ | discriminate ].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
case_eq (leb n0 (length rl)); intros; case_eq (leb n1 (length tl)); intros; rewrite H5, H6 in H3; try discriminate.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
simpl in H3.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
case_eq (inf_list (map inf rl)); intros; rewrite H7 in H3; [ | discriminate ].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
case_eq (inf_list (map inf tl)); intros; rewrite H8 in H3; [ | discriminate ].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
case_eq (beq_nat n3 0); intros; rewrite H9 in H3; [ | discriminate ].
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
apply leb_complete in H5.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
apply leb_complete in H6.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
apply beq_nat_true in H9.
(* Goal: @eq (list bool) (sem (conv (@length BCI rl) (@length BCI tl) e) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
erewrite IHe; [ | | | eauto]; try omega.
(* Goal: @eq (list bool) (semI e (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
clear IHe.
(* Goal: @eq (list bool) (semI e (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
injection H3; clear H3; intros; subst.
(* Goal: @eq (list bool) (semI e (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl))) (semI e (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl)) *)
f_equal.
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun ne : BC => sem ne vnl (@nil (list bool))) (@map BCI BC (conv n Datatypes.O) rl)) (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) *)
rewrite map_map.
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: @eq (list (list bool)) (@map BCI (list bool) (fun x : BCI => sem (conv n Datatypes.O x) vnl (@nil (list bool))) rl) (@map BCI (list bool) (fun ne : BCI => semI ne vnl (@nil (list bool))) rl) *)
apply map_ext2.
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: forall (a : BCI) (_ : @In BCI a rl), @eq (list bool) (sem (conv n Datatypes.O a) vnl (@nil (list bool))) (semI a vnl (@nil (list bool))) *)
intros.
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: @eq (list bool) (sem (conv n Datatypes.O a) vnl (@nil (list bool))) (semI a vnl (@nil (list bool))) *)
eapply (inf_list_ex _ a) in H7; trivial.
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: @eq (list bool) (sem (conv n Datatypes.O a) vnl (@nil (list bool))) (semI a vnl (@nil (list bool))) *)
destruct H7 as (na & sa & Ha1 & Ha2 & Ha3).
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: @eq (list bool) (sem (conv n Datatypes.O a) vnl (@nil (list bool))) (semI a vnl (@nil (list bool))) *)
eapply H;[ trivial | | | apply Ha3 ].
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: le sa Datatypes.O *)
(* Goal: le na n *)
apply le_trans with (2 := H1).
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: le sa Datatypes.O *)
(* Goal: le na (Init.Nat.max n2 n4) *)
apply le_trans with (1 := Ha1).
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: le sa Datatypes.O *)
(* Goal: le n2 (Init.Nat.max n2 n4) *)
auto with arith.
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
(* Goal: le sa Datatypes.O *)
trivial.
(* Goal: @eq (list (list bool)) (@map BC (list bool) (fun se : BC => sem se vnl vsl) (@map BCI BC (conv n s) tl)) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
rewrite map_map.
(* Goal: @eq (list (list bool)) (@map BCI (list bool) (fun x : BCI => sem (conv n s x) vnl vsl) tl) (@map BCI (list bool) (fun se : BCI => semI se vnl vsl) tl) *)
apply map_ext2.
(* Goal: forall (a : BCI) (_ : @In BCI a tl), @eq (list bool) (sem (conv n s a) vnl vsl) (semI a vnl vsl) *)
intros.
(* Goal: @eq (list bool) (sem (conv n s a) vnl vsl) (semI a vnl vsl) *)
eapply (inf_list_ex _ a) in H8; trivial.
(* Goal: @eq (list bool) (sem (conv n s a) vnl vsl) (semI a vnl vsl) *)
destruct H8 as (na & sa & Ha1 & Ha2 & Ha3).
(* Goal: @eq (list bool) (sem (conv n s a) vnl vsl) (semI a vnl vsl) *)
eapply H0;[ trivial | | | apply Ha3 ].
(* Goal: le sa s *)
(* Goal: le na n *)
apply le_trans with (2 := H1).
(* Goal: le sa s *)
(* Goal: le na (Init.Nat.max n2 n4) *)
apply le_trans with (1 := Ha1).
(* Goal: le sa s *)
(* Goal: le n4 (Init.Nat.max n2 n4) *)
auto with arith.
(* Goal: le sa s *)
omega.
Qed.
Definition conv_bci_to_bc (e : BCI) : option BC :=
match inf e with
| I n s => Some (conv n s e)
| _ => None
end.
Lemma conv_bci_to_bc_correct : forall (e : BCI) (e' : BC) (vnl vsl : list bs),
conv_bci_to_bc e = Some e' ->
sem e' vnl vsl = semI e vnl vsl.
Proof.
(* Goal: forall (e : BCI) (e' : BC) (vnl vsl : list (list bool)) (_ : @eq (option BC) (conv_bci_to_bc e) (@Some BC e')), @eq (list bool) (sem e' vnl vsl) (semI e vnl vsl) *)
unfold conv_bci_to_bc; intros e e' vnl vsl.
(* Goal: forall _ : @eq (option BC) match inf e with | I n s => @Some BC (conv n s e) | E e => @None BC end (@Some BC e'), @eq (list bool) (sem e' vnl vsl) (semI e vnl vsl) *)
case_eq (inf e);[ | discriminate ].
(* Goal: forall (n n0 : nat) (_ : @eq TypeI (inf e) (I n n0)) (_ : @eq (option BC) (@Some BC (conv n n0 e)) (@Some BC e')), @eq (list bool) (sem e' vnl vsl) (semI e vnl vsl) *)
intros n s Hinf H.
(* Goal: @eq (list bool) (sem e' vnl vsl) (semI e vnl vsl) *)
injection H; clear H; intro H.
(* Goal: @eq (list bool) (sem e' vnl vsl) (semI e vnl vsl) *)
rewrite <- H.
(* Goal: @eq (list bool) (sem (conv n s e) vnl vsl) (semI e vnl vsl) *)
apply conv_correct with n s; auto.
Qed.
|
Require Import Bool Arith Div2 List Permutation.
Require Export Omega.
Global Obligation Tactic := idtac.
Notation "[ x ; .. ; y ]" := (cons x .. (cons y nil) .. ).
Lemma length_nil : forall A (l : list A),
length l = 0 -> l = nil.
Proof.
(* Goal: forall (A : Type) (l : list A) (_ : @eq nat (@length A l) O), @eq (list A) l (@nil A) *)
intros; destruct l; trivial; intros.
(* Goal: @eq (list A) (@cons A a l) (@nil A) *)
simpl in H; contradict H; omega.
Qed.
Lemma length_tail A l : length (@tail A l) = length l - 1.
Proof.
(* Goal: @eq nat (@length A (@tl A l)) (Init.Nat.sub (@length A l) (S O)) *)
destruct l; simpl; auto with arith.
Qed.
Lemma hd_nth_0 A (l : list A) d :
hd d l = nth 0 l d.
Proof.
(* Goal: @eq A (@hd A d l) (@nth A O l d) *)
intros; case l; simpl; trivial.
Qed.
Lemma hd_nth_1 A (l : list A) d :
hd d (tl l) = nth 1 l d.
Proof.
(* Goal: @eq A (@hd A d (@tl A l)) (@nth A (S O) l d) *)
intros; case l; simpl; intros; trivial.
(* Goal: @eq A (@hd A d l0) (@nth A O l0 d) *)
apply hd_nth_0.
Qed.
Lemma In_hd (A : Type)(d:A)(l : list A)(n : nat)(H : length l = S n) :
In (hd d l) l.
Proof.
(* Goal: @In A (@hd A d l) l *)
destruct l.
(* Goal: @In A (@hd A d (@cons A a l)) (@cons A a l) *)
(* Goal: @In A (@hd A d (@nil A)) (@nil A) *)
simpl in H.
(* Goal: @In A (@hd A d (@cons A a l)) (@cons A a l) *)
(* Goal: @In A (@hd A d (@nil A)) (@nil A) *)
discriminate H.
(* Goal: @In A (@hd A d (@cons A a l)) (@cons A a l) *)
simpl; tauto.
Qed.
Lemma map_hd : forall A B (f:A->B) d l, f (hd d l) = hd (f d) (map f l).
Proof.
(* Goal: forall (A B : Type) (f : forall _ : A, B) (d : A) (l : list A), @eq B (f (@hd A d l)) (@hd B (f d) (@map A B f l)) *)
intros A B f d [ | x l]; trivial.
Qed.
Lemma map_tl : forall A B (f:A->B) l, map f (tl l) = tl (map f l).
Lemma map_eq_hd :
forall A B (f:A->B) d l1 l2,
map f l1 = map f l2 -> f (hd d l1) = f (hd d l2).
Proof.
(* Goal: forall (A B : Type) (f : forall _ : A, B) (d : A) (l1 l2 : list A) (_ : @eq (list B) (@map A B f l1) (@map A B f l2)), @eq B (f (@hd A d l1)) (f (@hd A d l2)) *)
intros A B f d [ | a1 l1] [ | a2 l2]; simpl; congruence.
Qed.
Lemma firstn_nil {A} n : firstn n (@nil A) = nil.
Proof.
(* Goal: @eq (list A) (@firstn A n (@nil A)) (@nil A) *)
case n; simpl; trivial.
Qed.
Lemma skipn_nil : forall {A} n (x : list A),
length x <= n -> skipn n x = nil.
Proof.
(* Goal: forall (A : Type) (n : nat) (x : list A) (_ : le (@length A x) n), @eq (list A) (@skipn A n x) (@nil A) *)
induction n; simpl in *; trivial; intros.
(* Goal: @eq (list A) match x with | nil => @nil A | cons a l => @skipn A n l end (@nil A) *)
(* Goal: @eq (list A) x (@nil A) *)
apply length_nil; auto; omega.
(* Goal: @eq (list A) match x with | nil => @nil A | cons a l => @skipn A n l end (@nil A) *)
destruct x; simpl in *; trivial.
(* Goal: @eq (list A) (@skipn A n x) (@nil A) *)
apply IHn; omega.
Qed.
Lemma nth_firstn : forall A i j (l:list A) d,
i < j -> nth i (firstn j l) d = nth i l d.
Proof.
(* Goal: forall (A : Type) (i j : nat) (l : list A) (d : A) (_ : lt i j), @eq A (@nth A i (@firstn A j l) d) (@nth A i l d) *)
intros A i j.
(* Goal: forall (l : list A) (d : A) (_ : lt i j), @eq A (@nth A i (@firstn A j l) d) (@nth A i l d) *)
revert i; induction j; simpl; intros.
(* Goal: @eq A (@nth A i match l with | nil => @nil A | cons a l => @cons A a (@firstn A j l) end d) (@nth A i l d) *)
(* Goal: @eq A match i with | O => d | S m => d end (@nth A i l d) *)
contradict H; omega.
(* Goal: @eq A (@nth A i match l with | nil => @nil A | cons a l => @cons A a (@firstn A j l) end d) (@nth A i l d) *)
case l; simpl; destruct i; simpl; trivial; intros.
(* Goal: @eq A (@nth A i (@firstn A j l0) d) (@nth A i l0 d) *)
apply IHj; omega.
Qed.
Lemma nth_skipn A i j (l:list A) d :
nth i (skipn j l) d = nth (j+i) l d.
Proof.
(* Goal: @eq A (@nth A i (@skipn A j l) d) (@nth A (Init.Nat.add j i) l d) *)
intros; revert i l.
(* Goal: forall (i : nat) (l : list A), @eq A (@nth A i (@skipn A j l) d) (@nth A (Init.Nat.add j i) l d) *)
induction j; simpl; intros; trivial.
(* Goal: @eq A (@nth A i match l with | nil => @nil A | cons a l => @skipn A j l end d) (@nth A (S (Init.Nat.add j i)) l d) *)
destruct l; simpl; trivial; case i; trivial.
Qed.
Lemma length_skipn : forall A n (y : list A),
length (skipn n y) = length y - n.
Proof.
(* Goal: forall (A : Type) (n : nat) (y : list A), @eq nat (@length A (@skipn A n y)) (Init.Nat.sub (@length A y) n) *)
induction n; simpl; intros; [ omega | ].
(* Goal: @eq nat (@length A match y with | nil => @nil A | cons a l => @skipn A n l end) (Init.Nat.sub (@length A y) (S n)) *)
destruct y; simpl; trivial.
Qed.
Lemma skipn_length : forall {A} n (l:list A),
length (skipn n l) = length l - n.
Proof.
(* Goal: forall (A : Type) (n : nat) (l : list A), @eq nat (@length A (@skipn A n l)) (Init.Nat.sub (@length A l) n) *)
induction n; simpl; intros; auto with arith.
(* Goal: @eq nat (@length A match l with | nil => @nil A | cons a l => @skipn A n l end) (Init.Nat.sub (@length A l) (S n)) *)
destruct l; simpl; auto.
Qed.
Lemma cons_skipn :
forall A d i (l:list A),
i < length l ->
nth i l d :: skipn (S i) l = skipn i l.
Proof.
(* Goal: forall (A : Type) (d : A) (i : nat) (l : list A) (_ : lt i (@length A l)), @eq (list A) (@cons A (@nth A i l d) (@skipn A (S i) l)) (@skipn A i l) *)
induction i as [ | i IH]; simpl; intros.
(* Goal: @eq (list A) (@cons A (@nth A (S i) l d) match l with | nil => @nil A | cons a (nil as l) => @nil A | cons a (cons a0 l0 as l) => @skipn A i l0 end) match l with | nil => @nil A | cons a l => @skipn A i l end *)
(* Goal: @eq (list A) (@cons A (@nth A O l d) match l with | nil => @nil A | cons a l => l end) l *)
destruct l as [ | x l]; trivial.
(* Goal: @eq (list A) (@cons A (@nth A (S i) l d) match l with | nil => @nil A | cons a (nil as l) => @nil A | cons a (cons a0 l0 as l) => @skipn A i l0 end) match l with | nil => @nil A | cons a l => @skipn A i l end *)
(* Goal: @eq (list A) (@cons A (@nth A O (@nil A) d) (@nil A)) (@nil A) *)
contradict H; simpl; omega.
(* Goal: @eq (list A) (@cons A (@nth A (S i) l d) match l with | nil => @nil A | cons a (nil as l) => @nil A | cons a (cons a0 l0 as l) => @skipn A i l0 end) match l with | nil => @nil A | cons a l => @skipn A i l end *)
destruct l as [ | x l].
(* Goal: @eq (list A) (@cons A (@nth A (S i) (@cons A x l) d) match l with | nil => @nil A | cons a l => @skipn A i l end) (@skipn A i l) *)
(* Goal: @eq (list A) (@cons A (@nth A (S i) (@nil A) d) (@nil A)) (@nil A) *)
contradict H; simpl; omega.
(* Goal: @eq (list A) (@cons A (@nth A (S i) (@cons A x l) d) match l with | nil => @nil A | cons a l => @skipn A i l end) (@skipn A i l) *)
rewrite <- IH; trivial.
(* Goal: lt i (@length A l) *)
simpl in H; omega.
Qed.
Lemma skipn_plus :
forall A j i (l:list A), skipn (i+j) l = skipn i (skipn j l).
Proof.
(* Goal: forall (A : Type) (j i : nat) (l : list A), @eq (list A) (@skipn A (Init.Nat.add i j) l) (@skipn A i (@skipn A j l)) *)
induction j as [ | j IH]; simpl; intros.
(* Goal: @eq (list A) (@skipn A (Init.Nat.add i (S j)) l) (@skipn A i match l with | nil => @nil A | cons a l => @skipn A j l end) *)
(* Goal: @eq (list A) (@skipn A (Init.Nat.add i O) l) (@skipn A i l) *)
rewrite plus_0_r; trivial.
(* Goal: @eq (list A) (@skipn A (Init.Nat.add i (S j)) l) (@skipn A i match l with | nil => @nil A | cons a l => @skipn A j l end) *)
rewrite <- plus_Snm_nSm.
(* Goal: @eq (list A) (@skipn A (Init.Nat.add (S i) j) l) (@skipn A i match l with | nil => @nil A | cons a l => @skipn A j l end) *)
case l.
(* Goal: forall (a : A) (l : list A), @eq (list A) (@skipn A (Init.Nat.add (S i) j) (@cons A a l)) (@skipn A i (@skipn A j l)) *)
(* Goal: @eq (list A) (@skipn A (Init.Nat.add (S i) j) (@nil A)) (@skipn A i (@nil A)) *)
rewrite !skipn_nil; simpl; trivial; omega.
(* Goal: forall (a : A) (l : list A), @eq (list A) (@skipn A (Init.Nat.add (S i) j) (@cons A a l)) (@skipn A i (@skipn A j l)) *)
simpl; trivial.
Qed.
Lemma skipn_hd : forall {A} n y (d:A),
n < length y ->
skipn n y = nth n y d :: skipn (S n) y.
Proof.
(* Goal: forall (A : Type) (n : nat) (y : list A) (d : A) (_ : lt n (@length A y)), @eq (list A) (@skipn A n y) (@cons A (@nth A n y d) (@skipn A (S n) y)) *)
induction n; simpl; intros.
(* Goal: @eq (list A) match y with | nil => @nil A | cons a l => @skipn A n l end (@cons A (@nth A (S n) y d) match y with | nil => @nil A | cons a (nil as l) => @nil A | cons a (cons a0 l0 as l) => @skipn A n l0 end) *)
(* Goal: @eq (list A) y (@cons A (@nth A O y d) match y with | nil => @nil A | cons a l => l end) *)
destruct y; simpl in *; trivial.
(* Goal: @eq (list A) match y with | nil => @nil A | cons a l => @skipn A n l end (@cons A (@nth A (S n) y d) match y with | nil => @nil A | cons a (nil as l) => @nil A | cons a (cons a0 l0 as l) => @skipn A n l0 end) *)
(* Goal: @eq (list A) (@nil A) (@cons A d (@nil A)) *)
contradict H; omega.
(* Goal: @eq (list A) match y with | nil => @nil A | cons a l => @skipn A n l end (@cons A (@nth A (S n) y d) match y with | nil => @nil A | cons a (nil as l) => @nil A | cons a (cons a0 l0 as l) => @skipn A n l0 end) *)
destruct y; simpl in *.
(* Goal: @eq (list A) (@skipn A n y) (@cons A (@nth A n y d) match y with | nil => @nil A | cons a l => @skipn A n l end) *)
(* Goal: @eq (list A) (@nil A) (@cons A d (@nil A)) *)
contradict H; omega.
(* Goal: @eq (list A) (@skipn A n y) (@cons A (@nth A n y d) match y with | nil => @nil A | cons a l => @skipn A n l end) *)
apply IHn.
(* Goal: lt n (@length A y) *)
omega.
Qed.
Lemma firstn_app {A} (l l' : list A) :
firstn (length l) (l ++ l') = l.
Proof.
(* Goal: @eq (list A) (@firstn A (@length A l) (@app A l l')) l *)
induction l; intros; simpl; trivial.
(* Goal: @eq (list A) (@cons A a (@firstn A (@length A l) (@app A l l'))) (@cons A a l) *)
rewrite IHl; trivial.
Qed.
Lemma skipn_app {A} (l l' : list A) :
skipn (length l) (l ++ l') = l'.
Proof.
(* Goal: @eq (list A) (@skipn A (@length A l) (@app A l l')) l' *)
induction l; intros; simpl; trivial.
Qed.
Lemma map_cons : forall A B (f:A->B) a l, map f (a::l) = f a :: map f l.
Proof.
(* Goal: forall (A B : Type) (f : forall _ : A, B) (a : A) (l : list A), @eq (list B) (@map A B f (@cons A a l)) (@cons B (f a) (@map A B f l)) *)
trivial.
Qed.
Lemma map_firstn : forall A B (f:A->B) n l,
map f (firstn n l) = firstn n (map f l).
Proof.
(* Goal: forall (A B : Type) (f : forall _ : A, B) (n : nat) (l : list A), @eq (list B) (@map A B f (@firstn A n l)) (@firstn B n (@map A B f l)) *)
induction n; simpl; intros; trivial.
(* Goal: @eq (list B) (@map A B f match l with | nil => @nil A | cons a l => @cons A a (@firstn A n l) end) match @map A B f l with | nil => @nil B | cons a l => @cons B a (@firstn B n l) end *)
case l; simpl; trivial; congruence.
Qed.
Lemma map_skipn : forall A B (f:A->B) n l,
map f (skipn n l) = skipn n (map f l).
Proof.
(* Goal: forall (A B : Type) (f : forall _ : A, B) (n : nat) (l : list A), @eq (list B) (@map A B f (@skipn A n l)) (@skipn B n (@map A B f l)) *)
induction n; simpl; intros; trivial.
(* Goal: @eq (list B) (@map A B f match l with | nil => @nil A | cons a l => @skipn A n l end) match @map A B f l with | nil => @nil B | cons a l => @skipn B n l end *)
case l; simpl; trivial; congruence.
Qed.
Lemma map_nth_seq : forall A (l:list A) len n d,
length l = len + n ->
map (fun x : nat => nth x l d) (seq n len) = (skipn n l).
Proof.
(* Goal: forall (A : Type) (l : list A) (len n : nat) (d : A) (_ : @eq nat (@length A l) (Init.Nat.add len n)), @eq (list A) (@map nat A (fun x : nat => @nth A x l d) (seq n len)) (@skipn A n l) *)
intros A l len; revert l.
(* Goal: forall (l : list A) (n : nat) (d : A) (_ : @eq nat (@length A l) (Init.Nat.add len n)), @eq (list A) (@map nat A (fun x : nat => @nth A x l d) (seq n len)) (@skipn A n l) *)
induction len; simpl; intros.
(* Goal: @eq (list A) (@cons A (@nth A n l d) (@map nat A (fun x : nat => @nth A x l d) (seq (S n) len))) (@skipn A n l) *)
(* Goal: @eq (list A) (@nil A) (@skipn A n l) *)
rewrite skipn_nil; trivial; omega.
(* Goal: @eq (list A) (@cons A (@nth A n l d) (@map nat A (fun x : nat => @nth A x l d) (seq (S n) len))) (@skipn A n l) *)
rewrite IHlen, <- skipn_hd; trivial; omega.
Qed.
Lemma skipn_nil_length : forall A n (l : list A),
skipn n l = nil -> length l <= n.
Proof.
(* Goal: forall (A : Type) (n : nat) (l : list A) (_ : @eq (list A) (@skipn A n l) (@nil A)), le (@length A l) n *)
induction n; simpl in *; intros.
(* Goal: le (@length A l) (S n) *)
(* Goal: le (@length A l) O *)
subst; simpl; trivial.
(* Goal: le (@length A l) (S n) *)
destruct l; simpl; [ omega | ].
(* Goal: le (S (@length A l)) (S n) *)
generalize (IHn _ H); omega.
Qed.
Lemma firstn_map_nth :
forall A d n m (l:list A),
m+n <= length l ->
firstn n (skipn m l) = map (fun i => nth i l d) (seq m n).
Lemma firstn_seq n start len :
firstn n (seq start len) = seq start (min n len).
Proof.
(* Goal: @eq (list nat) (@firstn nat n (seq start len)) (seq start (Init.Nat.min n len)) *)
intros; revert n start.
(* Goal: forall n start : nat, @eq (list nat) (@firstn nat n (seq start len)) (seq start (Init.Nat.min n len)) *)
induction len; simpl; intros.
(* Goal: @eq (list nat) (@firstn nat n (@cons nat start (seq (S start) len))) (seq start (Init.Nat.min n (S len))) *)
(* Goal: @eq (list nat) (@firstn nat n (@nil nat)) (seq start (Init.Nat.min n O)) *)
rewrite min_r; simpl;[ | omega].
(* Goal: @eq (list nat) (@firstn nat n (@cons nat start (seq (S start) len))) (seq start (Init.Nat.min n (S len))) *)
(* Goal: @eq (list nat) (@firstn nat n (@nil nat)) (@nil nat) *)
apply firstn_nil.
(* Goal: @eq (list nat) (@firstn nat n (@cons nat start (seq (S start) len))) (seq start (Init.Nat.min n (S len))) *)
case n; simpl; trivial; congruence.
Qed.
Lemma skipn_seq n start len :
skipn n (seq start len) = seq (start+n) (len-n).
Proof.
(* Goal: @eq (list nat) (@skipn nat n (seq start len)) (seq (Init.Nat.add start n) (Init.Nat.sub len n)) *)
intros; revert n start.
(* Goal: forall n start : nat, @eq (list nat) (@skipn nat n (seq start len)) (seq (Init.Nat.add start n) (Init.Nat.sub len n)) *)
induction len; simpl; intros.
(* Goal: @eq (list nat) (@skipn nat n (@cons nat start (seq (S start) len))) (seq (Init.Nat.add start n) match n with | O => S len | S l => Init.Nat.sub len l end) *)
(* Goal: @eq (list nat) (@skipn nat n (@nil nat)) (@nil nat) *)
apply skipn_nil; simpl; omega.
(* Goal: @eq (list nat) (@skipn nat n (@cons nat start (seq (S start) len))) (seq (Init.Nat.add start n) match n with | O => S len | S l => Init.Nat.sub len l end) *)
case n; simpl; intros.
(* Goal: @eq (list nat) (@skipn nat n0 (seq (S start) len)) (seq (Init.Nat.add start (S n0)) (Init.Nat.sub len n0)) *)
(* Goal: @eq (list nat) (@cons nat start (seq (S start) len)) (@cons nat (Init.Nat.add start O) (seq (S (Init.Nat.add start O)) len)) *)
rewrite plus_0_r; trivial.
(* Goal: @eq (list nat) (@skipn nat n0 (seq (S start) len)) (seq (Init.Nat.add start (S n0)) (Init.Nat.sub len n0)) *)
rewrite <- plus_Snm_nSm; apply IHlen.
Qed.
Lemma in_seq_iff : forall x len start,
In x (seq start len) <-> start <= x < start+len.
Proof.
(* Goal: forall x len start : nat, iff (@In nat x (seq start len)) (and (le start x) (lt x (Init.Nat.add start len))) *)
intros x len.
(* Goal: forall start : nat, iff (@In nat x (seq start len)) (and (le start x) (lt x (Init.Nat.add start len))) *)
induction len; simpl; intros;[ omega | ].
(* Goal: iff (or (@eq nat start x) (@In nat x (seq (S start) len))) (and (le start x) (lt x (Init.Nat.add start (S len)))) *)
split.
(* Goal: forall _ : and (le start x) (lt x (Init.Nat.add start (S len))), or (@eq nat start x) (@In nat x (seq (S start) len)) *)
(* Goal: forall _ : or (@eq nat start x) (@In nat x (seq (S start) len)), and (le start x) (lt x (Init.Nat.add start (S len))) *)
intros [H | H]; subst; try omega.
(* Goal: forall _ : and (le start x) (lt x (Init.Nat.add start (S len))), or (@eq nat start x) (@In nat x (seq (S start) len)) *)
(* Goal: and (le start x) (lt x (Init.Nat.add start (S len))) *)
assert (S start <= x < S start + len).
(* Goal: forall _ : and (le start x) (lt x (Init.Nat.add start (S len))), or (@eq nat start x) (@In nat x (seq (S start) len)) *)
(* Goal: and (le start x) (lt x (Init.Nat.add start (S len))) *)
(* Goal: and (le (S start) x) (lt x (Init.Nat.add (S start) len)) *)
rewrite <- IHlen; trivial.
(* Goal: forall _ : and (le start x) (lt x (Init.Nat.add start (S len))), or (@eq nat start x) (@In nat x (seq (S start) len)) *)
(* Goal: and (le start x) (lt x (Init.Nat.add start (S len))) *)
omega.
(* Goal: forall _ : and (le start x) (lt x (Init.Nat.add start (S len))), or (@eq nat start x) (@In nat x (seq (S start) len)) *)
intro H; rewrite IHlen; omega.
Qed.
Lemma nth_map_cst :
forall {A B} (l:list A) n (d:B), nth n (map (fun _ => d) l) d = d.
Proof.
(* Goal: forall (A B : Type) (l : list A) (n : nat) (d : B), @eq B (@nth B n (@map A B (fun _ : A => d) l) d) d *)
intros A B l.
(* Goal: forall (n : nat) (d : B), @eq B (@nth B n (@map A B (fun _ : A => d) l) d) d *)
induction l as [ | a l IH]; intros [ | n] d; simpl; trivial.
Qed.
Lemma nth_S_tl A (l : list A) d n :
nth n (tl l) d = nth (S n) l d.
Proof.
(* Goal: @eq A (@nth A n (@tl A l) d) (@nth A (S n) l d) *)
intros; destruct l; simpl; intros; trivial.
(* Goal: @eq A match n with | O => d | S m => d end d *)
case n; trivial.
Qed.
Lemma map_ext2 : forall {A B} (f g : A -> B) l,
(forall a : A, In a l -> f a = g a) -> map f l = map g l.
Proof.
(* Goal: forall (A B : Type) (f g : forall _ : A, B) (l : list A) (_ : forall (a : A) (_ : @In A a l), @eq B (f a) (g a)), @eq (list B) (@map A B f l) (@map A B g l) *)
intros; induction l; simpl; trivial.
(* Goal: @eq (list B) (@cons B (f a) (@map A B f l)) (@cons B (g a) (@map A B g l)) *)
f_equal.
(* Goal: @eq (list B) (@map A B f l) (@map A B g l) *)
(* Goal: @eq B (f a) (g a) *)
apply H; simpl; auto.
(* Goal: @eq (list B) (@map A B f l) (@map A B g l) *)
apply IHl.
(* Goal: forall (a : A) (_ : @In A a l), @eq B (f a) (g a) *)
intros; apply H; simpl; auto.
Qed.
Lemma map_nth2
(A B : Type) (f : A -> B) (l : list A) b d n :
(f d) = b ->
nth n (map f l) b = f (nth n l d).
Proof.
(* Goal: forall _ : @eq B (f d) b, @eq B (@nth B n (@map A B f l) b) (f (@nth A n l d)) *)
intros; rewrite <- H; apply map_nth.
Qed.
Lemma length_plus_ex {A} n1 n2 (l : list A):
length l = n1 + n2 ->
exists l1, exists l2,
length l1 = n1 /\ length l2 = n2 /\ l = l1 ++ l2.
Proof.
(* Goal: forall _ : @eq nat (@length A l) (Init.Nat.add n1 n2), @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq nat (@length A l1) n1) (and (@eq nat (@length A l2) n2) (@eq (list A) l (@app A l1 l2))))) *)
intros.
(* Goal: @ex (list A) (fun l1 : list A => @ex (list A) (fun l2 : list A => and (@eq nat (@length A l1) n1) (and (@eq nat (@length A l2) n2) (@eq (list A) l (@app A l1 l2))))) *)
exists (firstn n1 l).
(* Goal: @ex (list A) (fun l2 : list A => and (@eq nat (@length A (@firstn A n1 l)) n1) (and (@eq nat (@length A l2) n2) (@eq (list A) l (@app A (@firstn A n1 l) l2)))) *)
exists (skipn n1 l).
(* Goal: and (@eq nat (@length A (@firstn A n1 l)) n1) (and (@eq nat (@length A (@skipn A n1 l)) n2) (@eq (list A) l (@app A (@firstn A n1 l) (@skipn A n1 l)))) *)
rewrite firstn_length, min_l, length_skipn, firstn_skipn; repeat split; omega.
Qed.
Lemma tl_app : forall A (l1 l2 : list A),
l1 <> nil ->
tl (l1 ++ l2) = tl l1 ++ l2.
Proof.
(* Goal: forall (A : Type) (l1 l2 : list A) (_ : not (@eq (list A) l1 (@nil A))), @eq (list A) (@tl A (@app A l1 l2)) (@app A (@tl A l1) l2) *)
intros; destruct l1; simpl; trivial.
(* Goal: @eq (list A) (@tl A l2) l2 *)
elim H; trivial.
Qed.
Lemma map_seq_nth : forall A B (l : list A) (g : A -> B) d,
map (fun n => g (nth n l d)) (seq 0 (length l)) = map g l.
Proof.
(* Goal: forall (A B : Type) (l : list A) (g : forall _ : A, B) (d : A), @eq (list B) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) (@map A B g l) *)
intros A B l g d.
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) (@map A B g l) *)
change l with (skipn 0 l) at 3.
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) (@map A B g (@skipn A O l)) *)
rewrite <- map_nth_seq with (len := length l) (d := d).
(* Goal: @eq nat (@length A l) (Init.Nat.add (@length A l) O) *)
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) (@map A B g (@map nat A (fun x : nat => @nth A x l d) (seq O (@length A l)))) *)
rewrite map_map.
(* Goal: @eq nat (@length A l) (Init.Nat.add (@length A l) O) *)
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) (@map nat B (fun x : nat => g (@nth A x l d)) (seq O (@length A l))) *)
auto.
(* Goal: @eq nat (@length A l) (Init.Nat.add (@length A l) O) *)
auto.
Qed.
Lemma map_seq_shift : forall A m (f : nat -> A) n,
n <> 0 ->
map f (seq 0 m) = map (fun x => f (x - n)%nat) (seq n m).
Proof.
(* Goal: forall (A : Type) (m : nat) (f : forall _ : nat, A) (n : nat) (_ : not (@eq nat n O)), @eq (list A) (@map nat A f (seq O m)) (@map nat A (fun x : nat => f (Init.Nat.sub x n)) (seq n m)) *)
induction m; simpl; intros; auto.
(* Goal: @eq (list A) (@cons A (f O) (@map nat A f (seq (S O) m))) (@cons A (f (Init.Nat.sub n n)) (@map nat A (fun x : nat => f (Init.Nat.sub x n)) (seq (S n) m))) *)
f_equal.
(* Goal: @eq (list A) (@map nat A f (seq (S O) m)) (@map nat A (fun x : nat => f (Init.Nat.sub x n)) (seq (S n) m)) *)
(* Goal: @eq A (f O) (f (Init.Nat.sub n n)) *)
f_equal; omega.
(* Goal: @eq (list A) (@map nat A f (seq (S O) m)) (@map nat A (fun x : nat => f (Init.Nat.sub x n)) (seq (S n) m)) *)
rewrite <- seq_shift with (start := 0).
(* Goal: @eq (list A) (@map nat A f (@map nat nat S (seq O m))) (@map nat A (fun x : nat => f (Init.Nat.sub x n)) (seq (S n) m)) *)
rewrite map_map.
(* Goal: @eq (list A) (@map nat A (fun x : nat => f (S x)) (seq O m)) (@map nat A (fun x : nat => f (Init.Nat.sub x n)) (seq (S n) m)) *)
rewrite IHm with (n := S n).
(* Goal: not (@eq nat (S n) O) *)
(* Goal: @eq (list A) (@map nat A (fun x : nat => f (S (Init.Nat.sub x (S n)))) (seq (S n) m)) (@map nat A (fun x : nat => f (Init.Nat.sub x n)) (seq (S n) m)) *)
apply map_ext2.
(* Goal: not (@eq nat (S n) O) *)
(* Goal: forall (a : nat) (_ : @In nat a (seq (S n) m)), @eq A (f (S (Init.Nat.sub a (S n)))) (f (Init.Nat.sub a n)) *)
intros; f_equal.
(* Goal: not (@eq nat (S n) O) *)
(* Goal: @eq nat (S (Init.Nat.sub a (S n))) (Init.Nat.sub a n) *)
rewrite in_seq_iff in H0.
(* Goal: not (@eq nat (S n) O) *)
(* Goal: @eq nat (S (Init.Nat.sub a (S n))) (Init.Nat.sub a n) *)
omega.
(* Goal: not (@eq nat (S n) O) *)
omega.
Qed.
Lemma map_seq_nth_safe : forall A B (l : list A) (g : A -> B) d m,
map (fun n => g (nth (n - m) l d)) (seq m (length l)) = map g l.
Proof.
(* Goal: forall (A B : Type) (l : list A) (g : forall _ : A, B) (d : A) (m : nat), @eq (list B) (@map nat B (fun n : nat => g (@nth A (Init.Nat.sub n m) l d)) (seq m (@length A l))) (@map A B g l) *)
intros A B l g d m.
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A (Init.Nat.sub n m) l d)) (seq m (@length A l))) (@map A B g l) *)
rewrite <- map_seq_nth with (d := d).
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A (Init.Nat.sub n m) l d)) (seq m (@length A l))) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) *)
destruct m; simpl.
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A (Init.Nat.sub n (S m)) l d)) (seq (S m) (@length A l))) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) *)
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A (Init.Nat.sub n O) l d)) (seq O (@length A l))) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) *)
apply map_ext; intros.
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A (Init.Nat.sub n (S m)) l d)) (seq (S m) (@length A l))) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) *)
(* Goal: @eq B (g (@nth A (Init.Nat.sub a O) l d)) (g (@nth A a l d)) *)
rewrite <- minus_n_O; trivial.
(* Goal: @eq (list B) (@map nat B (fun n : nat => g (@nth A (Init.Nat.sub n (S m)) l d)) (seq (S m) (@length A l))) (@map nat B (fun n : nat => g (@nth A n l d)) (seq O (@length A l))) *)
rewrite map_seq_shift with (n := S m); auto.
Qed.
Lemma seq_app : forall x y z,
seq x y ++ seq (x + y) z = seq x (y + z).
Proof.
(* Goal: forall x y z : nat, @eq (list nat) (@app nat (seq x y) (seq (Init.Nat.add x y) z)) (seq x (Init.Nat.add y z)) *)
intros.
(* Goal: @eq (list nat) (@app nat (seq x y) (seq (Init.Nat.add x y) z)) (seq x (Init.Nat.add y z)) *)
rewrite <- firstn_skipn with (l := seq x (y + z)) (n := y).
(* Goal: @eq (list nat) (@app nat (seq x y) (seq (Init.Nat.add x y) z)) (@app nat (@firstn nat y (seq x (Init.Nat.add y z))) (@skipn nat y (seq x (Init.Nat.add y z)))) *)
f_equal.
(* Goal: @eq (list nat) (seq (Init.Nat.add x y) z) (@skipn nat y (seq x (Init.Nat.add y z))) *)
(* Goal: @eq (list nat) (seq x y) (@firstn nat y (seq x (Init.Nat.add y z))) *)
rewrite firstn_seq.
(* Goal: @eq (list nat) (seq (Init.Nat.add x y) z) (@skipn nat y (seq x (Init.Nat.add y z))) *)
(* Goal: @eq (list nat) (seq x y) (seq x (Init.Nat.min y (Init.Nat.add y z))) *)
rewrite Min.min_l; auto.
(* Goal: @eq (list nat) (seq (Init.Nat.add x y) z) (@skipn nat y (seq x (Init.Nat.add y z))) *)
(* Goal: le y (Init.Nat.add y z) *)
omega.
(* Goal: @eq (list nat) (seq (Init.Nat.add x y) z) (@skipn nat y (seq x (Init.Nat.add y z))) *)
rewrite skipn_seq.
(* Goal: @eq (list nat) (seq (Init.Nat.add x y) z) (seq (Init.Nat.add x y) (Init.Nat.sub (Init.Nat.add y z) y)) *)
f_equal; omega.
Qed.
Definition andl {A} (P:A->Prop)(l:list A) : Prop :=
fold_right (fun a res => P a /\ res) True l.
Lemma forall_andl A (P:A->Prop) l :
(forall x, In x l -> P x) <-> andl P l.
Proof.
(* Goal: iff (forall (x : A) (_ : @In A x l), P x) (@andl A P l) *)
induction l; simpl; intros;[ tauto | ].
(* Goal: iff (forall (x : A) (_ : or (@eq A a x) (@In A x l)), P x) (and (P a) (@andl A P l)) *)
split; intro.
(* Goal: forall (x : A) (_ : or (@eq A a x) (@In A x l)), P x *)
(* Goal: and (P a) (@andl A P l) *)
rewrite <- IHl; auto.
(* Goal: forall (x : A) (_ : or (@eq A a x) (@In A x l)), P x *)
intros x [H1 | H2]; subst;[ tauto | ].
(* Goal: P x *)
apply IHl; tauto.
Qed.
Fixpoint fun_power {A:Type}(n:nat)(f:A->A)(x:A) : A :=
match n with
| 0 => x
| S n' => f (fun_power n' f x)
end.
Lemma fun_power_minus_S : forall A (f:A->A) x m n,
m < n -> f (fun_power (n - S m) f x) = fun_power (n - m) f x.
Proof.
(* Goal: forall (A : Type) (f : forall _ : A, A) (x : A) (m n : nat) (_ : lt m n), @eq A (f (@fun_power A (Init.Nat.sub n (S m)) f x)) (@fun_power A (Init.Nat.sub n m) f x) *)
intros A f x m n H.
(* Goal: @eq A (f (@fun_power A (Init.Nat.sub n (S m)) f x)) (@fun_power A (Init.Nat.sub n m) f x) *)
replace (n-m) with (S (n - S m)) by omega; trivial.
Qed.
Definition mod2 (n : nat) : nat :=
n - 2 * div2 n.
Fixpoint power (m n:nat) : nat :=
match n with
| 0 => 1
| S n' => m * power m n'
end.
Lemma power_le_l : forall a b n, a <= b -> power a n <= power b n.
Proof.
(* Goal: forall (a b n : nat) (_ : le a b), le (power a n) (power b n) *)
induction n; simpl; intros; trivial.
(* Goal: le (Init.Nat.mul a (power a n)) (Init.Nat.mul b (power b n)) *)
apply mult_le_compat; tauto.
Qed.
Definition plusl (l:list nat) : nat :=
fold_right plus 0 l.
Lemma plusl_cons : forall x l, plusl (x :: l) = x + plusl l.
Proof.
(* Goal: forall (x : nat) (l : list nat), @eq nat (plusl (@cons nat x l)) (Init.Nat.add x (plusl l)) *)
trivial.
Qed.
Lemma plusl_app l1 l2 :
plusl (l1++l2) = plusl l1 + plusl l2.
Proof.
(* Goal: @eq nat (plusl (@app nat l1 l2)) (Init.Nat.add (plusl l1) (plusl l2)) *)
induction l1; simpl; intros; trivial.
(* Goal: @eq nat (Init.Nat.add a (plusl (@app nat l1 l2))) (Init.Nat.add (Init.Nat.add a (plusl l1)) (plusl l2)) *)
rewrite IHl1; ring.
Qed.
Lemma plusl_compat : forall A (l : list A) f g,
(forall x, In x l -> f x <= g x) ->
plusl (map f l) <= plusl (map g l).
Proof.
(* Goal: forall (A : Type) (l : list A) (f g : forall _ : A, nat) (_ : forall (x : A) (_ : @In A x l), le (f x) (g x)), le (plusl (@map A nat f l)) (plusl (@map A nat g l)) *)
induction l; simpl; intros; auto.
(* Goal: le (Init.Nat.add (f a) (plusl (@map A nat f l))) (Init.Nat.add (g a) (plusl (@map A nat g l))) *)
apply plus_le_compat; auto.
Qed.
Definition multl (l:list nat) : nat :=
fold_right mult 1 l.
Lemma multl_app l1 l2 :
multl (l1++l2) = multl l1 * multl l2.
Proof.
(* Goal: @eq nat (multl (@app nat l1 l2)) (Init.Nat.mul (multl l1) (multl l2)) *)
induction l1; simpl; intros; trivial.
(* Goal: @eq nat (Init.Nat.mul a (multl (@app nat l1 l2))) (Init.Nat.mul (Init.Nat.mul a (multl l1)) (multl l2)) *)
rewrite IHl1; ring.
Qed.
Lemma multl_plus_distr_l n l :
n * plusl l = plusl (map (fun m => n * m) l).
Proof.
(* Goal: @eq nat (Init.Nat.mul n (plusl l)) (plusl (@map nat nat (fun m : nat => Init.Nat.mul n m) l)) *)
induction l as [ | m l' IH]; simpl; intros; [ | rewrite <- IH]; ring.
Qed.
Fixpoint maxl l :=
match l with
| nil => 0
| a :: l' => max a (maxl l')
end.
Lemma in_le_maxl x l : In x l -> x <= maxl l.
Proof.
(* Goal: forall _ : @In nat x l, le x (maxl l) *)
induction l; simpl; intros.
(* Goal: le x (Init.Nat.max a (maxl l)) *)
(* Goal: le x O *)
tauto.
(* Goal: le x (Init.Nat.max a (maxl l)) *)
destruct H; subst.
(* Goal: le x (Init.Nat.max a (maxl l)) *)
(* Goal: le x (Init.Nat.max x (maxl l)) *)
apply Nat.le_max_l.
(* Goal: le x (Init.Nat.max a (maxl l)) *)
eapply le_trans; [ | apply Nat.le_max_r]; tauto.
Qed.
Lemma maxl_map A l (f : A -> nat) n :
(forall x, In x l -> f x = n) ->
maxl (map f l) <= n.
Proof.
(* Goal: forall _ : forall (x : A) (_ : @In A x l), @eq nat (f x) n, le (maxl (@map A nat f l)) n *)
induction l; simpl; intros; trivial.
(* Goal: le (Init.Nat.max (f a) (maxl (@map A nat f l))) n *)
(* Goal: le O n *)
omega.
(* Goal: le (Init.Nat.max (f a) (maxl (@map A nat f l))) n *)
apply Nat.max_lub.
(* Goal: le (maxl (@map A nat f l)) n *)
(* Goal: le (f a) n *)
rewrite H; auto.
(* Goal: le (maxl (@map A nat f l)) n *)
apply IHl.
(* Goal: forall (x : A) (_ : @In A x l), @eq nat (f x) n *)
intros; apply H; auto.
Qed.
Lemma maxl_le l e :
maxl l <= e ->
(forall x, In x l -> x <= e).
Proof.
(* Goal: forall (_ : le (maxl l) e) (x : nat) (_ : @In nat x l), le x e *)
induction l; simpl;[ tauto | intros].
(* Goal: le x e *)
destruct H0; subst.
(* Goal: le x e *)
(* Goal: le x e *)
apply Nat.max_lub_l with (maxl l); trivial.
(* Goal: le x e *)
apply IHl; trivial.
(* Goal: le (maxl l) e *)
apply Nat.max_lub_r with a; trivial.
Qed.
Lemma maxl_eq_le l e :
maxl l = e ->
(forall x, In x l -> x <= e).
Proof.
(* Goal: forall (_ : @eq nat (maxl l) e) (x : nat) (_ : @In nat x l), le x e *)
intros.
(* Goal: le x e *)
apply maxl_le with l; auto.
(* Goal: le (maxl l) e *)
rewrite H; auto.
Qed.
Lemma maxl_eq_le3 e1 e2 e3 e :
maxl [e1; e2; e3] = e ->
e1 <= e /\ e2 <= e /\ e3 <= e.
Proof.
(* Goal: forall _ : @eq nat (maxl (@cons nat e1 (@cons nat e2 (@cons nat e3 (@nil nat))))) e, and (le e1 e) (and (le e2 e) (le e3 e)) *)
intros.
(* Goal: and (le e1 e) (and (le e2 e) (le e3 e)) *)
assert (Hl := maxl_eq_le _ _ H).
(* Goal: and (le e1 e) (and (le e2 e) (le e3 e)) *)
repeat split; apply Hl; simpl; auto.
Qed.
Lemma maxl_le3 e1 e2 e3 e :
maxl [e1; e2; e3] <= e ->
e1 <= e /\ e2 <= e /\ e3 <= e.
Proof.
(* Goal: forall _ : le (maxl (@cons nat e1 (@cons nat e2 (@cons nat e3 (@nil nat))))) e, and (le e1 e) (and (le e2 e) (le e3 e)) *)
intros.
(* Goal: and (le e1 e) (and (le e2 e) (le e3 e)) *)
assert (Hl := maxl_le _ _ H).
(* Goal: and (le e1 e) (and (le e2 e) (le e3 e)) *)
repeat split; apply Hl; simpl; auto.
Qed.
Lemma maxl_bound e1 e2 e3 e :
e1 <= e -> e2 <= e -> e3 <= e ->
maxl [e1; e2; e3] <= e.
Proof.
(* Goal: forall (_ : le e1 e) (_ : le e2 e) (_ : le e3 e), le (maxl (@cons nat e1 (@cons nat e2 (@cons nat e3 (@nil nat))))) e *)
intros.
(* Goal: le (maxl (@cons nat e1 (@cons nat e2 (@cons nat e3 (@nil nat))))) e *)
simpl.
(* Goal: le (Init.Nat.max e1 (Init.Nat.max e2 (Init.Nat.max e3 O))) e *)
apply Nat.max_lub; trivial.
(* Goal: le (Init.Nat.max e2 (Init.Nat.max e3 O)) e *)
apply Nat.max_lub; trivial.
(* Goal: le (Init.Nat.max e3 O) e *)
apply Nat.max_lub; trivial.
(* Goal: le O e *)
omega.
Qed.
Lemma maxl_bound_in l e :
(forall e', In e' l -> e' <= e) -> maxl l <= e.
Proof.
(* Goal: forall _ : forall (e' : nat) (_ : @In nat e' l), le e' e, le (maxl l) e *)
induction l; simpl; intros;[ omega | ].
(* Goal: le (Init.Nat.max a (maxl l)) e *)
apply Nat.max_lub.
(* Goal: le (maxl l) e *)
(* Goal: le a e *)
apply H; auto.
(* Goal: le (maxl l) e *)
apply IHl.
(* Goal: forall (e' : nat) (_ : @In nat e' l), le e' e *)
intros; apply H; auto.
Qed.
Lemma maxl_cons l n : n <= maxl (n :: l).
Proof.
(* Goal: le n (maxl (@cons nat n l)) *)
destruct l; simpl; intros.
(* Goal: le n (Init.Nat.max n (Init.Nat.max n0 (maxl l))) *)
(* Goal: le n (Init.Nat.max n O) *)
auto with arith.
(* Goal: le n (Init.Nat.max n (Init.Nat.max n0 (maxl l))) *)
apply Nat.le_max_l.
Qed.
Lemma le_maxl_cons l m n :
n <= maxl l -> n <= maxl (m :: l).
Lemma nth_maxl_bound : forall A (l : list A) (m:A->nat) d i,
m d = 0 -> m (nth i l d) <= maxl (map m l).
Lemma length_hd_app A (l1 l2 : list (list A)) :
length (hd nil l1) <= length (hd nil (l1 ++ l2)).
Proof.
(* Goal: le (@length A (@hd (list A) (@nil A) l1)) (@length A (@hd (list A) (@nil A) (@app (list A) l1 l2))) *)
intros; case l1; simpl; trivial; omega.
Qed.
Lemma length_nth_app A (l1 l2 : list (list A)) i :
length (nth i l1 nil) <= length (nth i (l1 ++ l2) nil).
Proof.
(* Goal: le (@length A (@nth (list A) i l1 (@nil A))) (@length A (@nth (list A) i (@app (list A) l1 l2) (@nil A))) *)
intros; destruct (le_lt_dec (length l1) i).
(* Goal: le (@length A (@nth (list A) i l1 (@nil A))) (@length A (@nth (list A) i (@app (list A) l1 l2) (@nil A))) *)
(* Goal: le (@length A (@nth (list A) i l1 (@nil A))) (@length A (@nth (list A) i (@app (list A) l1 l2) (@nil A))) *)
rewrite nth_overflow; simpl; trivial; omega.
(* Goal: le (@length A (@nth (list A) i l1 (@nil A))) (@length A (@nth (list A) i (@app (list A) l1 l2) (@nil A))) *)
rewrite app_nth1; trivial.
Qed.
Lemma maxl_nth l :
exists i, maxl l = nth i l 0.
Proof.
(* Goal: @ex nat (fun i : nat => @eq nat (maxl l) (@nth nat i l O)) *)
induction l; simpl.
(* Goal: @ex nat (fun i : nat => @eq nat (Init.Nat.max a (maxl l)) match i with | O => a | S m => @nth nat m l O end) *)
(* Goal: @ex nat (fun i : nat => @eq nat O match i with | O => O | S m => O end) *)
exists 0; trivial.
(* Goal: @ex nat (fun i : nat => @eq nat (Init.Nat.max a (maxl l)) match i with | O => a | S m => @nth nat m l O end) *)
destruct IHl.
(* Goal: @ex nat (fun i : nat => @eq nat (Init.Nat.max a (maxl l)) match i with | O => a | S m => @nth nat m l O end) *)
destruct (le_lt_dec a (maxl l)).
(* Goal: @ex nat (fun i : nat => @eq nat (Init.Nat.max a (maxl l)) match i with | O => a | S m => @nth nat m l O end) *)
(* Goal: @ex nat (fun i : nat => @eq nat (Init.Nat.max a (maxl l)) match i with | O => a | S m => @nth nat m l O end) *)
rewrite max_r; trivial.
(* Goal: @ex nat (fun i : nat => @eq nat (Init.Nat.max a (maxl l)) match i with | O => a | S m => @nth nat m l O end) *)
(* Goal: @ex nat (fun i : nat => @eq nat (maxl l) match i with | O => a | S m => @nth nat m l O end) *)
exists (S x); trivial.
(* Goal: @ex nat (fun i : nat => @eq nat (Init.Nat.max a (maxl l)) match i with | O => a | S m => @nth nat m l O end) *)
exists 0; rewrite max_l; trivial.
(* Goal: le (maxl l) a *)
omega.
Qed.
Lemma maxl_map_0 A l (f : A -> nat) :
(forall x, In x l -> (f x) = 0) ->
maxl (map f l) = 0.
Proof.
(* Goal: forall _ : forall (x : A) (_ : @In A x l), @eq nat (f x) O, @eq nat (maxl (@map A nat f l)) O *)
induction l; simpl; intros; trivial.
(* Goal: @eq nat (Init.Nat.max (f a) (maxl (@map A nat f l))) O *)
rewrite H, IHl; simpl; trivial; intros; auto.
Qed.
Lemma maxl_le_plusl : forall l, maxl l <= plusl l.
Proof.
(* Goal: forall l : list nat, le (maxl l) (plusl l) *)
induction l; trivial; simpl.
(* Goal: le (Init.Nat.max a (maxl l)) (Init.Nat.add a (plusl l)) *)
apply Nat.max_lub; omega.
Qed.
Lemma forallb_forall_conv :
forall A f (l:list A), forallb f l = false <-> (exists x, In x l /\ f x = false).
Proof.
(* Goal: forall (A : Type) (f : forall _ : A, bool) (l : list A), iff (@eq bool (@forallb A f l) false) (@ex A (fun x : A => and (@In A x l) (@eq bool (f x) false))) *)
induction l as [ | x l IH]; simpl; split.
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
(* Goal: forall _ : @eq bool (andb (f x) (@forallb A f l)) false, @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
(* Goal: forall _ : @ex A (fun x : A => and False (@eq bool (f x) false)), @eq bool true false *)
(* Goal: forall _ : @eq bool true false, @ex A (fun x : A => and False (@eq bool (f x) false)) *)
congruence.
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
(* Goal: forall _ : @eq bool (andb (f x) (@forallb A f l)) false, @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
(* Goal: forall _ : @ex A (fun x : A => and False (@eq bool (f x) false)), @eq bool true false *)
intros [x H]; tauto.
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
(* Goal: forall _ : @eq bool (andb (f x) (@forallb A f l)) false, @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
intro H.
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
(* Goal: @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
apply andb_false_elim in H.
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
(* Goal: @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
destruct H as [H | H].
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
(* Goal: @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
(* Goal: @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
exists x; tauto.
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
(* Goal: @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
rewrite IH in H.
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
(* Goal: @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)) *)
destruct H as [y H]; exists y; tauto.
(* Goal: forall _ : @ex A (fun x0 : A => and (or (@eq A x x0) (@In A x0 l)) (@eq bool (f x0) false)), @eq bool (andb (f x) (@forallb A f l)) false *)
intros [y H].
(* Goal: @eq bool (andb (f x) (@forallb A f l)) false *)
apply andb_false_iff.
(* Goal: or (@eq bool (f x) false) (@eq bool (@forallb A f l) false) *)
destruct H as [ [H1 | H1] H2]; subst; auto.
(* Goal: or (@eq bool (f x) false) (@eq bool (@forallb A f l) false) *)
right; rewrite IH; exists y; tauto.
Qed.
Lemma forallb_nth : forall A (l : list A) (p : A -> bool) n d,
p d = true ->
forallb p l = true ->
p (nth n l d) = true.
Proof.
(* Goal: forall (A : Type) (l : list A) (p : forall _ : A, bool) (n : nat) (d : A) (_ : @eq bool (p d) true) (_ : @eq bool (@forallb A p l) true), @eq bool (p (@nth A n l d)) true *)
induction l; simpl; intros; case n; trivial; intros; rewrite andb_true_iff in H0; [ | apply IHl ]; tauto.
Qed.
Lemma forallb_hd : forall A (l : list A) (p : A -> bool) d,
forallb p l = true ->
p d = true ->
p (hd d l) = true.
Proof.
(* Goal: forall (A : Type) (l : list A) (p : forall _ : A, bool) (d : A) (_ : @eq bool (@forallb A p l) true) (_ : @eq bool (p d) true), @eq bool (p (@hd A d l)) true *)
destruct l; simpl; intros; trivial.
(* Goal: @eq bool (p a) true *)
rewrite andb_true_iff in H; tauto.
Qed.
Lemma forallb_tl : forall A (l : list A) (p : A -> bool),
forallb p l = true ->
forallb p (tail l) = true.
Proof.
(* Goal: forall (A : Type) (l : list A) (p : forall _ : A, bool) (_ : @eq bool (@forallb A p l) true), @eq bool (@forallb A p (@tl A l)) true *)
induction l; simpl; intros; trivial.
(* Goal: @eq bool (@forallb A p l) true *)
rewrite andb_true_iff in H; tauto.
Qed.
Lemma forallb_map : forall A B (l : list A) (p : B -> bool) (f : A -> B),
(forall x, In x l -> p (f x) = true) ->
forallb p (map f l) = true.
Proof.
(* Goal: forall (A B : Type) (l : list A) (p : forall _ : B, bool) (f : forall _ : A, B) (_ : forall (x : A) (_ : @In A x l), @eq bool (p (f x)) true), @eq bool (@forallb B p (@map A B f l)) true *)
intros; apply forallb_forall.
(* Goal: forall (x : B) (_ : @In B x (@map A B f l)), @eq bool (p x) true *)
intros.
(* Goal: @eq bool (p x) true *)
apply in_map_iff in H0.
(* Goal: @eq bool (p x) true *)
destruct H0 as ( x' & H0 & H1); subst; auto.
Qed.
Fixpoint repeat {A:Type}(n:nat)(x:A) : list A :=
match n with
| 0 => nil
| S n' => x :: repeat n' x
end.
Lemma firstn_repeat_le :
forall A (x:A) m n,
m <= n ->
firstn m (repeat n x) = repeat m x.
Proof.
(* Goal: forall (A : Type) (x : A) (m n : nat) (_ : le m n), @eq (list A) (@firstn A m (@repeat A n x)) (@repeat A m x) *)
intros A x m.
(* Goal: forall (n : nat) (_ : le m n), @eq (list A) (@firstn A m (@repeat A n x)) (@repeat A m x) *)
induction m as [ | m IH]; intros n H.
(* Goal: @eq (list A) (@firstn A (S m) (@repeat A n x)) (@repeat A (S m) x) *)
(* Goal: @eq (list A) (@firstn A O (@repeat A n x)) (@repeat A O x) *)
trivial.
(* Goal: @eq (list A) (@firstn A (S m) (@repeat A n x)) (@repeat A (S m) x) *)
destruct n as [ | n].
(* Goal: @eq (list A) (@firstn A (S m) (@repeat A (S n) x)) (@repeat A (S m) x) *)
(* Goal: @eq (list A) (@firstn A (S m) (@repeat A O x)) (@repeat A (S m) x) *)
contradict H.
(* Goal: @eq (list A) (@firstn A (S m) (@repeat A (S n) x)) (@repeat A (S m) x) *)
(* Goal: not (le (S m) O) *)
omega.
(* Goal: @eq (list A) (@firstn A (S m) (@repeat A (S n) x)) (@repeat A (S m) x) *)
simpl.
(* Goal: @eq (list A) (@cons A x (@firstn A m (@repeat A n x))) (@cons A x (@repeat A m x)) *)
f_equal.
(* Goal: @eq (list A) (@firstn A m (@repeat A n x)) (@repeat A m x) *)
apply IH.
(* Goal: le m n *)
omega.
Qed.
Lemma in_repeat_eq : forall A (x y:A) n, In x (repeat n y) -> x=y.
Proof.
(* Goal: forall (A : Type) (x y : A) (n : nat) (_ : @In A x (@repeat A n y)), @eq A x y *)
induction n as [ | n IH]; simpl; intro H; [ tauto | ].
(* Goal: @eq A x y *)
destruct H as [H | H].
(* Goal: @eq A x y *)
(* Goal: @eq A x y *)
congruence.
(* Goal: @eq A x y *)
tauto.
Qed.
Lemma map_repeat : forall A B (f:A->B) n x, map f (repeat n x) = repeat n (f x).
Proof.
(* Goal: forall (A B : Type) (f : forall _ : A, B) (n : nat) (x : A), @eq (list B) (@map A B f (@repeat A n x)) (@repeat B n (f x)) *)
induction n as [ | n IH].
(* Goal: forall x : A, @eq (list B) (@map A B f (@repeat A (S n) x)) (@repeat B (S n) (f x)) *)
(* Goal: forall x : A, @eq (list B) (@map A B f (@repeat A O x)) (@repeat B O (f x)) *)
trivial.
(* Goal: forall x : A, @eq (list B) (@map A B f (@repeat A (S n) x)) (@repeat B (S n) (f x)) *)
simpl; congruence.
Qed.
Lemma multl_repeat_power : forall n x, multl (repeat n x) = power x n.
Proof.
(* Goal: forall n x : nat, @eq nat (multl (@repeat nat n x)) (power x n) *)
induction n as [ | n IH]; trivial; simpl; congruence.
Qed.
Lemma length_repeat : forall A n (x:A), length (repeat n x) = n.
Proof.
(* Goal: forall (A : Type) (n : nat) (x : A), @eq nat (@length A (@repeat A n x)) n *)
induction n; simpl; intros; trivial; congruence.
Qed.
Lemma nth_repeat :
forall A n (x:A) d i, i < n ->
nth i (repeat n x) d = x.
Proof.
(* Goal: forall (A : Type) (n : nat) (x d : A) (i : nat) (_ : lt i n), @eq A (@nth A i (@repeat A n x) d) x *)
intros A n x d.
(* Goal: forall (i : nat) (_ : lt i n), @eq A (@nth A i (@repeat A n x) d) x *)
induction n as [ | n IH]; simpl ; intros i H.
(* Goal: @eq A match i with | O => x | S m => @nth A m (@repeat A n x) d end x *)
(* Goal: @eq A match i with | O => d | S m => d end x *)
contradict H.
(* Goal: @eq A match i with | O => x | S m => @nth A m (@repeat A n x) d end x *)
(* Goal: not (lt i O) *)
omega.
(* Goal: @eq A match i with | O => x | S m => @nth A m (@repeat A n x) d end x *)
destruct i as [ | i]; auto with arith.
Qed.
Definition move_forward {A}(i j:nat)(l:list A)(d:A) : list A :=
firstn i l ++ firstn j (skipn (S i) l) ++ (nth i l d :: skipn (S (i+j)) l).
Lemma move_forward_map A B d1 d2 i j (f:A->B) l :
f d1 = d2 ->
move_forward i j (map f l) d2 = map f (move_forward i j l d1).
Proof.
(* Goal: forall _ : @eq B (f d1) d2, @eq (list B) (@move_forward B i j (@map A B f l) d2) (@map A B f (@move_forward A i j l d1)) *)
intros; unfold move_forward.
(* Goal: @eq (list B) (@app B (@firstn B i (@map A B f l)) (@app B (@firstn B j (@skipn B (S i) (@map A B f l))) (@cons B (@nth B i (@map A B f l) d2) (@skipn B (S (Init.Nat.add i j)) (@map A B f l))))) (@map A B f (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d1) (@skipn A (S (Init.Nat.add i j)) l))))) *)
rewrite !map_app; f_equal.
(* Goal: @eq (list B) (@app B (@firstn B j (@skipn B (S i) (@map A B f l))) (@cons B (@nth B i (@map A B f l) d2) (@skipn B (S (Init.Nat.add i j)) (@map A B f l)))) (@app B (@map A B f (@firstn A j (@skipn A (S i) l))) (@map A B f (@cons A (@nth A i l d1) (@skipn A (S (Init.Nat.add i j)) l)))) *)
(* Goal: @eq (list B) (@firstn B i (@map A B f l)) (@map A B f (@firstn A i l)) *)
rewrite map_firstn; trivial.
(* Goal: @eq (list B) (@app B (@firstn B j (@skipn B (S i) (@map A B f l))) (@cons B (@nth B i (@map A B f l) d2) (@skipn B (S (Init.Nat.add i j)) (@map A B f l)))) (@app B (@map A B f (@firstn A j (@skipn A (S i) l))) (@map A B f (@cons A (@nth A i l d1) (@skipn A (S (Init.Nat.add i j)) l)))) *)
f_equal.
(* Goal: @eq (list B) (@cons B (@nth B i (@map A B f l) d2) (@skipn B (S (Init.Nat.add i j)) (@map A B f l))) (@map A B f (@cons A (@nth A i l d1) (@skipn A (S (Init.Nat.add i j)) l))) *)
(* Goal: @eq (list B) (@firstn B j (@skipn B (S i) (@map A B f l))) (@map A B f (@firstn A j (@skipn A (S i) l))) *)
rewrite map_firstn, map_skipn; trivial.
(* Goal: @eq (list B) (@cons B (@nth B i (@map A B f l) d2) (@skipn B (S (Init.Nat.add i j)) (@map A B f l))) (@map A B f (@cons A (@nth A i l d1) (@skipn A (S (Init.Nat.add i j)) l))) *)
rewrite map_nth2 with (d:=d1); trivial.
(* Goal: @eq (list B) (@cons B (f (@nth A i l d1)) (@skipn B (S (Init.Nat.add i j)) (@map A B f l))) (@map A B f (@cons A (@nth A i l d1) (@skipn A (S (Init.Nat.add i j)) l))) *)
rewrite <- map_skipn; trivial.
Qed.
Lemma length_move_forward :
forall A i j (l:list A) d, i+j < length l -> length (move_forward i j l d) = length l.
Proof.
(* Goal: forall (A : Type) (i j : nat) (l : list A) (d : A) (_ : lt (Init.Nat.add i j) (@length A l)), @eq nat (@length A (@move_forward A i j l d)) (@length A l) *)
unfold move_forward.
(* Goal: forall (A : Type) (i j : nat) (l : list A) (d : A) (_ : lt (Init.Nat.add i j) (@length A l)), @eq nat (@length A (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@length A l) *)
intros.
(* Goal: @eq nat (@length A (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@length A l) *)
do 2 rewrite app_length.
(* Goal: @eq nat (Init.Nat.add (@length A (@firstn A i l)) (Init.Nat.add (@length A (@firstn A j (@skipn A (S i) l))) (@length A (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@length A l) *)
do 2 rewrite firstn_length.
(* Goal: @eq nat (Init.Nat.add (Init.Nat.min i (@length A l)) (Init.Nat.add (Init.Nat.min j (@length A (@skipn A (S i) l))) (@length A (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@length A l) *)
rewrite min_l.
(* Goal: le i (@length A l) *)
(* Goal: @eq nat (Init.Nat.add i (Init.Nat.add (Init.Nat.min j (@length A (@skipn A (S i) l))) (@length A (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@length A l) *)
rewrite min_l.
(* Goal: le i (@length A l) *)
(* Goal: le j (@length A (@skipn A (S i) l)) *)
(* Goal: @eq nat (Init.Nat.add i (Init.Nat.add j (@length A (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@length A l) *)
change (length (nth i l d :: skipn (S (i + j)) l)) with (1 + length (skipn (S (i + j)) l)).
(* Goal: le i (@length A l) *)
(* Goal: le j (@length A (@skipn A (S i) l)) *)
(* Goal: @eq nat (Init.Nat.add i (Init.Nat.add j (Init.Nat.add (S O) (@length A (@skipn A (S (Init.Nat.add i j)) l))))) (@length A l) *)
rewrite length_skipn.
(* Goal: le i (@length A l) *)
(* Goal: le j (@length A (@skipn A (S i) l)) *)
(* Goal: @eq nat (Init.Nat.add i (Init.Nat.add j (Init.Nat.add (S O) (Init.Nat.sub (@length A l) (S (Init.Nat.add i j)))))) (@length A l) *)
omega.
(* Goal: le i (@length A l) *)
(* Goal: le j (@length A (@skipn A (S i) l)) *)
rewrite length_skipn.
(* Goal: le i (@length A l) *)
(* Goal: le j (Init.Nat.sub (@length A l) (S i)) *)
omega.
(* Goal: le i (@length A l) *)
omega.
Qed.
Lemma in_move_forward_iff :
forall A x i j d (l:list A), i < length l -> (In x (move_forward i j l d) <-> In x l).
Proof.
(* Goal: forall (A : Type) (x : A) (i j : nat) (d : A) (l : list A) (_ : lt i (@length A l)), iff (@In A x (@move_forward A i j l d)) (@In A x l) *)
unfold move_forward.
(* Goal: forall (A : Type) (x : A) (i j : nat) (d : A) (l : list A) (_ : lt i (@length A l)), iff (@In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
intros A x i j d l Hi.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
transitivity (In x (firstn i l ++ nth i l d :: firstn j (skipn (S i) l) ++ skipn (S (i + j)) l)).
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: iff (@In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) *)
split.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: forall _ : @In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))), @In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l)))) *)
(* Goal: forall _ : @In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l)))), @In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))) *)
apply Permutation_in.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: forall _ : @In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))), @In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l)))) *)
(* Goal: @Permutation A (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l)))) (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))) *)
apply Permutation_app_head.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: forall _ : @In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))), @In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l)))) *)
(* Goal: @Permutation A (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))) *)
apply Permutation_sym.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: forall _ : @In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))), @In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l)))) *)
(* Goal: @Permutation A (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))) *)
apply Permutation_middle.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: forall _ : @In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))), @In A x (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l)))) *)
apply Permutation_in.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @Permutation A (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))) (@app A (@firstn A i l) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l)))) *)
apply Permutation_app_head.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @Permutation A (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))) (@app A (@firstn A j (@skipn A (S i) l)) (@cons A (@nth A i l d) (@skipn A (S (Init.Nat.add i j)) l))) *)
apply Permutation_middle.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
assert (l = firstn i l ++ nth i l d :: firstn j (skipn (S i) l) ++ skipn (S (i + j)) l) as H.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) l (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))) *)
rewrite <- (firstn_skipn i l) at 1.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@app A (@firstn A i l) (@skipn A i l)) (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)))) *)
f_equal.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@skipn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))) *)
transitivity (nth i l d :: skipn (S i) l).
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@cons A (@nth A i l d) (@skipn A (S i) l)) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))) *)
(* Goal: @eq (list A) (@skipn A i l) (@cons A (@nth A i l d) (@skipn A (S i) l)) *)
symmetry.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@cons A (@nth A i l d) (@skipn A (S i) l)) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))) *)
(* Goal: @eq (list A) (@cons A (@nth A i l d) (@skipn A (S i) l)) (@skipn A i l) *)
apply cons_skipn.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@cons A (@nth A i l d) (@skipn A (S i) l)) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))) *)
(* Goal: lt i (@length A l) *)
trivial.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@cons A (@nth A i l d) (@skipn A (S i) l)) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))) *)
f_equal.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@skipn A (S i) l) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)) *)
transitivity (firstn j (skipn (S i) l) ++ skipn j (skipn (S i) l)).
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A j (@skipn A (S i) l))) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)) *)
(* Goal: @eq (list A) (@skipn A (S i) l) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A j (@skipn A (S i) l))) *)
rewrite firstn_skipn.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A j (@skipn A (S i) l))) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)) *)
(* Goal: @eq (list A) (@skipn A (S i) l) (@skipn A (S i) l) *)
trivial.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A j (@skipn A (S i) l))) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l)) *)
f_equal.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@skipn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l) *)
rewrite <- skipn_plus.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq (list A) (@skipn A (Init.Nat.add j (S i)) l) (@skipn A (S (Init.Nat.add i j)) l) *)
f_equal.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
(* Goal: @eq nat (Init.Nat.add j (S i)) (S (Init.Nat.add i j)) *)
ring.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x l) *)
rewrite H at 5.
(* Goal: iff (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) (@In A x (@app A (@firstn A i l) (@cons A (@nth A i l d) (@app A (@firstn A j (@skipn A (S i) l)) (@skipn A (S (Init.Nat.add i j)) l))))) *)
tauto.
Qed.
Lemma firstn_simpl : forall A B (l : list A) (l2 : list B),
length l2 = length l ->
firstn (length l2) l = l.
Proof.
(* Goal: forall (A B : Type) (l : list A) (l2 : list B) (_ : @eq nat (@length B l2) (@length A l)), @eq (list A) (@firstn A (@length B l2) l) l *)
intros.
(* Goal: @eq (list A) (@firstn A (@length B l2) l) l *)
rewrite H.
(* Goal: @eq (list A) (@firstn A (@length A l) l) l *)
rewrite <- app_nil_r with (l := l) at 2 .
(* Goal: @eq (list A) (@firstn A (@length A l) (@app A l (@nil A))) l *)
rewrite firstn_app.
(* Goal: @eq (list A) l l *)
trivial.
Qed.
Lemma firstn_app2 : forall (A : Type) (l l' : list A) n,
length l = n -> firstn n (l ++ l') = l .
Proof.
(* Goal: forall (A : Type) (l l' : list A) (n : nat) (_ : @eq nat (@length A l) n), @eq (list A) (@firstn A n (@app A l l')) l *)
intros; subst; apply firstn_app.
Qed.
Lemma firstn_firstn : forall A n (l : list A),
firstn n (firstn n l) = firstn n l.
Proof.
(* Goal: forall (A : Type) (n : nat) (l : list A), @eq (list A) (@firstn A n (@firstn A n l)) (@firstn A n l) *)
induction n; simpl; auto.
(* Goal: forall l : list A, @eq (list A) match match l with | nil => @nil A | cons a l0 => @cons A a (@firstn A n l0) end with | nil => @nil A | cons a l0 => @cons A a (@firstn A n l0) end match l with | nil => @nil A | cons a l0 => @cons A a (@firstn A n l0) end *)
intros [ | a l]; try rewrite IHn; auto.
Qed.
Lemma In_firstn : forall A n a (l : list A),
In a (firstn n l) -> In a l.
Proof.
(* Goal: forall (A : Type) (n : nat) (a : A) (l : list A) (_ : @In A a (@firstn A n l)), @In A a l *)
intros A; induction n; simpl; intros.
(* Goal: @In A a l *)
(* Goal: @In A a l *)
elim H.
(* Goal: @In A a l *)
destruct l; simpl in *.
(* Goal: or (@eq A a0 a) (@In A a l) *)
(* Goal: False *)
elim H.
(* Goal: or (@eq A a0 a) (@In A a l) *)
destruct H; subst; auto.
Qed.
|
Set Implicit Arguments.
Require Export List.
Section Wrap.
Variable A : Set.
Variable leA : A -> A -> Prop.
Variable leA_dec : forall a a', {leA a a'} + {~ leA a a'}.
Inductive greater : A -> list A -> Prop :=
| Gr0 : forall a a' w, leA a' a -> greater a (a'::w)
| Gr1 : forall a a' w, greater a w -> greater a (a'::w).
Inductive good : list A -> Prop :=
| Gd0 : forall a w, greater a w -> good (a::w)
| Gd1 : forall a w, good w -> good (a::w).
Definition bad (l : list A) : Prop := ~ good l.
Lemma greater_dec : forall a l, {greater a l} + {~ greater a l}.
Proof.
(* Goal: forall (a : A) (l : list A), sumbool (greater a l) (not (greater a l)) *)
intros a l; induction l as [|a' l IHl].
(* Goal: sumbool (greater a (@cons A a' l)) (not (greater a (@cons A a' l))) *)
(* Goal: sumbool (greater a (@nil A)) (not (greater a (@nil A))) *)
right; intro HF; inversion HF.
(* Goal: sumbool (greater a (@cons A a' l)) (not (greater a (@cons A a' l))) *)
elim (leA_dec a' a); intro case_a_a'.
(* Goal: sumbool (greater a (@cons A a' l)) (not (greater a (@cons A a' l))) *)
(* Goal: sumbool (greater a (@cons A a' l)) (not (greater a (@cons A a' l))) *)
left; constructor 1; trivial.
(* Goal: sumbool (greater a (@cons A a' l)) (not (greater a (@cons A a' l))) *)
elim IHl; intro case_l.
(* Goal: sumbool (greater a (@cons A a' l)) (not (greater a (@cons A a' l))) *)
(* Goal: sumbool (greater a (@cons A a' l)) (not (greater a (@cons A a' l))) *)
left; constructor 2; trivial.
(* Goal: sumbool (greater a (@cons A a' l)) (not (greater a (@cons A a' l))) *)
right; intro HF; inversion HF; subst.
(* Goal: False *)
(* Goal: False *)
apply case_a_a'; trivial.
(* Goal: False *)
apply case_l; trivial.
Qed.
Lemma good_dec : forall l, {good l} + {bad l}.
Proof.
(* Goal: forall l : list A, sumbool (good l) (bad l) *)
intro l; induction l as [|a l IHl].
(* Goal: sumbool (good (@cons A a l)) (bad (@cons A a l)) *)
(* Goal: sumbool (good (@nil A)) (bad (@nil A)) *)
right; intro HF; inversion HF.
(* Goal: sumbool (good (@cons A a l)) (bad (@cons A a l)) *)
elim IHl; intro case_l.
(* Goal: sumbool (good (@cons A a l)) (bad (@cons A a l)) *)
(* Goal: sumbool (good (@cons A a l)) (bad (@cons A a l)) *)
left; constructor 2; trivial.
(* Goal: sumbool (good (@cons A a l)) (bad (@cons A a l)) *)
elim (greater_dec a l); intro case_a_l.
(* Goal: sumbool (good (@cons A a l)) (bad (@cons A a l)) *)
(* Goal: sumbool (good (@cons A a l)) (bad (@cons A a l)) *)
left; constructor 1; trivial.
(* Goal: sumbool (good (@cons A a l)) (bad (@cons A a l)) *)
right; intro HF; inversion HF; subst.
(* Goal: False *)
(* Goal: False *)
apply case_a_l; trivial.
(* Goal: False *)
apply case_l; trivial.
Qed.
Fixpoint bad_subsequence (l : list A) : list A :=
match l with
| nil => nil
| a :: l' => let bl := bad_subsequence l' in
match (greater_dec a bl) with
| left _ => bl
| right _ => a :: bl
end
end.
Lemma bad_subsequence_is_bad : forall l, bad (bad_subsequence l).
Proof.
(* Goal: forall l : list A, bad (bad_subsequence l) *)
intro l; induction l as [|a l IHl].
(* Goal: bad (bad_subsequence (@cons A a l)) *)
(* Goal: bad (bad_subsequence (@nil A)) *)
simpl; intro HF; inversion HF.
(* Goal: bad (bad_subsequence (@cons A a l)) *)
simpl; elim (greater_dec a (bad_subsequence l)); intro case_a_bl.
(* Goal: bad (@cons A a (bad_subsequence l)) *)
(* Goal: bad (bad_subsequence l) *)
assumption.
(* Goal: bad (@cons A a (bad_subsequence l)) *)
intro HF; inversion HF; subst.
(* Goal: False *)
(* Goal: False *)
apply case_a_bl; trivial.
(* Goal: False *)
apply IHl; trivial.
Qed.
Inductive continues : list A -> list A -> Prop :=
| Ct0 : forall a l, ~ greater a l -> continues (a::l) l.
Definition wqo_acc : Prop := forall l, bad l -> Acc continues l.
End Wrap.
|
Require Export GeoCoq.Tarski_dev.Ch05_bet_le.
Ltac eCol := eauto with col.
Section T6_1.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma bet_out : forall A B C, B <> A -> Bet A B C -> Out A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) B A)) (_ : @Bet Tn A B C), @Out Tn A B C *)
intros.
(* Goal: @Out Tn A B C *)
unfold Out.
(* 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: not (@eq (@Tpoint Tn) C A) *)
intro; treat_equalities; auto.
Qed.
Lemma out_dec : forall P A B, Out P A B \/ ~ Out P A B.
Proof.
(* Goal: forall P A B : @Tpoint Tn, or (@Out Tn P A B) (not (@Out Tn P A B)) *)
intros.
(* Goal: or (@Out Tn P A B) (not (@Out Tn P A B)) *)
unfold Out.
(* Goal: or (and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A)))) (not (and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))))) *)
elim (bet_dec P A B);intro; elim (bet_dec P B A);intro; elim (eq_dec_points A P);intro; elim (eq_dec_points B P);intro; tauto.
Qed.
Lemma out_diff1 : forall A B C, Out A B C -> B <> A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Out Tn A B C), not (@eq (@Tpoint Tn) B A) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) B A) *)
unfold Out in H.
(* Goal: not (@eq (@Tpoint Tn) B A) *)
spliter.
(* Goal: not (@eq (@Tpoint Tn) B A) *)
assumption.
Qed.
Lemma out_diff2 : forall A B C, Out A B C -> C <> A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Out Tn A B C), not (@eq (@Tpoint Tn) C A) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C A) *)
unfold Out in H.
(* Goal: not (@eq (@Tpoint Tn) C A) *)
spliter.
(* Goal: not (@eq (@Tpoint Tn) C A) *)
assumption.
Qed.
Lemma out_distinct : forall A B C, Out A B C -> B <> A /\ C <> A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Out Tn A B C), and (not (@eq (@Tpoint Tn) B A)) (not (@eq (@Tpoint Tn) C A)) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) B A)) (not (@eq (@Tpoint Tn) C A)) *)
split.
(* Goal: not (@eq (@Tpoint Tn) C A) *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
eapply out_diff1;eauto.
(* Goal: not (@eq (@Tpoint Tn) C A) *)
eapply out_diff2;eauto.
Qed.
Lemma out_col : forall A B C, Out A B C -> Col A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Out Tn A B C), @Col Tn A B C *)
intros.
(* 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)) *)
unfold Out in H.
(* Goal: or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B)) *)
spliter.
(* Goal: or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B)) *)
induction H1;Between.
Qed.
Lemma l6_2 : forall A B C P, A<>P -> B<>P -> C<>P -> Bet A P C -> (Bet B P C <-> Out P A B).
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A P)) (_ : not (@eq (@Tpoint Tn) B P)) (_ : not (@eq (@Tpoint Tn) C P)) (_ : @Bet Tn A P C), iff (@Bet Tn B P C) (@Out Tn P A B) *)
intros.
(* Goal: iff (@Bet Tn B P C) (@Out Tn P A B) *)
unfold Out.
(* Goal: iff (@Bet Tn B P C) (and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A)))) *)
split.
(* Goal: forall _ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))), @Bet Tn B P C *)
(* Goal: forall _ : @Bet Tn B P C, and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
intros.
(* Goal: forall _ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))), @Bet Tn B P C *)
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
repeat split; try assumption; eapply l5_2;eBetween.
(* Goal: forall _ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))), @Bet Tn B P C *)
intro; spliter; induction H5; eBetween.
Qed.
Lemma bet_out__bet : forall A B C P, Bet A P C -> Out P A B -> Bet B P C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : @Bet Tn A P C) (_ : @Out Tn P A B), @Bet Tn B P C *)
intros A B C P HBet HOut.
(* Goal: @Bet Tn B P C *)
destruct (eq_dec_points C P).
(* Goal: @Bet Tn B P C *)
(* Goal: @Bet Tn B P C *)
subst; Between.
(* Goal: @Bet Tn B P C *)
apply (l6_2 A); trivial; destruct HOut as [HPA [HPB]]; auto.
Qed.
Lemma l6_3_1 : forall A B P, Out P A B -> (A<>P /\ B<>P /\ exists C, C<>P /\ Bet A P C /\ Bet B P C).
Proof.
(* Goal: forall (A B P : @Tpoint Tn) (_ : @Out Tn P A B), and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (@ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))))) *)
unfold Out.
(* Goal: forall (A B P : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A)))), and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (@ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))))) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (@ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (@ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))))) *)
repeat split; try assumption.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
induction H1.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
assert(exists C, Bet A P C /\ P <> C) by (apply point_construction_different).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
ex_and H2 C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
exists C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
(* Goal: and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C)) *)
repeat split; eBetween.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
assert(exists C, Bet B P C /\ P <> C) by (apply point_construction_different).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
ex_and H2 C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C))) *)
exists C.
(* Goal: and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C)) *)
repeat split;eBetween.
Qed.
Lemma l6_3_2 : forall A B P,
(A<>P /\ B<>P /\ exists C, C<>P /\ Bet A P C /\ Bet B P C) -> Out P A B.
Proof.
(* Goal: forall (A B P : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (@ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) C P)) (and (@Bet Tn A P C) (@Bet Tn B P C)))))), @Out Tn P A B *)
intros.
(* Goal: @Out Tn P A B *)
spliter.
(* Goal: @Out Tn P A B *)
ex_and H1 C.
(* Goal: @Out Tn P A B *)
unfold Out.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
repeat split; try assumption; eapply l5_2; eBetween.
Qed.
Lemma l6_4_1 : forall A B P, Out P A B -> Col A P B /\ ~ Bet A P B.
Proof.
(* Goal: forall (A B P : @Tpoint Tn) (_ : @Out Tn P A B), and (@Col Tn A P B) (not (@Bet Tn A P B)) *)
unfold Out.
(* Goal: forall (A B P : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A)))), and (@Col Tn A P B) (not (@Bet Tn A P B)) *)
intros.
(* Goal: and (@Col Tn A P B) (not (@Bet Tn A P B)) *)
spliter.
(* Goal: and (@Col Tn A P B) (not (@Bet Tn A P B)) *)
unfold Col.
(* Goal: and (or (@Bet Tn A P B) (or (@Bet Tn P B A) (@Bet Tn B A P))) (not (@Bet Tn A P B)) *)
induction H1; split.
(* Goal: not (@Bet Tn A P B) *)
(* Goal: or (@Bet Tn A P B) (or (@Bet Tn P B A) (@Bet Tn B A P)) *)
(* Goal: not (@Bet Tn A P B) *)
(* Goal: or (@Bet Tn A P B) (or (@Bet Tn P B A) (@Bet Tn B A P)) *)
Between.
(* Goal: not (@Bet Tn A P B) *)
(* Goal: or (@Bet Tn A P B) (or (@Bet Tn P B A) (@Bet Tn B A P)) *)
(* Goal: not (@Bet Tn A P B) *)
intro; apply H; eapply between_equality;eauto.
(* Goal: not (@Bet Tn A P B) *)
(* Goal: or (@Bet Tn A P B) (or (@Bet Tn P B A) (@Bet Tn B A P)) *)
right; left; assumption.
(* Goal: not (@Bet Tn A P B) *)
intro; apply H0; eapply between_equality; eBetween.
Qed.
Lemma l6_4_2 : forall A B P, Col A P B /\ ~ Bet A P B -> Out P A B.
Proof.
(* Goal: forall (A B P : @Tpoint Tn) (_ : and (@Col Tn A P B) (not (@Bet Tn A P B))), @Out Tn P A B *)
unfold Col.
(* Goal: forall (A B P : @Tpoint Tn) (_ : and (or (@Bet Tn A P B) (or (@Bet Tn P B A) (@Bet Tn B A P))) (not (@Bet Tn A P B))), @Out Tn P A B *)
intros.
(* Goal: @Out Tn P A B *)
spliter.
(* Goal: @Out Tn P A B *)
unfold Out.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
induction H.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
contradiction.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
induction (eq_dec_points A P).
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
subst P; intuition.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
induction (eq_dec_points B P).
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
subst P; intuition.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A))) *)
induction H; repeat split; Between.
Qed.
Lemma out_trivial : forall P A, A<>P -> Out P A A.
Proof.
(* Goal: forall (P A : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A P)), @Out Tn P A A *)
intros.
(* Goal: @Out Tn P A A *)
unfold Out.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) A P)) (or (@Bet Tn P A A) (@Bet Tn P A A))) *)
repeat split; Between.
Qed.
Lemma l6_6 : forall P A B, Out P A B -> Out P B A.
Proof.
(* Goal: forall (P A B : @Tpoint Tn) (_ : @Out Tn P A B), @Out Tn P B A *)
unfold Out.
(* Goal: forall (P A B : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A)))), and (not (@eq (@Tpoint Tn) B P)) (and (not (@eq (@Tpoint Tn) A P)) (or (@Bet Tn P B A) (@Bet Tn P A B))) *)
intuition.
Qed.
Lemma l6_7 : forall P A B C, Out P A B -> Out P B C -> Out P A C.
Proof.
(* Goal: forall (P A B C : @Tpoint Tn) (_ : @Out Tn P A B) (_ : @Out Tn P B C), @Out Tn P A C *)
unfold Out.
(* Goal: forall (P A B C : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A)))) (_ : and (not (@eq (@Tpoint Tn) B P)) (and (not (@eq (@Tpoint Tn) C P)) (or (@Bet Tn P B C) (@Bet Tn P C B)))), and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) C P)) (or (@Bet Tn P A C) (@Bet Tn P C A))) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) C P)) (or (@Bet Tn P A C) (@Bet Tn P C A))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) C P)) (or (@Bet Tn P A C) (@Bet Tn P C A))) *)
repeat split; try assumption.
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
induction H4; induction H2.
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
left; eapply between_exchange4; eauto.
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
eapply l5_3; eauto.
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
eapply (l5_1 P B); auto.
(* Goal: or (@Bet Tn P A C) (@Bet Tn P C A) *)
right; eBetween.
Qed.
Lemma bet_out_out_bet : forall A B C A' C',
Bet A B C -> Out B A A' -> Out B C C' -> Bet A' B C'.
Proof.
(* Goal: forall (A B C A' C' : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Out Tn B A A') (_ : @Out Tn B C C'), @Bet Tn A' B C' *)
intros.
(* Goal: @Bet Tn A' B C' *)
unfold Out in *.
(* Goal: @Bet Tn A' B C' *)
spliter.
(* Goal: @Bet Tn A' B C' *)
induction H5; induction H3.
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
assert(Bet A' B C) by (apply outer_transitivity_between2 with A; Between).
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
apply outer_transitivity_between with C; auto.
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
assert(Bet A' B C) by (apply outer_transitivity_between2 with A; Between).
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
apply between_inner_transitivity with C; assumption.
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
assert(Bet A' B C) by (apply between_exchange3 with A; Between).
(* Goal: @Bet Tn A' B C' *)
(* Goal: @Bet Tn A' B C' *)
apply outer_transitivity_between with C; auto.
(* Goal: @Bet Tn A' B C' *)
assert(Bet A' B C) by (apply between_exchange3 with A; Between).
(* Goal: @Bet Tn A' B C' *)
eapply between_inner_transitivity with C; assumption.
Qed.
Lemma out2_bet_out : forall A B C X P,
Out B A C -> Out B X P -> Bet A X C -> Out B A P /\ Out B C P.
Proof.
(* Goal: forall (A B C X P : @Tpoint Tn) (_ : @Out Tn B A C) (_ : @Out Tn B X P) (_ : @Bet Tn A X C), and (@Out Tn B A P) (@Out Tn B C P) *)
intros.
(* Goal: and (@Out Tn B A P) (@Out Tn B C P) *)
unfold Out in *.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
spliter.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
induction H5; induction H3.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
repeat split; try assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
(* Goal: or (@Bet Tn B A P) (@Bet Tn B P A) *)
left; eapply between_exchange4 with X; try assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
(* Goal: @Bet Tn B A X *)
apply between_inner_transitivity with C; assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
apply l5_1 with X; try auto.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: @Bet Tn B X C *)
apply between_exchange2 with A; assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
repeat split; try assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
(* Goal: or (@Bet Tn B A P) (@Bet Tn B P A) *)
apply l5_3 with X; try assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
(* Goal: @Bet Tn B A X *)
apply between_inner_transitivity with C; assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
right; apply between_exchange4 with X; try assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: @Bet Tn B X C *)
apply between_exchange2 with A; assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
repeat split; try assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
(* Goal: or (@Bet Tn B A P) (@Bet Tn B P A) *)
apply l5_1 with X; try auto.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
(* Goal: @Bet Tn B X A *)
apply between_exchange2 with C; Between.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
left; apply between_exchange4 with X; try assumption.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
(* Goal: @Bet Tn B C X *)
apply between_inner_transitivity with A; Between.
(* Goal: and (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B A P) (@Bet Tn B P A)))) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (or (@Bet Tn B C P) (@Bet Tn B P C)))) *)
repeat split; try assumption.
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
(* Goal: or (@Bet Tn B A P) (@Bet Tn B P A) *)
right; apply between_exchange4 with X; try assumption.
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
(* Goal: @Bet Tn B X A *)
apply between_exchange2 with C; Between.
(* Goal: or (@Bet Tn B C P) (@Bet Tn B P C) *)
apply l5_3 with X; try assumption.
(* Goal: @Bet Tn B C X *)
apply between_inner_transitivity with A; Between.
Qed.
Lemma l6_11_uniqueness : forall A B C R X Y,
R<>A -> B<>C ->
Out A X R -> Cong A X B C ->
Out A Y R -> Cong A Y B C ->
X=Y.
Proof.
(* Goal: forall (A B C R X Y : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) R A)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Out Tn A X R) (_ : @Cong Tn A X B C) (_ : @Out Tn A Y R) (_ : @Cong Tn A Y B C), @eq (@Tpoint Tn) X Y *)
unfold Out.
(* Goal: forall (A B C R X Y : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) R A)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : and (not (@eq (@Tpoint Tn) X A)) (and (not (@eq (@Tpoint Tn) R A)) (or (@Bet Tn A X R) (@Bet Tn A R X)))) (_ : @Cong Tn A X B C) (_ : and (not (@eq (@Tpoint Tn) Y A)) (and (not (@eq (@Tpoint Tn) R A)) (or (@Bet Tn A Y R) (@Bet Tn A R Y)))) (_ : @Cong Tn A Y B C), @eq (@Tpoint Tn) X Y *)
intros.
(* Goal: @eq (@Tpoint Tn) X Y *)
spliter.
(* Goal: @eq (@Tpoint Tn) X Y *)
assert (Cong A X A Y) by eCong.
(* Goal: @eq (@Tpoint Tn) X Y *)
induction H8; induction H6.
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
apply l4_19 with A R; try assumption.
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @Cong Tn R X R Y *)
apply l4_3 with A A; Between; Cong.
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
assert (Bet A X Y) by eBetween.
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
eapply between_cong; eauto.
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
assert (Bet A Y X) by eBetween.
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
apply sym_equal; apply between_cong with A; Cong.
(* Goal: @eq (@Tpoint Tn) X Y *)
assert (Bet A X Y \/ Bet A Y X) by (eapply l5_1; eauto).
(* Goal: @eq (@Tpoint Tn) X Y *)
induction H10.
(* Goal: @eq (@Tpoint Tn) X Y *)
(* Goal: @eq (@Tpoint Tn) X Y *)
apply between_cong with A; assumption.
(* Goal: @eq (@Tpoint Tn) X Y *)
apply sym_equal; apply between_cong with A; Cong.
Qed.
Lemma l6_11_existence : forall A B C R,
R<>A -> B<>C -> exists X, Out A X R /\ Cong A X B C.
Proof.
(* Goal: forall (A B C R : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) R A)) (_ : not (@eq (@Tpoint Tn) B C)), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Out Tn A X R) (@Cong Tn A X B C)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Out Tn A X R) (@Cong Tn A X B C)) *)
assert (exists X : Tpoint, (Bet A R X \/ Bet A X R) /\ Cong A X B C) by (apply (segment_construction_2);assumption).
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Out Tn A X R) (@Cong Tn A X B C)) *)
ex_and H1 X.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Out Tn A X R) (@Cong Tn A X B C)) *)
exists X.
(* Goal: and (@Out Tn A X R) (@Cong Tn A X B C) *)
unfold Out;repeat split; try intro;treat_equalities;intuition.
Qed.
Lemma segment_construction_3 : forall A B X Y, A <> B -> X <> Y -> exists C, Out A B C /\ Cong A C X Y.
Proof.
(* Goal: forall (A B X Y : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) X Y)), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Out Tn A B C) (@Cong Tn A C X Y)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Out Tn A B C) (@Cong Tn A C X Y)) *)
destruct (l6_11_existence A X Y B) as [C [HC1 HC2]]; auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Out Tn A B C) (@Cong Tn A C X Y)) *)
apply l6_6 in HC1.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Out Tn A B C) (@Cong Tn A C X Y)) *)
exists C; auto.
Qed.
Lemma l6_13_1 : forall P A B, Out P A B -> Le
P A P B -> Bet P A B.
Proof.
(* Goal: forall (P A B : @Tpoint Tn) (_ : @Out Tn P A B) (_ : @Le Tn P A P B), @Bet Tn P A B *)
unfold Out.
(* Goal: forall (P A B : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A P)) (and (not (@eq (@Tpoint Tn) B P)) (or (@Bet Tn P A B) (@Bet Tn P B A)))) (_ : @Le Tn P A P B), @Bet Tn P A B *)
intros.
(* Goal: @Bet Tn P A B *)
spliter.
(* Goal: @Bet Tn P A B *)
induction H2; try assumption.
(* Goal: @Bet Tn P A B *)
unfold Le in H0.
(* Goal: @Bet Tn P A B *)
ex_and H0 Y.
(* Goal: @Bet Tn P A B *)
assert(Y = A).
(* Goal: @Bet Tn P A B *)
(* Goal: @eq (@Tpoint Tn) Y A *)
apply (l6_11_uniqueness P P A B); Between; Cong.
(* Goal: @Bet Tn P A B *)
(* Goal: @Out Tn P A B *)
(* Goal: @Out Tn P Y B *)
unfold Out; repeat split; auto.
(* Goal: @Bet Tn P A B *)
(* Goal: @Out Tn P A B *)
(* Goal: not (@eq (@Tpoint Tn) Y P) *)
intro; treat_equalities; auto.
(* Goal: @Bet Tn P A B *)
(* Goal: @Out Tn P A B *)
unfold Out; repeat split; auto.
(* Goal: @Bet Tn P A B *)
subst Y; assumption.
Qed.
Lemma l6_13_2 : forall P A B, Out P A B -> Bet P A B -> Le
P A P B.
Proof.
(* Goal: forall (P A B : @Tpoint Tn) (_ : @Out Tn P A B) (_ : @Bet Tn P A B), @Le Tn P A P B *)
intros.
(* Goal: @Le Tn P A P B *)
unfold Le.
(* Goal: @ex (@Tpoint Tn) (fun E : @Tpoint Tn => and (@Bet Tn P E B) (@Cong Tn P A P E)) *)
exists A.
(* Goal: and (@Bet Tn P A B) (@Cong Tn P A P A) *)
split; Cong.
Qed.
Lemma l6_16_1 : forall P Q S X, P<>Q -> Col S P Q -> Col X P Q -> Col X P S.
Proof.
(* Goal: forall (P Q S X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) P Q)) (_ : @Col Tn S P Q) (_ : @Col Tn X P Q), @Col Tn X P S *)
intros.
(* Goal: @Col Tn X P S *)
destruct (eq_dec_points S P).
(* Goal: @Col Tn X P S *)
(* Goal: @Col Tn X P S *)
subst; Col.
(* Goal: @Col Tn X P S *)
assert((Bet P S X \/ Bet P X S) -> (Bet P S X \/ Bet S X P)) by (intro; induction H3; Between).
(* Goal: @Col Tn X P S *)
unfold Col.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
induction H0;induction H1.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
right; apply H3; eapply (l5_2 Q P); Between.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
induction H1; left; eBetween.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
induction H0; left; eBetween.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
induction H0; induction H1.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
right; apply H3; eapply l5_1; eauto.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
right; right; eBetween.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
right; left; eBetween.
(* Goal: or (@Bet Tn X P S) (or (@Bet Tn P S X) (@Bet Tn S X P)) *)
right; apply H3; eapply l5_3; eBetween.
Qed.
Lemma col_transitivity_1 : forall P Q A B,
P<>Q -> Col P Q A -> Col P Q B -> Col P A B.
Proof.
(* Goal: forall (P Q A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) P Q)) (_ : @Col Tn P Q A) (_ : @Col Tn P Q B), @Col Tn P A B *)
intros.
(* Goal: @Col Tn P A B *)
induction (eq_dec_points A P).
(* Goal: @Col Tn P A B *)
(* Goal: @Col Tn P A B *)
subst; unfold Col; Between.
(* Goal: @Col Tn P A B *)
assert (T:=l6_16_1 P Q A B).
(* Goal: @Col Tn P A B *)
apply col_permutation_1; apply T; Col.
Qed.
Lemma col_transitivity_2 : forall P Q A B,
P<>Q -> Col P Q A -> Col P Q B -> Col Q A B.
Proof.
(* Goal: forall (P Q A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) P Q)) (_ : @Col Tn P Q A) (_ : @Col Tn P Q B), @Col Tn Q A B *)
intros.
(* Goal: @Col Tn Q A B *)
apply (col_transitivity_1 Q P A B);Col.
Qed.
Lemma l6_21 : forall A B C D P Q,
~ Col A B C -> C<>D -> Col A B P -> Col A B Q -> Col C D P -> Col C D Q -> P=Q.
Proof.
(* Goal: forall (A B C D P Q : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : not (@eq (@Tpoint Tn) C D)) (_ : @Col Tn A B P) (_ : @Col Tn A B Q) (_ : @Col Tn C D P) (_ : @Col Tn C D Q), @eq (@Tpoint Tn) P Q *)
intros.
(* Goal: @eq (@Tpoint Tn) P Q *)
elim (eq_dec_points P Q); intro; try assumption.
(* Goal: @eq (@Tpoint Tn) P Q *)
cut False.
(* Goal: False *)
(* Goal: forall _ : False, @eq (@Tpoint Tn) P Q *)
intro; intuition.
(* Goal: False *)
apply not_col_distincts in H.
(* Goal: False *)
spliter.
(* Goal: False *)
assert (Col C P Q) by (apply col_transitivity_1 with D; Col).
(* Goal: False *)
assert (Col Q B C).
(* Goal: False *)
(* Goal: @Col Tn Q B C *)
induction (eq_dec_points Q A).
(* Goal: False *)
(* Goal: @Col Tn Q B C *)
(* Goal: @Col Tn Q B C *)
subst; apply col_transitivity_1 with P; Col.
(* Goal: False *)
(* Goal: @Col Tn Q B C *)
apply col_transitivity_1 with P; try Col; apply col_permutation_1; apply col_transitivity_1 with A; Col.
(* Goal: False *)
assert (Col A B C).
(* Goal: False *)
(* Goal: @Col Tn A B C *)
induction (eq_dec_points Q A).
(* Goal: False *)
(* Goal: @Col Tn A B C *)
(* Goal: @Col Tn A B C *)
subst Q; assumption.
(* Goal: False *)
(* Goal: @Col Tn A B C *)
induction (eq_dec_points Q B).
(* Goal: False *)
(* Goal: @Col Tn A B C *)
(* Goal: @Col Tn A B C *)
subst; apply col_permutation_2; apply col_transitivity_1 with P; try Col.
(* Goal: False *)
(* Goal: @Col Tn A B C *)
apply col_permutation_2; apply col_transitivity_1 with Q; try Col.
(* Goal: False *)
contradiction.
Qed.
End T6_1.
Hint Resolve col_transitivity_1 col_transitivity_2 out_col : col.
Section T6_2.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma not_col_exists : forall A B,
A<>B -> exists C, ~ Col A B C.
Proof.
(* Goal: forall (A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
assert (T:=lower_dim_ex).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
induction T.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
induction H0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
induction H0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
induction (col_dec A B x).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
induction(col_dec A B x0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
induction(col_dec A B x1).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
induction (eq_dec_points A x).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
assert (~(Col x x0 x1)) by (unfold Col; auto).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
treat_equalities; eCol.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
assert (Col A x x0) by eCol.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
assert (Col A x x1) by eCol.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
assert (Col A x0 x1) by eCol.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
assert (Col x x0 x1) by eCol.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
contradiction.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
exists x1; assumption.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
exists x0; assumption.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => not (@Col Tn A B C)) *)
exists x; assumption.
Qed.
Lemma col3 : forall X Y A B C,
X <> Y ->
Col X Y A -> Col X Y B -> Col X Y C ->
Col A B C.
Proof.
(* Goal: forall (X Y A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) X Y)) (_ : @Col Tn X Y A) (_ : @Col Tn X Y B) (_ : @Col Tn X Y C), @Col Tn A B C *)
intros.
(* Goal: @Col Tn A B C *)
assert (Col X A B) by (apply col_transitivity_1 with Y; assumption).
(* Goal: @Col Tn A B C *)
induction(eq_dec_points C X).
(* Goal: @Col Tn A B C *)
(* Goal: @Col Tn A B C *)
subst X; apply col_permutation_1; assumption.
(* Goal: @Col Tn A B C *)
apply col_permutation_1.
(* Goal: @Col Tn C A B *)
apply col_transitivity_1 with X; try assumption.
(* Goal: @Col Tn C X B *)
(* Goal: @Col Tn C X A *)
apply col_permutation_2.
(* Goal: @Col Tn C X B *)
(* Goal: @Col Tn X A C *)
apply col_transitivity_1 with Y; assumption.
(* Goal: @Col Tn C X B *)
apply col_permutation_2.
(* Goal: @Col Tn X B C *)
apply col_transitivity_1 with Y; assumption.
Qed.
Lemma colx : forall A B C X Y, A <> B -> Col X Y A -> Col X Y B -> Col A B C -> Col X Y C.
Proof.
(* Goal: forall (A B C X Y : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Col Tn X Y A) (_ : @Col Tn X Y B) (_ : @Col Tn A B C), @Col Tn X Y C *)
intros.
(* Goal: @Col Tn X Y C *)
destruct (eq_dec_points X Y).
(* Goal: @Col Tn X Y C *)
(* Goal: @Col Tn X Y C *)
subst; Col.
(* Goal: @Col Tn X Y C *)
apply (col3 A B); auto; apply col_permutation_1.
(* Goal: @Col Tn Y A B *)
(* Goal: @Col Tn X A B *)
apply col_transitivity_1 with Y; Col.
(* Goal: @Col Tn Y A B *)
apply (col_transitivity_2 X); Col.
Qed.
Lemma out2__bet : forall A B C, Out A B C -> Out C A B -> Bet A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Out Tn A B C) (_ : @Out Tn C A B), @Bet Tn A B C *)
intros A B C Hout1 Hout2.
(* Goal: @Bet Tn A B C *)
apply l6_4_1 in Hout2.
(* Goal: @Bet Tn A B C *)
destruct Hout2 as [_ Hout2].
(* Goal: @Bet Tn A B C *)
destruct Hout1 as [_ [_ [|]]].
(* Goal: @Bet Tn A B C *)
(* Goal: @Bet Tn A B C *)
assumption.
(* Goal: @Bet Tn A B C *)
exfalso.
(* Goal: False *)
apply Hout2.
(* Goal: @Bet Tn A C B *)
assumption.
Qed.
Lemma bet2_le2__le1346 : forall A B C A' B' C', Bet A B C -> Bet A' B' C' -> Le
A B A' B' -> Le
B C B' C' ->
Le
A C A' C'.
Lemma bet2_le2__le2356 : forall A B C A' B' C', Bet A B C -> Bet A' B' C' ->
Le A B A' B' -> Le A' C' A C -> Le B' C' B C.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Bet Tn A' B' C') (_ : @Le Tn A B A' B') (_ : @Le Tn A' C' A C), @Le Tn B' C' B C *)
intros A B C A' B' C' HBet HBet' HLe1 HLe2.
(* Goal: @Le Tn B' C' B C *)
elim(eq_dec_points A B).
(* Goal: forall _ : not (@eq (@Tpoint Tn) A B), @Le Tn B' C' B C *)
(* Goal: forall _ : @eq (@Tpoint Tn) A B, @Le Tn B' C' B C *)
{
(* Goal: forall _ : @eq (@Tpoint Tn) A B, @Le Tn B' C' B C *)
intro; treat_equalities.
(* Goal: @Le Tn B' C' A C *)
apply (le_transitivity _ _ A' C'); auto.
(* Goal: @Le Tn B' C' A' C' *)
destruct (l5_12_a A' B' C'); auto.
(* BG Goal: forall _ : not (@eq (@Tpoint Tn) A B), @Le Tn B' C' B C *)
}
(* Goal: forall _ : not (@eq (@Tpoint Tn) A B), @Le Tn B' C' B C *)
intro.
(* Goal: @Le Tn B' C' B C *)
assert (A<>C) by (intro; treat_equalities; auto).
(* Goal: @Le Tn B' C' B C *)
destruct (l5_5_1 A B A' B' HLe1) as [B0 [HBet1 HCong1]].
(* Goal: @Le Tn B' C' B C *)
assert (A<>B0) by (intro; treat_equalities; auto).
(* Goal: @Le Tn B' C' B C *)
destruct HLe2 as [C0 [HBet2 HCong2]].
(* Goal: @Le Tn B' C' B C *)
assert (A<>C0) by (intro; treat_equalities; auto).
(* Goal: @Le Tn B' C' B C *)
assert (Bet A B0 C0).
(* Goal: @Le Tn B' C' B C *)
(* Goal: @Bet Tn A B0 C0 *)
{
(* Goal: @Bet Tn A B0 C0 *)
apply l6_13_1.
(* Goal: @Le Tn A B0 A C0 *)
(* Goal: @Out Tn A B0 C0 *)
apply (l6_7 _ _ B); [|apply (l6_7 _ _ C)]; [apply l6_6| |apply l6_6]; apply bet_out; auto.
(* Goal: @Le Tn A B0 A C0 *)
apply (l5_6 A' B' A' C'); Cong.
(* Goal: @Le Tn A' B' A' C' *)
destruct (l5_12_a A' B' C'); auto.
(* BG Goal: @Le Tn B' C' B C *)
}
(* Goal: @Le Tn B' C' B C *)
apply (l5_6 B0 C0 B C); Cong; [apply (le_transitivity _ _ B C0)|].
(* Goal: @Cong Tn B0 C0 B' C' *)
(* Goal: @Le Tn B C0 B C *)
(* Goal: @Le Tn B0 C0 B C0 *)
destruct (l5_12_a B B0 C0); eBetween.
(* Goal: @Cong Tn B0 C0 B' C' *)
(* Goal: @Le Tn B C0 B C *)
destruct (l5_12_a B C0 C); eBetween.
(* Goal: @Cong Tn B0 C0 B' C' *)
apply cong_commutativity; apply (l4_3 _ _ A _ _ A'); Between; Cong.
Qed.
Lemma bet2_le2__le1245 : forall A B C A' B' C', Bet A B C -> Bet A' B' C' ->
Le B C B' C' -> Le A' C' A C -> Le A' B' A B.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Bet Tn A' B' C') (_ : @Le Tn B C B' C') (_ : @Le Tn A' C' A C), @Le Tn A' B' A B *)
intros A B C A' B' C'; intros.
(* Goal: @Le Tn A' B' A B *)
apply le_comm.
(* Goal: @Le Tn B' A' B A *)
apply (bet2_le2__le2356 C _ _ C'); Le; Between.
Qed.
Lemma cong_preserves_bet : forall B A' A0 E D' D0,
Bet B A' A0 -> Cong B A' E D' -> Cong B A0 E D0 -> Out E D' D0 ->
Bet E D' D0.
Lemma out_cong_cong : forall B A A0 E D D0,
Out B A A0 -> Out E D D0 ->
Cong B A E D -> Cong B A0 E D0 ->
Cong A A0 D D0.
Lemma not_out_bet : forall A B C, Col A B C -> ~ Out B A C -> Bet A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C) (_ : not (@Out Tn B A C)), @Bet Tn A B C *)
intros.
(* Goal: @Bet Tn A B C *)
unfold Out in H0.
(* Goal: @Bet Tn A B C *)
induction (eq_dec_points A B).
(* Goal: @Bet Tn A B C *)
(* Goal: @Bet Tn A B C *)
subst.
(* Goal: @Bet Tn A B C *)
(* Goal: @Bet Tn B B C *)
Between.
(* Goal: @Bet Tn A B C *)
induction (eq_dec_points B C).
(* Goal: @Bet Tn A B C *)
(* Goal: @Bet Tn A B C *)
subst.
(* Goal: @Bet Tn A B C *)
(* Goal: @Bet Tn A C C *)
Between.
(* Goal: @Bet Tn A B C *)
unfold Col in *.
(* Goal: @Bet Tn A B C *)
decompose [or] H;clear H.
(* Goal: @Bet Tn A B C *)
(* Goal: @Bet Tn A B C *)
(* Goal: @Bet Tn A B C *)
assumption.
(* Goal: @Bet Tn A B C *)
(* Goal: @Bet Tn A B C *)
exfalso.
(* Goal: @Bet Tn A B C *)
(* Goal: False *)
apply H0.
(* Goal: @Bet Tn A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (or (@Bet Tn B A C) (@Bet Tn B C A))) *)
intuition.
(* Goal: @Bet Tn A B C *)
exfalso.
(* Goal: False *)
apply H0.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (or (@Bet Tn B A C) (@Bet Tn B C A))) *)
intuition.
Qed.
Lemma or_bet_out : forall A B C, Bet A B C \/ Out B A C \/ ~Col A B C.
Proof.
(* Goal: forall A B C : @Tpoint Tn, or (@Bet Tn A B C) (or (@Out Tn B A C) (not (@Col Tn A B C))) *)
intros.
(* Goal: or (@Bet Tn A B C) (or (@Out Tn B A C) (not (@Col Tn A B C))) *)
destruct (col_dec A B C); auto.
(* Goal: or (@Bet Tn A B C) (or (@Out Tn B A C) (not (@Col Tn A B C))) *)
destruct (out_dec B A C); auto.
(* Goal: or (@Bet Tn A B C) (or (@Out Tn B A C) (not (@Col Tn A B C))) *)
left; apply not_out_bet; trivial.
Qed.
Lemma not_bet_out : forall A B C,
Col A B C -> ~Bet A B C -> Out B A C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C) (_ : not (@Bet Tn A B C)), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B A C *)
destruct (or_bet_out A B C) as [HBet|[HOut|HNCol]]; trivial; contradiction.
Qed.
Lemma not_bet_and_out :
forall A B C,
~ (Bet A B C /\ Out B A C).
Lemma out_to_bet :
forall A B C A' B' C',
Col A' B' C' ->
(Out B A C <-> Out B' A' C') ->
Bet A B C ->
Bet A' B' C'.
Lemma col_out2_col : forall A B C AA CC, Col A B C -> Out B A AA -> Out B C CC -> Col AA B CC.
Lemma bet2_out_out : forall A B C B' C', B <> A -> B' <> A -> Out A C C' -> Bet A B C -> Bet A B' C' -> Out A B B'.
Lemma bet2__out : forall A B C B', A <> B -> A <> B' -> Bet A B C -> Bet A B' C -> Out A B B'.
Proof.
(* Goal: forall (A B C B' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A B')) (_ : @Bet Tn A B C) (_ : @Bet Tn A B' C), @Out Tn A B B' *)
intros.
(* Goal: @Out Tn A B B' *)
apply bet2_out_out with C C; auto.
(* Goal: @Out Tn A C C *)
apply bet_neq12__neq in H1; auto.
(* Goal: @Out Tn A C C *)
apply out_trivial; auto.
Qed.
Lemma out2_out_1 : forall B C D X,
Out B X C -> Out B X D -> Out B C D.
Lemma out2_out_2 : forall B C D X,
Out B C X -> Out B D X -> Out B C D.
Lemma out_bet_out_1 : forall A B C P,
Out P A C -> Bet A B C -> Out P A B.
Lemma out_bet_out_2 : forall A B C P,
Out P A C -> Bet A B C -> Out P B C.
Lemma out_bet__out : forall A B P Q,
Bet P Q A -> Out Q A B -> Out P A B.
Proof.
(* Goal: forall (A B P Q : @Tpoint Tn) (_ : @Bet Tn P Q A) (_ : @Out Tn Q A B), @Out Tn P A B *)
intros A B P Q HBet Hout.
(* Goal: @Out Tn P A B *)
destruct Hout as [HAQ [HBQ [HQAB|HQBA]]]; [|apply l6_6]; apply bet_out; eBetween; intro; treat_equalities; auto.
(* Goal: False *)
apply HBQ; apply (between_equality _ _ A); Between.
Qed.
Lemma segment_reverse : forall A B C, Bet A B C -> exists B', Bet A B' C /\ Cong C B' A B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Bet Tn A B C), @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Bet Tn A B' C) (@Cong Tn C B' A B)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Bet Tn A B' C) (@Cong Tn C B' A B)) *)
destruct (eq_dec_points A B).
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Bet Tn A B' C) (@Cong Tn C B' A B)) *)
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Bet Tn A B' C) (@Cong Tn C B' A B)) *)
subst B; exists C; finish.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Bet Tn A B' C) (@Cong Tn C B' A B)) *)
destruct (segment_construction_3 C A A B) as [B' []]; auto.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Bet Tn A B' C) (@Cong Tn C B' A B)) *)
(* Goal: not (@eq (@Tpoint Tn) C A) *)
intro; treat_equalities; auto.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => and (@Bet Tn A B' C) (@Cong Tn C B' A B)) *)
exists B'; split; trivial.
(* Goal: @Bet Tn A B' C *)
apply between_symmetry, (cong_preserves_bet A B C); Cong.
(* Goal: @Out Tn C B' A *)
apply l6_6; assumption.
Qed.
Lemma diff_col_ex : forall A B, exists C, A <> C /\ B <> C /\ Col A B C.
Proof.
(* Goal: forall A B : @Tpoint Tn, @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C))) *)
assert (exists C, Bet A B C /\ B <> C).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C))) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Bet Tn A B C) (not (@eq (@Tpoint Tn) B C))) *)
apply point_construction_different.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C))) *)
ex_and H C.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C))) *)
exists C.
(* Goal: and (not (@eq (@Tpoint Tn) A C)) (and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C)) *)
split.
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
intro.
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
(* Goal: False *)
induction (eq_dec_points A B).
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
(* Goal: False *)
(* Goal: False *)
subst B.
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
(* Goal: False *)
(* Goal: False *)
subst C.
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
(* Goal: False *)
(* Goal: False *)
intuition.
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
(* Goal: False *)
subst C.
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
(* Goal: False *)
Between.
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
assert_cols.
(* Goal: and (not (@eq (@Tpoint Tn) B C)) (@Col Tn A B C) *)
auto.
Qed.
Lemma diff_bet_ex3 : forall A B C,
Bet A B C ->
exists D, A <> D /\ B <> D /\ C <> D /\ Col A B D.
Lemma diff_col_ex3 : forall A B C,
Col A B C -> exists D, A <> D /\ B <> D /\ C <> D /\ Col A B D.
End T6_2.
Hint Resolve bet_out out_trivial l6_6 : out. |
Require Export GeoCoq.Elements.OriginalProofs.lemma_planeseparation.
Section Euclid.
Context `{Ax1:euclidean_neutral_ruler_compass}.
Lemma lemma_samesidetransitive :
forall A B P Q R,
OS P Q A B -> OS Q R A B ->
OS P R A B.
Proof.
(* Goal: forall (A B P Q R : @Point Ax) (_ : @OS Ax P Q A B) (_ : @OS Ax Q R A B), @OS Ax P R A B *)
intros.
(* Goal: @OS Ax P R A B *)
let Tf:=fresh in assert (Tf:exists E F G, (Col A B E /\ Col A B F /\ BetS Q E G /\ BetS R F G /\ nCol A B Q /\ nCol A B R)) by (conclude_def OS );destruct Tf as [E[F[G]]];spliter.
(* Goal: @OS Ax P R A B *)
assert (TS Q A B G) by (conclude_def TS ).
(* Goal: @OS Ax P R A B *)
assert (TS P A B G) by (conclude lemma_planeseparation).
(* Goal: @OS Ax P R A B *)
let Tf:=fresh in assert (Tf:exists M, (BetS P M G /\ Col A B M /\ nCol A B P)) by (conclude_def TS );destruct Tf as [M];spliter.
(* Goal: @OS Ax P R A B *)
assert (OS P R A B) by (conclude_def OS ).
(* Goal: @OS Ax P R A B *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_8_2.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_rectanglereverse :
forall A B C D,
RE A B C D ->
RE D C B A.
Proof.
(* Goal: forall (A B C D : @Point Ax0) (_ : @RE Ax0 A B C D), @RE Ax0 D C B A *)
intros.
(* Goal: @RE Ax0 D C B A *)
assert ((Per D A B /\ Per A B C /\ Per B C D /\ Per C D A /\ CR A C B D)) by (conclude_def RE ).
(* Goal: @RE Ax0 D C B A *)
assert (Per A D C) by (conclude lemma_8_2).
(* Goal: @RE Ax0 D C B A *)
assert (Per D C B) by (conclude lemma_8_2).
(* Goal: @RE Ax0 D C B A *)
assert (Per C B A) by (conclude lemma_8_2).
(* Goal: @RE Ax0 D C B A *)
assert (Per B A D) by (conclude lemma_8_2).
(* Goal: @RE Ax0 D C B A *)
let Tf:=fresh in assert (Tf:exists M, (BetS A M C /\ BetS B M D)) by (conclude_def CR );destruct Tf as [M];spliter.
(* Goal: @RE Ax0 D C B A *)
assert (BetS C M A) by (conclude axiom_betweennesssymmetry).
(* Goal: @RE Ax0 D C B A *)
assert (BetS D M B) by (conclude axiom_betweennesssymmetry).
(* Goal: @RE Ax0 D C B A *)
assert (CR D B C A) by (conclude_def CR ).
(* Goal: @RE Ax0 D C B A *)
assert (RE D C B A) by (conclude_def RE ).
(* Goal: @RE Ax0 D C B A *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinear2.
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinear1.
Section Euclid.
Context `{Ax1:euclidean_neutral}.
Lemma lemma_collinearorder :
forall A B C,
Col A B C ->
Col B A C /\ Col B C A /\ Col C A B /\ Col A C B /\ Col C B A.
Proof.
(* Goal: forall (A B C : @Point Ax1) (_ : @Col Ax1 A B C), and (@Col Ax1 B A C) (and (@Col Ax1 B C A) (and (@Col Ax1 C A B) (and (@Col Ax1 A C B) (@Col Ax1 C B A)))) *)
intros.
(* Goal: and (@Col Ax1 B A C) (and (@Col Ax1 B C A) (and (@Col Ax1 C A B) (and (@Col Ax1 A C B) (@Col Ax1 C B A)))) *)
assert (Col B C A) by (conclude lemma_collinear2).
(* Goal: and (@Col Ax1 B A C) (and (@Col Ax1 B C A) (and (@Col Ax1 C A B) (and (@Col Ax1 A C B) (@Col Ax1 C B A)))) *)
assert (Col C A B) by (conclude lemma_collinear2).
(* Goal: and (@Col Ax1 B A C) (and (@Col Ax1 B C A) (and (@Col Ax1 C A B) (and (@Col Ax1 A C B) (@Col Ax1 C B A)))) *)
assert (Col B A C) by (conclude lemma_collinear1).
(* Goal: and (@Col Ax1 B A C) (and (@Col Ax1 B C A) (and (@Col Ax1 C A B) (and (@Col Ax1 A C B) (@Col Ax1 C B A)))) *)
assert (Col A C B) by (conclude lemma_collinear2).
(* Goal: and (@Col Ax1 B A C) (and (@Col Ax1 B C A) (and (@Col Ax1 C A B) (and (@Col Ax1 A C B) (@Col Ax1 C B A)))) *)
assert (Col C B A) by (conclude lemma_collinear2).
(* Goal: and (@Col Ax1 B A C) (and (@Col Ax1 B C A) (and (@Col Ax1 C A B) (and (@Col Ax1 A C B) (@Col Ax1 C B A)))) *)
close.
Qed.
End Euclid.
|
Set Automatic Coercions Import.
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Zring.
Section Int_power.
Variable G : GROUP.
Set Strict Implicit.
Unset Implicit Arguments.
Definition group_square (x : G) : G := sgroup_law G x x.
Set Implicit Arguments.
Unset Strict Implicit.
Fixpoint group_power_pos (g : G) (p : positive) {struct p} : G :=
match p with
| xH => g
| xO p' => group_square (group_power_pos g p')
| xI p' => sgroup_law G (group_square (group_power_pos g p')) g
end.
Set Strict Implicit.
Unset Implicit Arguments.
Definition group_power (g : G) (z : ZZ) : G :=
match z with
| Z0 => monoid_unit G
| Zpos p => group_power_pos g p
| Zneg p => group_power_pos (group_inverse G g) p
end.
Set Implicit Arguments.
Unset Strict Implicit.
End Int_power.
Section Lemmas.
Variable G : GROUP.
Lemma group_power_zero :
forall g : G, Equal (group_power G g (monoid_unit ZZ)) (monoid_unit G).
Proof.
(* Goal: forall g : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
intros g; simpl in |- *; auto with algebra.
Qed.
Parameter
group_power_S :
forall (g : G) (n : ZZ),
Equal (group_power G g (sgroup_law ZZ n (ring_unit ZZ)))
(sgroup_law G (group_power G g n) g).
End Lemmas.
Hint Resolve group_power_zero group_power_S: algebra. |
Require Export GeoCoq.Tarski_dev.Ch14_prod.
Section Order.
Context `{T2D:Tarski_2D}.
Context `{TE:@Tarski_euclidean Tn TnEQD}.
Lemma l14_36_a : forall O E E' A B C,
Sum O E E' A B C -> Out O A B -> Bet O A C.
Proof.
(* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : @Sum Tn O E E' A B C) (_ : @Out Tn O A B), @Bet Tn O A C *)
intros.
(* Goal: @Bet Tn O A C *)
assert(HS:=H).
(* Goal: @Bet Tn O A C *)
unfold Sum in H.
(* Goal: @Bet Tn O A C *)
spliter.
(* Goal: @Bet Tn O A C *)
unfold Ar2 in H.
(* Goal: @Bet Tn O A C *)
unfold Out in H0.
(* Goal: @Bet Tn O A C *)
spliter.
(* Goal: @Bet Tn O A C *)
assert(Parallelogram_flat O A C B).
(* Goal: @Bet Tn O A C *)
(* Goal: @Parallelogram_flat Tn O A C B *)
apply(sum_cong O E E' H A B C HS).
(* Goal: @Bet Tn O A C *)
(* Goal: or (not (@eq (@Tpoint Tn) A O)) (not (@eq (@Tpoint Tn) B O)) *)
tauto.
(* Goal: @Bet Tn O A C *)
assert(Parallelogram O A C B).
(* Goal: @Bet Tn O A C *)
(* Goal: @Parallelogram Tn O A C B *)
right.
(* Goal: @Bet Tn O A C *)
(* Goal: @Parallelogram_flat Tn O A C B *)
auto.
(* Goal: @Bet Tn O A C *)
induction(eq_dec_points A B).
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
subst B.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
unfold Parallelogram_flat in H7.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
spliter.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
assert(O = C \/ Midpoint A O C).
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: or (@eq (@Tpoint Tn) O C) (@Midpoint Tn A O C) *)
apply(l7_20 A O C).
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Cong Tn A O A C *)
(* Goal: @Col Tn O A C *)
ColR.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Cong Tn A O A C *)
Cong.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
induction H13.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
subst C.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A O *)
apply False_ind.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: False *)
apply HS.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Col Tn O E E' *)
apply (double_null_null O E E') in HS; auto.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Col Tn O E E' *)
tauto.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
unfold Midpoint in H13.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
tauto.
(* Goal: @Bet Tn O A C *)
induction H3.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
apply plg_permut in H8.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
apply plg_permut in H8.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
apply plg_permut in H8.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
assert(Bet A B C).
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn A B C *)
apply between_symmetry.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn C B A *)
apply(plg_bet1 B O A C).
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn B A O *)
(* Goal: @Parallelogram Tn B O A C *)
assumption.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn B A O *)
apply between_symmetry.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A B *)
assumption.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O A C *)
apply (outer_transitivity_between O A B C); auto.
(* Goal: @Bet Tn O A C *)
assert(Bet B A C).
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn B A C *)
apply between_symmetry.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn C A B *)
apply(plg_bet1 A O B C).
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn A B O *)
(* Goal: @Parallelogram Tn A O B C *)
apply plg_comm2.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn A B O *)
(* Goal: @Parallelogram Tn O A C B *)
assumption.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn A B O *)
apply between_symmetry.
(* Goal: @Bet Tn O A C *)
(* Goal: @Bet Tn O B A *)
assumption.
(* Goal: @Bet Tn O A C *)
apply (outer_transitivity_between2 O B A C); auto.
Qed.
Lemma l14_36_b : forall O E E' A B C,
Sum O E E' A B C -> Out O A B -> O <> A /\ O <> C /\ A <> C.
Proof.
(* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : @Sum Tn O E E' A B C) (_ : @Out Tn O A B), and (not (@eq (@Tpoint Tn) O A)) (and (not (@eq (@Tpoint Tn) O C)) (not (@eq (@Tpoint Tn) A C))) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) O A)) (and (not (@eq (@Tpoint Tn) O C)) (not (@eq (@Tpoint Tn) A C))) *)
assert(HH:= l14_36_a O E E' A B C H H0).
(* Goal: and (not (@eq (@Tpoint Tn) O A)) (and (not (@eq (@Tpoint Tn) O C)) (not (@eq (@Tpoint Tn) A C))) *)
unfold Out in H0.
(* Goal: and (not (@eq (@Tpoint Tn) O A)) (and (not (@eq (@Tpoint Tn) O C)) (not (@eq (@Tpoint Tn) A C))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) O A)) (and (not (@eq (@Tpoint Tn) O C)) (not (@eq (@Tpoint Tn) A C))) *)
split; auto.
(* Goal: and (not (@eq (@Tpoint Tn) O C)) (not (@eq (@Tpoint Tn) A C)) *)
split.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
(* Goal: not (@eq (@Tpoint Tn) O C) *)
intro.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
(* Goal: False *)
subst C.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
(* Goal: False *)
apply between_identity in HH.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
(* Goal: False *)
subst A.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
(* Goal: False *)
tauto.
(* Goal: not (@eq (@Tpoint Tn) A C) *)
intro.
(* Goal: False *)
subst C.
(* Goal: False *)
assert(HS:= H).
(* Goal: False *)
unfold Sum in H.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold Ar2 in H.
(* Goal: False *)
spliter.
(* Goal: False *)
assert(Sum O E E' A O A).
(* Goal: False *)
(* Goal: @Sum Tn O E E' A O A *)
apply (sum_A_O).
(* Goal: False *)
(* Goal: @Col Tn O E A *)
(* Goal: not (@Col Tn O E E') *)
assumption.
(* Goal: False *)
(* Goal: @Col Tn O E A *)
assumption.
(* Goal: False *)
assert(B = O).
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) B O *)
apply (sum_uniquenessB O E E' H A B O A); auto.
(* Goal: False *)
contradiction.
Qed.
Lemma O_not_positive : forall O E, ~ Ps O E O.
Proof.
(* Goal: forall O E : @Tpoint Tn, not (@Ps Tn O E O) *)
intros.
(* Goal: not (@Ps Tn O E O) *)
unfold Ps.
(* Goal: not (@Out Tn O O E) *)
unfold Out.
(* Goal: not (and (not (@eq (@Tpoint Tn) O O)) (and (not (@eq (@Tpoint Tn) E O)) (or (@Bet Tn O O E) (@Bet Tn O E O)))) *)
intuition.
Qed.
Lemma pos_null_neg : forall O E E' A MA,
Opp O E E' A MA -> Ps O E A \/ O = A \/ Ps O E MA.
Proof.
(* Goal: forall (O E E' A MA : @Tpoint Tn) (_ : @Opp Tn O E E' A MA), or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
intros.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
unfold Opp in H.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
induction (eq_dec_points A O).
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
right; left; auto.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
assert(HS:= H).
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
unfold Sum in H.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
spliter.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
unfold Ar2 in H.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
spliter.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
assert(Parallelogram_flat O MA O A).
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: @Parallelogram_flat Tn O MA O A *)
apply(sum_cong O E E' H MA A O HS); tauto.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
unfold Parallelogram_flat in H5.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
spliter.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
assert(HG:=grid_not_par O E E' H).
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
spliter.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
assert(A = MA \/ Midpoint O A MA).
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: or (@eq (@Tpoint Tn) A MA) (@Midpoint Tn O A MA) *)
apply(l7_20 O A MA); try ColR.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: @Cong Tn O A O MA *)
Cong.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
induction H16.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
subst MA.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E A)) *)
tauto.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
induction(out_dec O E A).
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
left.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: @Ps Tn O E A *)
unfold Ps.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: @Out Tn O A E *)
apply l6_6.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
(* Goal: @Out Tn O E A *)
assumption.
(* Goal: or (@Ps Tn O E A) (or (@eq (@Tpoint Tn) O A) (@Ps Tn O E MA)) *)
right; right.
(* Goal: @Ps Tn O E MA *)
assert(MA <> O).
(* Goal: @Ps Tn O E MA *)
(* Goal: not (@eq (@Tpoint Tn) MA O) *)
intro.
(* Goal: @Ps Tn O E MA *)
(* Goal: False *)
subst MA.
(* Goal: @Ps Tn O E MA *)
(* Goal: False *)
apply is_midpoint_id_2 in H16.
(* Goal: @Ps Tn O E MA *)
(* Goal: False *)
subst A.
(* Goal: @Ps Tn O E MA *)
(* Goal: False *)
tauto.
(* Goal: @Ps Tn O E MA *)
unfold Midpoint in H16.
(* Goal: @Ps Tn O E MA *)
spliter.
(* Goal: @Ps Tn O E MA *)
unfold Ps.
(* Goal: @Out Tn O MA E *)
unfold Col in H2.
(* Goal: @Out Tn O MA E *)
induction H2.
(* Goal: @Out Tn O MA E *)
(* Goal: @Out Tn O MA E *)
unfold Out.
(* Goal: @Out Tn O MA E *)
(* Goal: and (not (@eq (@Tpoint Tn) MA O)) (and (not (@eq (@Tpoint Tn) E O)) (or (@Bet Tn O MA E) (@Bet Tn O E MA))) *)
repeat split; auto.
(* Goal: @Out Tn O MA E *)
induction H2.
(* Goal: @Out Tn O MA E *)
(* Goal: @Out Tn O MA E *)
unfold Out.
(* Goal: @Out Tn O MA E *)
(* Goal: and (not (@eq (@Tpoint Tn) MA O)) (and (not (@eq (@Tpoint Tn) E O)) (or (@Bet Tn O MA E) (@Bet Tn O E MA))) *)
repeat split; Col.
(* Goal: @Out Tn O MA E *)
(* Goal: or (@Bet Tn O MA E) (@Bet Tn O E MA) *)
left.
(* Goal: @Out Tn O MA E *)
(* Goal: @Bet Tn O MA E *)
apply between_symmetry.
(* Goal: @Out Tn O MA E *)
(* Goal: @Bet Tn E MA O *)
auto.
(* Goal: @Out Tn O MA E *)
apply False_ind.
(* Goal: False *)
apply H17.
(* Goal: @Out Tn O E A *)
unfold Out.
(* Goal: and (not (@eq (@Tpoint Tn) E O)) (and (not (@eq (@Tpoint Tn) A O)) (or (@Bet Tn O E A) (@Bet Tn O A E))) *)
repeat split; auto.
(* Goal: or (@Bet Tn O E A) (@Bet Tn O A E) *)
apply between_symmetry in H16.
(* Goal: or (@Bet Tn O E A) (@Bet Tn O A E) *)
assert(HH:= l5_2 MA O A E H18 H16 H2).
(* Goal: or (@Bet Tn O E A) (@Bet Tn O A E) *)
tauto.
Qed.
Lemma sum_pos_pos : forall O E E' A B AB,
Ps O E A -> Ps O E B -> Sum O E E' A B AB -> Ps O E AB.
Proof.
(* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @Ps Tn O E A) (_ : @Ps Tn O E B) (_ : @Sum Tn O E E' A B AB), @Ps Tn O E AB *)
intros.
(* Goal: @Ps Tn O E AB *)
unfold Ps in *.
(* Goal: @Out Tn O AB E *)
assert(Out O A B).
(* Goal: @Out Tn O AB E *)
(* Goal: @Out Tn O A B *)
apply l6_6 in H0.
(* Goal: @Out Tn O AB E *)
(* Goal: @Out Tn O A B *)
apply(l6_7 O A E B); auto.
(* Goal: @Out Tn O AB E *)
assert(HH:=l14_36_b O E E' A B AB H1 H2).
(* Goal: @Out Tn O AB E *)
spliter.
(* Goal: @Out Tn O AB E *)
assert(HH:=l14_36_a O E E' A B AB H1 H2).
(* Goal: @Out Tn O AB E *)
apply l6_6 in H.
(* Goal: @Out Tn O AB E *)
assert(Out O A AB).
(* Goal: @Out Tn O AB E *)
(* Goal: @Out Tn O A AB *)
apply bet_out; auto.
(* Goal: @Out Tn O AB E *)
assert(HP:=l6_7 O E A AB H H6).
(* Goal: @Out Tn O AB E *)
apply l6_6.
(* Goal: @Out Tn O E AB *)
assumption.
Qed.
Lemma prod_pos_pos : forall O E E' A B AB,
Ps O E A -> Ps O E B -> Prod O E E' A B AB -> Ps O E AB.
Proof.
(* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @Ps Tn O E A) (_ : @Ps Tn O E B) (_ : @Prod Tn O E E' A B AB), @Ps Tn O E AB *)
intros.
(* Goal: @Ps Tn O E AB *)
assert(HP:= H1).
(* Goal: @Ps Tn O E AB *)
unfold Prod in H1.
(* Goal: @Ps Tn O E AB *)
spliter.
(* Goal: @Ps Tn O E AB *)
unfold Ar2 in H1.
(* Goal: @Ps Tn O E AB *)
spliter.
(* Goal: @Ps Tn O E AB *)
ex_and H2 B'.
(* Goal: @Ps Tn O E AB *)
assert(HG:= grid_not_par O E E' H1).
(* Goal: @Ps Tn O E AB *)
spliter.
(* Goal: @Ps Tn O E AB *)
unfold Ps in H.
(* Goal: @Ps Tn O E AB *)
unfold Ps in H0.
(* Goal: @Ps Tn O E AB *)
unfold Out in *.
(* Goal: @Ps Tn O E AB *)
spliter.
(* Goal: @Ps Tn O E AB *)
assert(E' <> A).
(* Goal: @Ps Tn O E AB *)
(* Goal: not (@eq (@Tpoint Tn) E' A) *)
intro.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
subst A.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
contradiction.
(* Goal: @Ps Tn O E AB *)
assert(~Col O E' A).
(* Goal: @Ps Tn O E AB *)
(* Goal: not (@Col Tn O E' A) *)
intro.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
apply H1.
(* Goal: @Ps Tn O E AB *)
(* Goal: @Col Tn O E E' *)
ColR.
(* Goal: @Ps Tn O E AB *)
assert(~Par O E E' A).
(* Goal: @Ps Tn O E AB *)
(* Goal: not (@Par Tn O E E' A) *)
intro.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
induction H20.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
(* Goal: False *)
apply H20.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X O E) (@Col Tn X E' A)) *)
exists A.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
(* Goal: and (@Col Tn A O E) (@Col Tn A E' A) *)
split; Col.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
spliter.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
contradiction.
(* Goal: @Ps Tn O E AB *)
assert(Proj E E' O E' E E').
(* Goal: @Ps Tn O E AB *)
(* Goal: @Proj Tn E E' O E' E E' *)
apply(pj_col_project); Col.
(* Goal: @Ps Tn O E AB *)
(* Goal: @Pj Tn E E' E E' *)
left; right.
(* Goal: @Ps Tn O E AB *)
(* Goal: and (not (@eq (@Tpoint Tn) E E')) (and (not (@eq (@Tpoint Tn) E E')) (and (@Col Tn E E E') (@Col Tn E' E E'))) *)
repeat split; Col.
(* Goal: @Ps Tn O E AB *)
assert(Proj B B' O E' E E').
(* Goal: @Ps Tn O E AB *)
(* Goal: @Proj Tn B B' O E' E E' *)
apply(pj_col_project); Col.
(* Goal: @Ps Tn O E AB *)
assert(Proj O O O E' E E').
(* Goal: @Ps Tn O E AB *)
(* Goal: @Proj Tn O O O E' E E' *)
apply(pj_col_project); Col.
(* Goal: @Ps Tn O E AB *)
(* Goal: @Pj Tn E E' O O *)
right.
(* Goal: @Ps Tn O E AB *)
(* Goal: @eq (@Tpoint Tn) O O *)
auto.
(* Goal: @Ps Tn O E AB *)
assert(Proj E' A O E E' A).
(* Goal: @Ps Tn O E AB *)
(* Goal: @Proj Tn E' A O E E' A *)
apply(pj_col_project); Col.
(* Goal: @Ps Tn O E AB *)
(* Goal: @Pj Tn E' A E' A *)
left; right.
(* Goal: @Ps Tn O E AB *)
(* Goal: and (not (@eq (@Tpoint Tn) E' A)) (and (not (@eq (@Tpoint Tn) E' A)) (and (@Col Tn E' E' A) (@Col Tn A E' A))) *)
repeat split; Col.
(* Goal: @Ps Tn O E AB *)
assert(Proj B' AB O E E' A).
(* Goal: @Ps Tn O E AB *)
(* Goal: @Proj Tn B' AB O E E' A *)
apply(pj_col_project); Col.
(* Goal: @Ps Tn O E AB *)
assert(Proj O O O E E' A).
(* Goal: @Ps Tn O E AB *)
(* Goal: @Proj Tn O O O E E' A *)
apply(pj_col_project); Col.
(* Goal: @Ps Tn O E AB *)
(* Goal: @Pj Tn E' A O O *)
right.
(* Goal: @Ps Tn O E AB *)
(* Goal: @eq (@Tpoint Tn) O O *)
auto.
(* Goal: @Ps Tn O E AB *)
assert(AB <> O).
(* Goal: @Ps Tn O E AB *)
(* Goal: not (@eq (@Tpoint Tn) AB O) *)
intro.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
subst AB.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
apply prod_null in HP.
(* Goal: @Ps Tn O E AB *)
(* Goal: False *)
induction HP; contradiction.
(* Goal: @Ps Tn O E AB *)
unfold Ps.
(* Goal: @Out Tn O AB E *)
repeat split; auto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
induction H15.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
assert(Bet O B' E').
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: @Bet Tn O B' E' *)
apply(project_preserves_bet O E' E E' O B E O B' E'); auto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
assert(Bet O AB A).
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: @Bet Tn O AB A *)
apply(project_preserves_bet O E E' A O B' E' O AB A); auto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
induction H17.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
left.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: @Bet Tn O AB E *)
apply(between_exchange4 _ _ A); auto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
apply(l5_3 O AB E A); auto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
assert(Bet O E' B').
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: @Bet Tn O E' B' *)
apply(project_preserves_bet O E' E E' O E B O E' B'); auto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
assert(Bet O A AB).
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: @Bet Tn O A AB *)
apply(project_preserves_bet O E E' A O E' B' O A AB); auto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
induction H17.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
assert(Bet O E AB \/ Bet O AB E).
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O E AB) (@Bet Tn O AB E) *)
apply(l5_1 O A E AB); auto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
tauto.
(* Goal: or (@Bet Tn O AB E) (@Bet Tn O E AB) *)
right.
(* Goal: @Bet Tn O E AB *)
apply (between_exchange4 O E A AB); auto.
Qed.
Lemma pos_not_neg : forall O E A, Ps O E A -> ~Ng O E A.
Proof.
(* Goal: forall (O E A : @Tpoint Tn) (_ : @Ps Tn O E A), not (@Ng Tn O E A) *)
intros.
(* Goal: not (@Ng Tn O E A) *)
intro.
(* Goal: False *)
unfold Ps in H.
(* Goal: False *)
unfold Ng in H0.
(* Goal: False *)
unfold Out in H.
(* Goal: False *)
spliter.
(* Goal: False *)
induction H4.
(* Goal: False *)
(* Goal: False *)
apply H.
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) A O *)
apply (between_equality _ _ E); Between.
(* Goal: False *)
apply H1.
(* Goal: @eq (@Tpoint Tn) E O *)
apply (between_equality _ _ A); Between.
Qed.
Lemma neg_not_pos : forall O E A, Ng O E A -> ~Ps O E A.
Proof.
(* Goal: forall (O E A : @Tpoint Tn) (_ : @Ng Tn O E A), not (@Ps Tn O E A) *)
intros.
(* Goal: not (@Ps Tn O E A) *)
intro.
(* Goal: False *)
unfold Ps in H0.
(* Goal: False *)
unfold Ng in H.
(* Goal: False *)
unfold Out in H0.
(* Goal: False *)
spliter.
(* Goal: False *)
induction H2.
(* Goal: False *)
(* Goal: False *)
apply H0.
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) A O *)
apply (between_equality _ _ E); Between.
(* Goal: False *)
apply H1.
(* Goal: @eq (@Tpoint Tn) E O *)
apply (between_equality _ _ A); Between.
Qed.
Lemma opp_pos_neg : forall O E E' A MA, Ps O E A -> Opp O E E' A MA -> Ng O E MA.
Proof.
(* Goal: forall (O E E' A MA : @Tpoint Tn) (_ : @Ps Tn O E A) (_ : @Opp Tn O E E' A MA), @Ng Tn O E MA *)
intros.
(* Goal: @Ng Tn O E MA *)
assert(HH:=opp_midpoint O E E' A MA H0).
(* Goal: @Ng Tn O E MA *)
unfold Ng.
(* Goal: and (not (@eq (@Tpoint Tn) MA O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn MA O E)) *)
unfold Ps in H.
(* Goal: and (not (@eq (@Tpoint Tn) MA O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn MA O E)) *)
unfold Out in H.
(* Goal: and (not (@eq (@Tpoint Tn) MA O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn MA O E)) *)
unfold Midpoint in HH.
(* Goal: and (not (@eq (@Tpoint Tn) MA O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn MA O E)) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) MA O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn MA O E)) *)
repeat split; auto.
(* Goal: @Bet Tn MA O E *)
(* Goal: not (@eq (@Tpoint Tn) MA O) *)
intro.
(* Goal: @Bet Tn MA O E *)
(* Goal: False *)
subst MA.
(* Goal: @Bet Tn MA O E *)
(* Goal: False *)
apply cong_identity in H2.
(* Goal: @Bet Tn MA O E *)
(* Goal: False *)
contradiction.
(* Goal: @Bet Tn MA O E *)
induction H4.
(* Goal: @Bet Tn MA O E *)
(* Goal: @Bet Tn MA O E *)
apply(outer_transitivity_between MA O A E); Between.
(* Goal: @Bet Tn MA O E *)
apply(between_inner_transitivity MA O E A); Between.
Qed.
Lemma opp_neg_pos : forall O E E' A MA, Ng O E A -> Opp O E E' A MA -> Ps O E MA.
Proof.
(* Goal: forall (O E E' A MA : @Tpoint Tn) (_ : @Ng Tn O E A) (_ : @Opp Tn O E E' A MA), @Ps Tn O E MA *)
intros.
(* Goal: @Ps Tn O E MA *)
assert(HH:=opp_midpoint O E E' A MA H0).
(* Goal: @Ps Tn O E MA *)
unfold Ng in H.
(* Goal: @Ps Tn O E MA *)
unfold Ps.
(* Goal: @Out Tn O MA E *)
unfold Midpoint in HH.
(* Goal: @Out Tn O MA E *)
spliter.
(* Goal: @Out Tn O MA E *)
apply l6_6.
(* Goal: @Out Tn O E MA *)
unfold Out.
(* Goal: and (not (@eq (@Tpoint Tn) E O)) (and (not (@eq (@Tpoint Tn) MA O)) (or (@Bet Tn O E MA) (@Bet Tn O MA E))) *)
repeat split; auto.
(* Goal: or (@Bet Tn O E MA) (@Bet Tn O MA E) *)
(* Goal: not (@eq (@Tpoint Tn) MA O) *)
intro.
(* Goal: or (@Bet Tn O E MA) (@Bet Tn O MA E) *)
(* Goal: False *)
subst MA.
(* Goal: or (@Bet Tn O E MA) (@Bet Tn O MA E) *)
(* Goal: False *)
apply cong_identity in H2.
(* Goal: or (@Bet Tn O E MA) (@Bet Tn O MA E) *)
(* Goal: False *)
contradiction.
(* Goal: or (@Bet Tn O E MA) (@Bet Tn O MA E) *)
apply (l5_2 A O E MA); auto.
Qed.
Lemma ltP_ar2 : forall O E E' A B, LtP O E E' A B -> Ar2 O E E' A B A.
Proof.
(* Goal: forall (O E E' A B : @Tpoint Tn) (_ : @LtP Tn O E E' A B), @Ar2 Tn O E E' A B A *)
intros.
(* Goal: @Ar2 Tn O E E' A B A *)
unfold LtP in H.
(* Goal: @Ar2 Tn O E E' A B A *)
ex_and H D.
(* Goal: @Ar2 Tn O E E' A B A *)
apply diff_ar2 in H.
(* Goal: @Ar2 Tn O E E' A B A *)
unfold Ar2 in H.
(* Goal: @Ar2 Tn O E E' A B A *)
spliter.
(* Goal: @Ar2 Tn O E E' A B A *)
repeat split; auto.
Qed.
Lemma ltP_neq : forall O E E' A B, LtP O E E' A B -> A <> B.
Proof.
(* Goal: forall (O E E' A B : @Tpoint Tn) (_ : @LtP Tn O E E' A B), not (@eq (@Tpoint Tn) A B) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
assert(HH:=ltP_ar2 O E E' A B H).
(* Goal: not (@eq (@Tpoint Tn) A B) *)
unfold Ar2 in HH.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
spliter.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
unfold LtP in H.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro.
(* Goal: False *)
subst B.
(* Goal: False *)
ex_and H OO.
(* Goal: False *)
assert(OO=O).
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) OO O *)
apply (diff_uniqueness O E E' A A).
(* Goal: False *)
(* Goal: @Diff Tn O E E' A A O *)
(* Goal: @Diff Tn O E E' A A OO *)
assumption.
(* Goal: False *)
(* Goal: @Diff Tn O E E' A A O *)
apply diff_null; Col.
(* Goal: False *)
subst OO.
(* Goal: False *)
unfold Ps in H4.
(* Goal: False *)
unfold Out in H4.
(* Goal: False *)
tauto.
Qed.
Lemma leP_refl : forall O E E' A, LeP O E E' A A.
Proof.
(* Goal: forall O E E' A : @Tpoint Tn, @LeP Tn O E E' A A *)
intros.
(* Goal: @LeP Tn O E E' A A *)
right.
(* Goal: @eq (@Tpoint Tn) A A *)
tauto.
Qed.
Lemma ltP_sum_pos : forall O E E' A B C , Ps O E B -> Sum O E E' A B C -> LtP O E E' A C.
Proof.
(* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : @Ps Tn O E B) (_ : @Sum Tn O E E' A B C), @LtP Tn O E E' A C *)
intros.
(* Goal: @LtP Tn O E E' A C *)
unfold LtP.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
exists B.
(* Goal: and (@Diff Tn O E E' C A B) (@Ps Tn O E B) *)
split; auto.
(* Goal: @Diff Tn O E E' C A B *)
apply sum_diff in H0.
(* Goal: @Diff Tn O E E' C A B *)
assumption.
Qed.
Lemma pos_opp_neg : forall O E E' A mA, Ps O E A -> Opp O E E' A mA -> Ng O E mA.
Proof.
(* Goal: forall (O E E' A mA : @Tpoint Tn) (_ : @Ps Tn O E A) (_ : @Opp Tn O E E' A mA), @Ng Tn O E mA *)
intros.
(* Goal: @Ng Tn O E mA *)
assert(Ar2 O E E' mA A O).
(* Goal: @Ng Tn O E mA *)
(* Goal: @Ar2 Tn O E E' mA A O *)
unfold Opp in H0.
(* Goal: @Ng Tn O E mA *)
(* Goal: @Ar2 Tn O E E' mA A O *)
apply sum_ar2; auto.
(* Goal: @Ng Tn O E mA *)
unfold Ar2 in H1.
(* Goal: @Ng Tn O E mA *)
apply opp_midpoint in H0.
(* Goal: @Ng Tn O E mA *)
unfold Midpoint in H0.
(* Goal: @Ng Tn O E mA *)
unfold Ps in H.
(* Goal: @Ng Tn O E mA *)
unfold Out in H.
(* Goal: @Ng Tn O E mA *)
spliter.
(* Goal: @Ng Tn O E mA *)
unfold Ng.
(* Goal: and (not (@eq (@Tpoint Tn) mA O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn mA O E)) *)
repeat split.
(* Goal: @Bet Tn mA O E *)
(* Goal: not (@eq (@Tpoint Tn) E O) *)
(* Goal: not (@eq (@Tpoint Tn) mA O) *)
intro.
(* Goal: @Bet Tn mA O E *)
(* Goal: not (@eq (@Tpoint Tn) E O) *)
(* Goal: False *)
subst mA.
(* Goal: @Bet Tn mA O E *)
(* Goal: not (@eq (@Tpoint Tn) E O) *)
(* Goal: False *)
apply H.
(* Goal: @Bet Tn mA O E *)
(* Goal: not (@eq (@Tpoint Tn) E O) *)
(* Goal: @eq (@Tpoint Tn) A O *)
apply cong_identity in H5.
(* Goal: @Bet Tn mA O E *)
(* Goal: not (@eq (@Tpoint Tn) E O) *)
(* Goal: @eq (@Tpoint Tn) A O *)
assumption.
(* Goal: @Bet Tn mA O E *)
(* Goal: not (@eq (@Tpoint Tn) E O) *)
auto.
(* Goal: @Bet Tn mA O E *)
induction H7.
(* Goal: @Bet Tn mA O E *)
(* Goal: @Bet Tn mA O E *)
apply(outer_transitivity_between mA O A E); Between.
(* Goal: @Bet Tn mA O E *)
apply between_symmetry.
(* Goal: @Bet Tn E O mA *)
apply(between_exchange3 A E O mA); Between.
Qed.
Lemma diff_pos_diff_neg : forall O E E' A B AmB BmA,
Diff O E E' A B AmB -> Diff O E E' B A BmA -> Ps O E AmB -> Ng O E BmA.
Proof.
(* Goal: forall (O E E' A B AmB BmA : @Tpoint Tn) (_ : @Diff Tn O E E' A B AmB) (_ : @Diff Tn O E E' B A BmA) (_ : @Ps Tn O E AmB), @Ng Tn O E BmA *)
intros.
(* Goal: @Ng Tn O E BmA *)
assert(Opp O E E' AmB BmA).
(* Goal: @Ng Tn O E BmA *)
(* Goal: @Opp Tn O E E' AmB BmA *)
apply (diff_opp O E E' A B); auto.
(* Goal: @Ng Tn O E BmA *)
eapply (pos_opp_neg O E E' AmB); auto.
Qed.
Lemma not_pos_and_neg : forall O E A, ~(Ps O E A /\ Ng O E A).
Proof.
(* Goal: forall O E A : @Tpoint Tn, not (and (@Ps Tn O E A) (@Ng Tn O E A)) *)
intros.
(* Goal: not (and (@Ps Tn O E A) (@Ng Tn O E A)) *)
intro.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold Ps in H.
(* Goal: False *)
unfold Ng in H0.
(* Goal: False *)
unfold Out in H.
(* Goal: False *)
spliter.
(* Goal: False *)
clean_duplicated_hyps.
(* Goal: False *)
induction H4.
(* Goal: False *)
(* Goal: False *)
apply H.
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) A O *)
apply (between_equality _ _ E); Between.
(* Goal: False *)
apply H3.
(* Goal: @eq (@Tpoint Tn) E O *)
apply (between_equality _ _ A); Between.
Qed.
Lemma leP_asym : forall O E E' A B, LeP O E E' A B -> LeP O E E' B A -> A = B.
Proof.
(* Goal: forall (O E E' A B : @Tpoint Tn) (_ : @LeP Tn O E E' A B) (_ : @LeP Tn O E E' B A), @eq (@Tpoint Tn) A B *)
intros.
(* Goal: @eq (@Tpoint Tn) A B *)
unfold LeP in *.
(* Goal: @eq (@Tpoint Tn) A B *)
induction H; induction H0.
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
unfold LtP in *.
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
ex_and H BmA.
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
ex_and H0 AmB.
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
assert(HH:=diff_pos_diff_neg O E E' A B AmB BmA H0 H H2).
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
assert(HT:=diff_pos_diff_neg O E E' B A BmA AmB H H0 H1).
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
apply False_ind.
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: False *)
assert(HN:=not_pos_and_neg O E AmB).
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: False *)
apply HN.
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: and (@Ps Tn O E AmB) (@Ng Tn O E AmB) *)
split; auto.
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
auto.
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @eq (@Tpoint Tn) A B *)
auto.
(* Goal: @eq (@Tpoint Tn) A B *)
auto.
Qed.
Lemma leP_trans : forall O E E' A B C, LeP O E E' A B -> LeP O E E' B C -> LeP O E E' A C.
Proof.
(* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : @LeP Tn O E E' A B) (_ : @LeP Tn O E E' B C), @LeP Tn O E E' A C *)
intros.
(* Goal: @LeP Tn O E E' A C *)
unfold LeP in *.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
induction H; induction H0.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
left.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @LtP Tn O E E' A C *)
unfold LtP in *.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
ex_and H dBA.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
ex_and H0 dCB.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
assert(Ar2 O E E' B A dBA).
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
(* Goal: @Ar2 Tn O E E' B A dBA *)
apply diff_ar2; auto.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
assert(Ar2 O E E' C B dCB).
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
(* Goal: @Ar2 Tn O E E' C B dCB *)
apply diff_ar2; auto.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
unfold Ar2 in *.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
spliter.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
clean_duplicated_hyps.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
assert(HH:= sum_exists O E E' H3 dBA dCB H10 H7).
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
ex_and HH dCA.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' C A D) (@Ps Tn O E D)) *)
exists dCA.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: and (@Diff Tn O E E' C A dCA) (@Ps Tn O E dCA) *)
assert(HH:= sum_diff_diff_b O E E' A B C dBA dCB dCA H H0).
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: and (@Diff Tn O E E' C A dCA) (@Ps Tn O E dCA) *)
split.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @Ps Tn O E dCA *)
(* Goal: @Diff Tn O E E' C A dCA *)
apply HH.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @Ps Tn O E dCA *)
(* Goal: @Sum Tn O E E' dCB dBA dCA *)
apply sum_comm; auto.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: @Ps Tn O E dCA *)
apply(sum_pos_pos O E E' dBA dCB); auto.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
subst C.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *)
left; auto.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
subst B.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
left; auto.
(* Goal: or (@LtP Tn O E E' A C) (@eq (@Tpoint Tn) A C) *)
subst C.
(* Goal: or (@LtP Tn O E E' A B) (@eq (@Tpoint Tn) A B) *)
subst B.
(* Goal: or (@LtP Tn O E E' A A) (@eq (@Tpoint Tn) A A) *)
right; auto.
Qed.
Lemma leP_sum_leP : forall O E E' A B C X Y Z,
LeP O E E' A X -> LeP O E E' B Y -> Sum O E E' A B C -> Sum O E E' X Y Z ->
LeP O E E' C Z.
Proof.
(* Goal: forall (O E E' A B C X Y Z : @Tpoint Tn) (_ : @LeP Tn O E E' A X) (_ : @LeP Tn O E E' B Y) (_ : @Sum Tn O E E' A B C) (_ : @Sum Tn O E E' X Y Z), @LeP Tn O E E' C Z *)
intros.
(* Goal: @LeP Tn O E E' C Z *)
unfold LeP in *.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
assert(Ar2 O E E' A B C).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ar2 Tn O E E' A B C *)
apply sum_ar2; auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
assert(Ar2 O E E' X Y Z).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ar2 Tn O E E' X Y Z *)
apply sum_ar2; auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
unfold Ar2 in *.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
spliter.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
clean_duplicated_hyps.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
induction H; induction H0.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
unfold LtP in *.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D))) (@eq (@Tpoint Tn) C Z) *)
ex_and H dXA.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D))) (@eq (@Tpoint Tn) C Z) *)
ex_and H0 dYB.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D))) (@eq (@Tpoint Tn) C Z) *)
assert(HH:= diff_exists O E E' Z C H3 H7 H10).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D))) (@eq (@Tpoint Tn) C Z) *)
ex_and HH dZC.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D))) (@eq (@Tpoint Tn) C Z) *)
left.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
exists dZC.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: and (@Diff Tn O E E' Z C dZC) (@Ps Tn O E dZC) *)
split; auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
assert(Sum O E E' dXA dYB dZC).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
(* Goal: @Sum Tn O E E' dXA dYB dZC *)
apply(sum_diff2_diff_sum2_b O E E' A B C X Y Z dXA dYB dZC H1 H2 H H0); auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
apply(sum_pos_pos O E E' dXA dYB); auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
subst Y.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
left.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @LtP Tn O E E' C Z *)
unfold LtP in *.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
ex_and H dXA.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
assert(HH:=diff_exists O E E' Z C H3 H7 H10).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
ex_and HH dZC.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
exists dZC.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: and (@Diff Tn O E E' Z C dZC) (@Ps Tn O E dZC) *)
split; auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
assert(Sum O E E' dXA O dZC).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
(* Goal: @Sum Tn O E E' dXA O dZC *)
apply(sum_diff2_diff_sum2_b O E E' A B C X B Z dXA O dZC); auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
(* Goal: @Diff Tn O E E' B B O *)
apply diff_null; auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
assert(dXA = dZC).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
(* Goal: @eq (@Tpoint Tn) dXA dZC *)
apply(sum_A_O_eq O E E'); auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
subst dXA.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
assumption.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
subst X.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
left.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @LtP Tn O E E' C Z *)
unfold LtP in *.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
ex_and H0 dYB.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
assert(HH:=diff_exists O E E' Z C H3 H7 H10).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
ex_and HH dZC.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Diff Tn O E E' Z C D) (@Ps Tn O E D)) *)
exists dZC.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: and (@Diff Tn O E E' Z C dZC) (@Ps Tn O E dZC) *)
split; auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
assert(Sum O E E' O dYB dZC).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
(* Goal: @Sum Tn O E E' O dYB dZC *)
apply(sum_diff2_diff_sum2_b O E E' A B C A Y Z O dYB dZC); auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
(* Goal: @Diff Tn O E E' A A O *)
apply diff_null; auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
assert(dYB = dZC).
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
(* Goal: @eq (@Tpoint Tn) dYB dZC *)
apply(sum_O_B_eq O E E'); auto.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
subst dYB.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
(* Goal: @Ps Tn O E dZC *)
assumption.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
subst X.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
subst Y.
(* Goal: or (@LtP Tn O E E' C Z) (@eq (@Tpoint Tn) C Z) *)
right.
(* Goal: @eq (@Tpoint Tn) C Z *)
apply(sum_uniqueness O E E' A B); auto.
Qed.
Lemma square_pos : forall O E E' A A2,
O <> A -> Prod O E E' A A A2 -> Ps O E A2.
Proof.
(* Goal: forall (O E E' A A2 : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O A)) (_ : @Prod Tn O E E' A A A2), @Ps Tn O E A2 *)
intros O E E' A A2 HDiff HA2.
(* Goal: @Ps Tn O E A2 *)
assert (HNC : ~ Col O E E') by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @Ps Tn O E A2 *)
assert (HColA : Col O E A) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @Ps Tn O E A2 *)
destruct (opp_exists O E E' HNC A) as [MA HMA]; Col.
(* Goal: @Ps Tn O E A2 *)
assert (HElim := HMA); apply pos_null_neg in HElim.
(* Goal: @Ps Tn O E A2 *)
elim HElim; clear HElim; intro HElim; [apply prod_pos_pos with E' A A; auto|].
(* Goal: @Ps Tn O E A2 *)
elim HElim; clear HElim; intro HPs; [intuition|apply prod_pos_pos with E' MA MA; auto].
(* Goal: @Prod Tn O E E' MA MA A2 *)
destruct (opp_exists O E E' HNC E) as [ME HME]; Col.
(* Goal: @Prod Tn O E E' MA MA A2 *)
apply prod_assoc1 with A ME A; auto; [|apply prod_comm]; apply opp_prod; auto.
(* Goal: @Opp Tn O E E' MA A *)
apply opp_comm; Col.
Qed.
Lemma col_pos_or_neg : forall O E X,
O <> E -> O <> X -> Col O E X -> Ps O E X \/ Ng O E X.
Proof.
(* Goal: forall (O E X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O E)) (_ : not (@eq (@Tpoint Tn) O X)) (_ : @Col Tn O E X), or (@Ps Tn O E X) (@Ng Tn O E X) *)
intros O E X HOE HOX HCol.
(* Goal: or (@Ps Tn O E X) (@Ng Tn O E X) *)
unfold Ps, Ng, Out.
(* Goal: or (and (not (@eq (@Tpoint Tn) X O)) (and (not (@eq (@Tpoint Tn) E O)) (or (@Bet Tn O X E) (@Bet Tn O E X)))) (and (not (@eq (@Tpoint Tn) X O)) (and (not (@eq (@Tpoint Tn) E O)) (@Bet Tn X O E))) *)
unfold Col in HCol; intuition.
Qed.
Lemma ltP_neg : forall O E E' A, LtP O E E' A O -> Ng O E A.
Proof.
(* Goal: forall (O E E' A : @Tpoint Tn) (_ : @LtP Tn O E E' A O), @Ng Tn O E A *)
intros O E E' A HLt.
(* Goal: @Ng Tn O E A *)
destruct HLt as [MA [HDiff HPs]].
(* Goal: @Ng Tn O E A *)
apply opp_pos_neg with E' MA; auto.
(* Goal: @Opp Tn O E E' MA A *)
apply diff_O_A_opp; apply sum_diff; apply sum_comm; try apply diff_sum; auto.
(* Goal: not (@Col Tn O E E') *)
unfold Diff, Opp, Sum, Ar2 in HDiff; destruct HDiff as [MB HXMY]; spliter; Col.
Qed.
Lemma ps_le : forall O E E' X,
~ Col O E E' -> Bet O X E \/ Bet O E X -> LeP O E E' O X.
Proof.
(* Goal: forall (O E E' X : @Tpoint Tn) (_ : not (@Col Tn O E E')) (_ : or (@Bet Tn O X E) (@Bet Tn O E X)), @LeP Tn O E E' O X *)
intros O E E' X HNC HBet.
(* Goal: @LeP Tn O E E' O X *)
elim (eq_dec_points O X); intro HOX; [right; auto|left].
(* Goal: @LtP Tn O E E' O X *)
exists X; split; [apply diff_A_O; induction HBet; Col|].
(* Goal: @Ps Tn O E X *)
assert_diffs; repeat (split; Col).
Qed.
Lemma lt_diff_ps : forall O E E' X Y XMY,
Col O E X -> Col O E Y -> LtP O E E' Y X -> Diff O E E' X Y XMY -> Ps O E XMY.
Proof.
(* Goal: forall (O E E' X Y XMY : @Tpoint Tn) (_ : @Col Tn O E X) (_ : @Col Tn O E Y) (_ : @LtP Tn O E E' Y X) (_ : @Diff Tn O E E' X Y XMY), @Ps Tn O E XMY *)
intros O E E' X Y XMY HCol1 HCol2 HLt HXMY.
(* Goal: @Ps Tn O E XMY *)
destruct HLt as [XMY' [HDiff HPs]].
(* Goal: @Ps Tn O E XMY *)
apply (diff_uniqueness _ _ _ _ _ XMY) in HDiff; treat_equalities; auto.
Qed.
Lemma col_2_le_or_ge : forall O E E' A B,
~ Col O E E' -> Col O E A -> Col O E B -> LeP O E E' A B \/ LeP O E E' B A.
Proof.
(* Goal: forall (O E E' A B : @Tpoint Tn) (_ : not (@Col Tn O E E')) (_ : @Col Tn O E A) (_ : @Col Tn O E B), or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
intros O E E' A B HNC HColA HColB.
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
assert (HDiff1 : O <> E) by (assert_diffs; auto).
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
elim (eq_dec_points A B); intro HDiff2; treat_equalities; [left; right; auto|].
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
destruct (diff_exists O E E' B A) as [D HD]; Col.
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
assert (HColD : Col O E D) by (apply diff_ar2 in HD; unfold Ar2 in *; spliter; Col).
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
assert (HDiff3 : O <> D) by (intro; treat_equalities; apply diff_null_eq in HD; intuition).
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
apply col_pos_or_neg in HColD; auto.
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
elim HColD; clear HColD; intro HNgD; [left; left; exists D; auto|].
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
destruct (diff_exists O E E' A B) as [MD HMD]; Col.
(* Goal: or (@LeP Tn O E E' A B) (@LeP Tn O E E' B A) *)
right; left; exists MD; split; auto; apply opp_neg_pos with E' D; auto.
(* Goal: @Opp Tn O E E' D MD *)
apply diff_opp with B A; auto.
Qed.
Lemma compatibility_of_sum_with_order : forall O E E' A B C APC BPC,
LeP O E E' A B -> Sum O E E' A C APC -> Sum O E E' B C BPC ->
LeP O E E' APC BPC.
Proof.
(* Goal: forall (O E E' A B C APC BPC : @Tpoint Tn) (_ : @LeP Tn O E E' A B) (_ : @Sum Tn O E E' A C APC) (_ : @Sum Tn O E E' B C BPC), @LeP Tn O E E' APC BPC *)
intros O E E' A B C APC BPC HLe HAPC HBPC.
(* Goal: @LeP Tn O E E' APC BPC *)
elim HLe; clear HLe; intro HLe.
(* Goal: @LeP Tn O E E' APC BPC *)
(* Goal: @LeP Tn O E E' APC BPC *)
{
(* Goal: @LeP Tn O E E' APC BPC *)
left; destruct HLe as [D [HDiff HPs]]; exists D; split; auto.
(* Goal: @Diff Tn O E E' BPC APC D *)
assert (HNC : ~ Col O E E') by (apply diff_ar2 in HDiff; unfold Ar2 in *; spliter; Col).
(* Goal: @Diff Tn O E E' BPC APC D *)
apply sum_diff; apply diff_sum in HDiff; apply sum_assoc_1 with C A B; auto; apply sum_comm; auto.
(* BG Goal: @LeP Tn O E E' APC BPC *)
}
(* Goal: @LeP Tn O E E' APC BPC *)
{
(* Goal: @LeP Tn O E E' APC BPC *)
treat_equalities.
(* Goal: @LeP Tn O E E' APC BPC *)
assert (APC = BPC) by (apply sum_uniqueness with O E E' A C; auto).
(* Goal: @LeP Tn O E E' APC BPC *)
treat_equalities; apply leP_refl.
Qed.
Lemma compatibility_of_prod_with_order : forall O E E' A B AB,
LeP O E E' O A -> LeP O E E' O B -> Prod O E E' A B AB ->
LeP O E E' O AB.
Proof.
(* Goal: forall (O E E' A B AB : @Tpoint Tn) (_ : @LeP Tn O E E' O A) (_ : @LeP Tn O E E' O B) (_ : @Prod Tn O E E' A B AB), @LeP Tn O E E' O AB *)
intros O E E' A B AB HLeA HLeB HAB.
(* Goal: @LeP Tn O E E' O AB *)
elim HLeA; clear HLeA; intro HLeA; elim HLeB; clear HLeB; intro HLeB; treat_equalities; try (apply prod_O_l_eq in HAB); try (apply prod_O_r_eq in HAB); treat_equalities; try (apply leP_refl).
(* Goal: @LeP Tn O E E' O AB *)
assert (HNC : ~ Col O E E') by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O AB *)
assert (HColA : Col O E A) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O AB *)
assert (HColB : Col O E B) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O AB *)
assert (HColAB : Col O E AB) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O AB *)
left; exists AB; split; try (apply diff_A_O); Col.
(* Goal: @Ps Tn O E AB *)
destruct HLeA as [A' [HDiff1 HPsA]]; destruct HLeB as [B' [HDiff2 HPsB]].
(* Goal: @Ps Tn O E AB *)
assert (A = A') by (apply diff_uniqueness with O E E' A O; auto; apply diff_A_O; Col).
(* Goal: @Ps Tn O E AB *)
assert (B = B') by (apply diff_uniqueness with O E E' B O; auto; apply diff_A_O; Col).
(* Goal: @Ps Tn O E AB *)
treat_equalities; apply prod_pos_pos with E' A B; auto.
Qed.
Lemma pos_inv_pos : forall O E E' A IA,
O <> A -> LeP O E E' O A -> Prod O E E' IA A E -> LeP O E E' O IA.
Proof.
(* Goal: forall (O E E' A IA : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O A)) (_ : @LeP Tn O E E' O A) (_ : @Prod Tn O E E' IA A E), @LeP Tn O E E' O IA *)
intros O E E' A IA HOA HLe HIA.
(* Goal: @LeP Tn O E E' O IA *)
elim HLe; clear HLe; intro HLe; treat_equalities; [|intuition].
(* Goal: @LeP Tn O E E' O IA *)
assert (HNC : ~ Col O E E') by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O IA *)
assert (HColA : Col O E A) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O IA *)
assert (HColIA : Col O E IA) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O IA *)
destruct (diff_exists O E E' IA O) as [IA' HIA']; Col.
(* Goal: @LeP Tn O E E' O IA *)
assert (IA = IA') by (apply diff_uniqueness with O E E' IA O; auto; apply diff_A_O; Col).
(* Goal: @LeP Tn O E E' O IA *)
treat_equalities; left; exists IA; split; auto; clear HIA'.
(* Goal: @Ps Tn O E IA *)
destruct HLe as [A' [HDiff HPs1]].
(* Goal: @Ps Tn O E IA *)
assert (A = A') by (apply diff_uniqueness with O E E' A O; auto; apply diff_A_O; Col).
(* Goal: @Ps Tn O E IA *)
treat_equalities; clear HDiff; destruct (opp_exists O E E' HNC IA) as [MIA HMIA]; Col.
(* Goal: @Ps Tn O E IA *)
assert (HElim := HMIA); apply pos_null_neg in HElim.
(* Goal: @Ps Tn O E IA *)
elim HElim; clear HElim; intro HElim; auto.
(* Goal: @Ps Tn O E IA *)
elim HElim; clear HElim; intro HPs2; treat_equalities.
(* Goal: @Ps Tn O E IA *)
(* Goal: @Ps Tn O E O *)
{
(* Goal: @Ps Tn O E O *)
assert (O = E) by (apply prod_uniqueness with O E E' O A; auto; apply prod_0_l; Col).
(* Goal: @Ps Tn O E O *)
treat_equalities; intuition.
(* BG Goal: @Ps Tn O E IA *)
}
(* Goal: @Ps Tn O E IA *)
{
(* Goal: @Ps Tn O E IA *)
destruct (opp_exists O E E' HNC E) as [ME HME]; Col.
(* Goal: @Ps Tn O E IA *)
assert (HColME : Col O E ME) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @Ps Tn O E IA *)
assert (HProd1 : Prod O E E' IA ME MIA) by (apply opp_prod; auto).
(* Goal: @Ps Tn O E IA *)
assert (HProd2 : Prod O E E' MIA A ME).
(* Goal: @Ps Tn O E IA *)
(* Goal: @Prod Tn O E E' MIA A ME *)
{
(* Goal: @Prod Tn O E E' MIA A ME *)
apply prod_assoc1 with ME IA E; auto; apply prod_comm; auto; apply prod_1_l; Col.
(* BG Goal: @Ps Tn O E IA *)
}
(* Goal: @Ps Tn O E IA *)
assert (HFalse : Ps O E ME) by (apply prod_pos_pos with E' MIA A; auto).
(* Goal: @Ps Tn O E IA *)
apply opp_pos_neg with O E E' ME E in HFalse; try apply opp_comm; auto.
(* Goal: @Ps Tn O E IA *)
exfalso; apply neg_not_pos in HFalse; apply HFalse.
(* Goal: @Ps Tn O E E *)
assert_diffs; repeat (split; Between).
Qed.
Unset Regular Subst Tactic.
Lemma le_pos_prod_le : forall O E E' A B C AC BC,
LeP O E E' A B -> LeP O E E' O C ->
Prod O E E' A C AC -> Prod 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) (_ : @LeP Tn O E E' O C) (_ : @Prod Tn O E E' A C AC) (_ : @Prod Tn O E E' B C BC), @LeP Tn O E E' AC BC *)
intros O E E' A B C AC BC HALeB HPsC HAC HBC.
(* Goal: @LeP Tn O E E' AC BC *)
assert (HNC : ~ Col O E E') by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AC BC *)
assert (HColA : Col O E A) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AC BC *)
assert (HColB : Col O E B) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AC BC *)
assert (HColC : Col O E C) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AC BC *)
assert (HColAC : Col O E AC) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AC BC *)
assert (HColBC : Col O E BC) by (unfold Prod, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AC BC *)
destruct (diff_exists O E E' BC AC) as [BCMAC HBCMAC]; Col.
(* Goal: @LeP Tn O E E' AC BC *)
apply compatibility_of_sum_with_order with O BCMAC AC; try apply sum_O_B; try (apply sum_comm; try apply diff_sum); Col.
(* Goal: @LeP Tn O E E' O BCMAC *)
destruct (diff_exists O E E' B A) as [BMA HBMA]; Col.
(* Goal: @LeP Tn O E E' O BCMAC *)
assert (HColBMA : Col O E BMA) by (apply diff_ar2 in HBMA; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O BCMAC *)
destruct (prod_exists O E E' HNC BMA C) as [BCMAC' HBCMAC']; Col.
(* Goal: @LeP Tn O E E' O BCMAC *)
assert (H : Diff O E E' BC AC BCMAC').
(* Goal: @LeP Tn O E E' O BCMAC *)
(* Goal: @Diff Tn O E E' BC AC BCMAC' *)
{
(* Goal: @Diff Tn O E E' BC AC BCMAC' *)
apply sum_diff; apply diff_sum in HBMA; apply distr_r with A BMA C B; auto.
(* BG Goal: @LeP Tn O E E' O BCMAC *)
}
(* Goal: @LeP Tn O E E' O BCMAC *)
assert (BCMAC = BCMAC') by (apply diff_uniqueness with O E E' BC AC; auto).
(* Goal: @LeP Tn O E E' O BCMAC *)
clear H; treat_equalities; apply compatibility_of_prod_with_order with BMA C; auto.
(* Goal: @LeP Tn O E E' O BMA *)
destruct (opp_exists O E E' HNC A) as [MA HMA]; Col.
(* Goal: @LeP Tn O E E' O BMA *)
assert (HColMA : Col O E MA) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' O BMA *)
apply compatibility_of_sum_with_order with A B MA; auto; try (apply diff_sum; apply diff_O_A; Col).
(* Goal: @Sum Tn O E E' B MA BMA *)
apply diff_O_A in HMA; Col; apply diff_sum in HBMA; apply diff_sum in HMA.
(* Goal: @Sum Tn O E E' B MA BMA *)
apply sum_assoc_1 with BMA A O; auto; try apply sum_A_O; Col.
(* Goal: @Sum Tn O E E' BMA A B *)
apply sum_comm; auto.
Qed.
Lemma bet_lt12_le23 : forall O E E' A B C,
Bet A B C -> LtP O E E' A B -> LeP O E E' B C.
Lemma bet_lt12_le13 : forall O E E' A B C,
Bet A B C -> LtP O E E' A B -> LeP O E E' A C.
Proof.
(* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @LtP Tn O E E' A B), @LeP Tn O E E' A C *)
intros O E E' A B C HBet HLt.
(* Goal: @LeP Tn O E E' A C *)
apply leP_trans with B; [left; auto|].
(* Goal: @LeP Tn O E E' B C *)
apply bet_lt12_le23 with A; auto.
Qed.
Lemma bet_lt21_le32 : forall O E E' A B C,
Bet A B C -> LtP O E E' B A -> LeP O E E' C B.
Proof.
(* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @LtP Tn O E E' B A), @LeP Tn O E E' C B *)
intros O E E' A B C HBet HLt.
(* Goal: @LeP Tn O E E' C B *)
assert (HNC : ~ Col O E E') by (destruct HLt as [D [H H']]; apply diff_ar2 in H; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
elim (eq_dec_points B C); intro HDiff2; [right; auto|].
(* Goal: @LeP Tn O E E' C B *)
assert (HDiff3 : B <> A) by (apply ltP_neq with O E E'; auto).
(* Goal: @LeP Tn O E E' C B *)
assert (HColA : Col O E A) by (destruct HLt as [D [H H']]; apply diff_ar2 in H; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
assert (HColB : Col O E B) by (destruct HLt as [D [H H']]; apply diff_ar2 in H; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
assert (HColC : Col O E C) by (assert_diffs; assert_cols; ColR).
(* Goal: @LeP Tn O E E' C B *)
destruct (diff_exists O E E' B C) as [BMC HBMC]; Col.
(* Goal: @LeP Tn O E E' C B *)
destruct (opp_exists O E E' HNC A) as [MA HMA]; Col.
(* Goal: @LeP Tn O E E' C B *)
destruct (opp_exists O E E' HNC B) as [MB HMB]; Col.
(* Goal: @LeP Tn O E E' C B *)
destruct (opp_exists O E E' HNC C) as [MC HMC]; Col.
(* Goal: @LeP Tn O E E' C B *)
assert (HColMA : Col O E MA) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
assert (HColMB : Col O E MB) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
assert (HColMC : Col O E MC) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
assert (HColBMC : Col O E BMC) by (apply diff_ar2 in HBMC; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
destruct (diff_exists O E E' A B) as [AMB HAMB]; Col.
(* Goal: @LeP Tn O E E' C B *)
assert (HColAMB : Col O E AMB) by (apply diff_ar2 in HAMB; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
destruct (diff_exists O E E' MA MB) as [MAMMB HMAMMB]; Col.
(* Goal: @LeP Tn O E E' C B *)
assert (HColMAMMB : Col O E MAMMB) by (apply diff_ar2 in HMAMMB; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
assert (HOppAMB : Opp O E E' AMB MAMMB).
(* Goal: @LeP Tn O E E' C B *)
(* Goal: @Opp Tn O E E' AMB MAMMB *)
{
(* Goal: @Opp Tn O E E' AMB MAMMB *)
apply sum_opp; apply sum_assoc_1 with MB A B; [| |apply sum_comm; Col; apply diff_sum; apply diff_O_A; Col].
(* Goal: @Sum Tn O E E' A MAMMB B *)
(* Goal: @Sum Tn O E E' MB A AMB *)
{
(* Goal: @Sum Tn O E E' MB A AMB *)
apply diff_sum in HAMB.
(* Goal: @Sum Tn O E E' MB A AMB *)
apply sum_assoc_2 with B AMB O; auto.
(* Goal: @Sum Tn O E E' O AMB AMB *)
apply sum_O_B; Col.
(* BG Goal: @LeP Tn O E E' C B *)
(* BG Goal: @Sum Tn O E E' A MAMMB B *)
}
(* Goal: @Sum Tn O E E' A MAMMB B *)
{
(* Goal: @Sum Tn O E E' A MAMMB B *)
apply diff_sum in HMAMMB.
(* Goal: @Sum Tn O E E' A MAMMB B *)
apply sum_assoc_2 with MA B O; auto; try apply sum_O_B; Col; [apply diff_sum; apply diff_O_A; Col|].
(* Goal: @Sum Tn O E E' MA B MAMMB *)
apply sum_assoc_1 with MAMMB MB O; auto; [apply sum_comm; auto|].
(* Goal: @Sum Tn O E E' MAMMB O MAMMB *)
apply sum_A_O; Col.
(* BG Goal: @LeP Tn O E E' C B *)
}
(* BG Goal: @LeP Tn O E E' C B *)
}
(* Goal: @LeP Tn O E E' C B *)
destruct (diff_exists O E E' MB MA) as [MBMMA HMBMMA]; Col.
(* Goal: @LeP Tn O E E' C B *)
assert (HColMBMMA : Col O E MBMMA) by (apply diff_ar2 in HMBMMA; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
assert (HOppMAMMB : Opp O E E' MAMMB MBMMA) by (apply diff_opp with MA MB; auto).
(* Goal: @LeP Tn O E E' C B *)
assert (AMB = MBMMA) by (apply opp_uniqueness with O E E' MAMMB; auto; apply opp_comm; auto).
(* Goal: @LeP Tn O E E' C B *)
treat_equalities.
(* Goal: @LeP Tn O E E' C B *)
assert (HBet' : Bet MA MB MC) by (apply l7_15 with A B C O; auto; try apply opp_midpoint with E E'; auto).
(* Goal: @LeP Tn O E E' C B *)
destruct (diff_exists O E E' MB MC) as [MBMMC HMBMMC]; Col.
(* Goal: @LeP Tn O E E' C B *)
assert (HColMAMMC : Col O E MBMMC) by (apply diff_ar2 in HMBMMC; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' C B *)
assert (HOppAMC : Opp O E E' BMC MBMMC).
(* Goal: @LeP Tn O E E' C B *)
(* Goal: @Opp Tn O E E' BMC MBMMC *)
{
(* Goal: @Opp Tn O E E' BMC MBMMC *)
apply sum_opp; apply sum_assoc_1 with MC B C; [| |apply sum_comm; Col; apply diff_sum; apply diff_O_A; Col].
(* Goal: @Sum Tn O E E' B MBMMC C *)
(* Goal: @Sum Tn O E E' MC B BMC *)
{
(* Goal: @Sum Tn O E E' MC B BMC *)
apply diff_sum in HBMC.
(* Goal: @Sum Tn O E E' MC B BMC *)
apply sum_assoc_2 with C BMC O; auto.
(* Goal: @Sum Tn O E E' O BMC BMC *)
apply sum_O_B; Col.
(* BG Goal: @LeP Tn O E E' C B *)
(* BG Goal: @Sum Tn O E E' B MBMMC C *)
}
(* Goal: @Sum Tn O E E' B MBMMC C *)
{
(* Goal: @Sum Tn O E E' B MBMMC C *)
apply diff_sum in HMBMMC.
(* Goal: @Sum Tn O E E' B MBMMC C *)
apply sum_assoc_2 with MB C O; auto; try apply sum_O_B; Col; [apply diff_sum; apply diff_O_A; Col|].
(* Goal: @Sum Tn O E E' MB C MBMMC *)
apply sum_assoc_1 with MBMMC MC O; auto; [apply sum_comm; auto|].
(* Goal: @Sum Tn O E E' MBMMC O MBMMC *)
apply sum_A_O; Col.
(* BG Goal: @LeP Tn O E E' C B *)
}
(* BG Goal: @LeP Tn O E E' C B *)
}
(* Goal: @LeP Tn O E E' C B *)
destruct (diff_exists O E E' MC MB) as [MCMMB HMCMMB]; Col.
(* Goal: @LeP Tn O E E' C B *)
assert (HOppMBMMC : Opp O E E' MBMMC MCMMB) by (apply diff_opp with MB MC; auto).
(* Goal: @LeP Tn O E E' C B *)
assert (BMC = MCMMB) by (apply opp_uniqueness with O E E' MBMMC; auto; apply opp_comm; auto).
(* Goal: @LeP Tn O E E' C B *)
treat_equalities.
(* Goal: @LeP Tn O E E' C B *)
assert (HLt' : LtP O E E' MA MB) by (exists AMB; split; auto; apply lt_diff_ps with E' A B; auto).
(* Goal: @LeP Tn O E E' C B *)
assert (HLe : LeP O E E' MB MC) by (apply bet_lt12_le23 with MA; auto).
(* Goal: @LeP Tn O E E' C B *)
left; exists BMC; split; auto; apply lt_diff_ps with E' MC MB; auto.
(* Goal: @LtP Tn O E E' MB MC *)
elim HLe; clear HLe; intro HFalse; auto; treat_equalities.
(* Goal: @LtP Tn O E E' MB MB *)
assert (O = BMC) by (apply diff_uniqueness with O E E' MB MB; auto; apply diff_null; Col).
(* Goal: @LtP Tn O E E' MB MB *)
treat_equalities; apply diff_null_eq in HBMC; treat_equalities; intuition.
Qed.
Lemma bet_lt21_le31 : forall O E E' A B C,
Bet A B C -> LtP O E E' B A -> LeP O E E' C A.
Proof.
(* Goal: forall (O E E' A B C : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @LtP Tn O E E' B A), @LeP Tn O E E' C A *)
intros O E E' A B C HBet HLt.
(* Goal: @LeP Tn O E E' C A *)
apply leP_trans with B; [|left; auto].
(* Goal: @LeP Tn O E E' C B *)
apply bet_lt21_le32 with A; auto.
Qed.
Lemma opp_2_le_le : forall O E E' A MA B MB,
Opp O E E' A MA -> Opp O E E' B MB -> LeP O E E' A B -> LeP O E E' MB MA.
Proof.
(* Goal: forall (O E E' A MA B MB : @Tpoint Tn) (_ : @Opp Tn O E E' A MA) (_ : @Opp Tn O E E' B MB) (_ : @LeP Tn O E E' A B), @LeP Tn O E E' MB MA *)
intros O E E' A MA B MB HOppA HOppB HLe.
(* Goal: @LeP Tn O E E' MB MA *)
assert (HNC : ~ Col O E E') by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' MB MA *)
assert (HColA : Col O E A) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' MB MA *)
assert (HColMA : Col O E MA) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' MB MA *)
assert (HColB : Col O E B) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' MB MA *)
assert (HColMB : Col O E MB) by (unfold Opp, Sum, Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' MB MA *)
destruct (sum_exists O E E' HNC MA MB) as [MAMB HMAMB]; Col.
(* Goal: @LeP Tn O E E' MB MA *)
assert (HMA : Sum O E E' B MAMB MA) by (apply sum_assoc_2 with MB MA O; apply sum_comm; Col; apply sum_A_O; auto).
(* Goal: @LeP Tn O E E' MB MA *)
assert (HMB : Sum O E E' A MAMB MB) by (apply sum_assoc_2 with MA MB O; try apply sum_O_B; auto; apply sum_comm; auto).
(* Goal: @LeP Tn O E E' MB MA *)
eapply compatibility_of_sum_with_order in HLe; [|apply HMB|apply HMA]; auto.
Qed.
Lemma diff_2_le_le : forall O E E' A B C AMC BMC,
Diff O E E' A C AMC -> Diff O E E' B C BMC -> LeP O E E' A B ->
LeP O E E' AMC BMC.
Proof.
(* Goal: forall (O E E' A B C AMC BMC : @Tpoint Tn) (_ : @Diff Tn O E E' A C AMC) (_ : @Diff Tn O E E' B C BMC) (_ : @LeP Tn O E E' A B), @LeP Tn O E E' AMC BMC *)
intros O E E' A B C AMC BMC HAMC HBMC HLe.
(* Goal: @LeP Tn O E E' AMC BMC *)
assert (HNC : ~ Col O E E') by (apply diff_ar2 in HAMC; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AMC BMC *)
assert (HColC : Col O E C) by (apply diff_ar2 in HAMC; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AMC BMC *)
assert (HColAMC : Col O E AMC) by (apply diff_ar2 in HAMC; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AMC BMC *)
assert (HColBMC : Col O E BMC) by (apply diff_ar2 in HBMC; unfold Ar2 in *; spliter; Col).
(* Goal: @LeP Tn O E E' AMC BMC *)
destruct (opp_exists O E E' HNC C) as [MC HMC]; Col.
(* Goal: @LeP Tn O E E' AMC BMC *)
assert (HAMC' : Sum O E E' A MC AMC).
(* Goal: @LeP Tn O E E' AMC BMC *)
(* Goal: @Sum Tn O E E' A MC AMC *)
{
(* Goal: @Sum Tn O E E' A MC AMC *)
apply diff_sum in HAMC; apply sum_assoc_1 with AMC C O; apply sum_comm; auto; apply sum_O_B; Col.
(* BG Goal: @LeP Tn O E E' AMC BMC *)
}
(* Goal: @LeP Tn O E E' AMC BMC *)
assert (HBMC' : Sum O E E' B MC BMC).
(* Goal: @LeP Tn O E E' AMC BMC *)
(* Goal: @Sum Tn O E E' B MC BMC *)
{
(* Goal: @Sum Tn O E E' B MC BMC *)
apply diff_sum in HBMC; apply sum_assoc_1 with BMC C O; apply sum_comm; auto; apply sum_O_B; Col.
(* BG Goal: @LeP Tn O E E' AMC BMC *)
}
(* Goal: @LeP Tn O E E' AMC BMC *)
apply compatibility_of_sum_with_order with A B MC; auto.
Qed.
End Order.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_samenotopposite.
Require Export GeoCoq.Elements.OriginalProofs.lemma_crisscross.
Require Export GeoCoq.Elements.OriginalProofs.proposition_33.
Section Euclid.
Context `{Ax:euclidean_euclidean}.
Lemma proposition_33B :
forall A B C D,
Par A B C D -> Cong A B C D -> OS A C B D ->
Par A C B D /\ Cong A C B D.
Proof.
(* Goal: forall (A B C D : @Point Ax0) (_ : @Par Ax0 A B C D) (_ : @Cong Ax0 A B C D) (_ : @OS Ax0 A C B D), and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
intros.
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (~ CR A C B D).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
(* Goal: not (@CR Ax0 A C B D) *)
{
(* Goal: not (@CR Ax0 A C B D) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists M, (BetS A M C /\ BetS B M D)) by (conclude_def CR );destruct Tf as [M];spliter.
(* Goal: False *)
assert (Col B M D) by (conclude_def Col ).
(* Goal: False *)
assert (Col B D M) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (nCol A B D) by (forward_using lemma_parallelNC).
(* Goal: False *)
assert (nCol B D A) by (forward_using lemma_NCorder).
(* Goal: False *)
assert (TS A B D C) by (conclude_def TS ).
(* Goal: False *)
assert (~ TS A B D C) by (conclude lemma_samenotopposite).
(* Goal: False *)
contradict.
(* BG Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
}
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (CR A D C B) by (conclude lemma_crisscross).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
let Tf:=fresh in assert (Tf:exists m, (BetS A m D /\ BetS C m B)) by (conclude_def CR );destruct Tf as [m];spliter.
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert (BetS B m C) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
assert ((Par A C B D /\ Cong A C B D)) by (conclude proposition_33).
(* Goal: and (@Par Ax0 A C B D) (@Cong Ax0 A C B D) *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_samesidereflexive.
Require Export GeoCoq.Elements.OriginalProofs.lemma_sameside2.
Require Export GeoCoq.Elements.OriginalProofs.lemma_samesidesymmetric.
Require Export GeoCoq.Elements.OriginalProofs.proposition_12.
Require Export GeoCoq.Elements.OriginalProofs.lemma_8_7.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_notperp :
forall A B C P,
BetS A C B -> nCol A B P ->
exists X, nCol A B X /\ OS X P A B /\ ~ Per A C X.
Proof.
(* Goal: forall (A B C P : @Point Ax0) (_ : @BetS Ax0 A C B) (_ : @nCol Ax0 A B P), @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (neq C B) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (neq B C) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (~ eq C P).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
(* Goal: not (@eq Ax0 C P) *)
{
(* Goal: not (@eq Ax0 C P) *)
intro.
(* Goal: False *)
assert (nCol A B C) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col A C B) by (conclude_def Col ).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
let Tf:=fresh in assert (Tf:exists Q, (BetS B C Q /\ Cong C Q C P)) by (conclude lemma_extension);destruct Tf as [Q];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (~ eq P Q).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
(* Goal: not (@eq Ax0 P Q) *)
{
(* Goal: not (@eq Ax0 P Q) *)
intro.
(* Goal: False *)
assert (Col B C Q) by (conclude_def Col ).
(* Goal: False *)
assert (Col B C P) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col A C B) by (conclude_def Col ).
(* Goal: False *)
assert (Col C B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col C B P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B A P) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B P) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
let Tf:=fresh in assert (Tf:exists M, (BetS P M Q /\ Cong M P M Q)) by (conclude proposition_10);destruct Tf as [M];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Col A C B) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Col C B A) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (neq C B) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Col C B Q) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Col B A Q) by (conclude lemma_collinear4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Col A B Q) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (neq A B) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (OS P P A B) by (conclude lemma_samesidereflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (neq Q P) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (BetS Q M P) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Out Q P M) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Col A Q B) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (OS P M A B) by (conclude lemma_sameside2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (OS M P A B) by (forward_using lemma_samesidesymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (~ Col A B M).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
(* Goal: not (@Col Ax0 A B M) *)
{
(* Goal: not (@Col Ax0 A B M) *)
intro.
(* Goal: False *)
assert (Col B M Q) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col P M Q) by (conclude_def Col ).
(* Goal: False *)
assert (Col M Q P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col M Q B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq M Q) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col Q P B) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col Q B P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col Q B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B Q) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq Q B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B P A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B P) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
let Tf:=fresh in assert (Tf:exists R, Perp_at M R A B R) by (conclude proposition_12);destruct Tf as [R];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
let Tf:=fresh in assert (Tf:exists E, (Col M R R /\ Col A B R /\ Col A B E /\ Per E R M)) by (conclude_def Perp_at );destruct Tf as [E];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Per M R E) by (conclude lemma_8_2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (~ eq M R).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
(* Goal: not (@eq Ax0 M R) *)
{
(* Goal: not (@eq Ax0 M R) *)
intro.
(* Goal: False *)
assert (Col A B M) by (conclude cn_equalitysub).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (neq A C) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
assert (~ Per A C M).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
(* Goal: not (@Per Ax0 A C M) *)
{
(* Goal: not (@Per Ax0 A C M) *)
intro.
(* Goal: False *)
assert (~ neq R C).
(* Goal: False *)
(* Goal: not (@neq Ax0 R C) *)
{
(* Goal: not (@neq Ax0 R C) *)
intro.
(* Goal: False *)
assert (Col B A C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B A R) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A C R) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Per R C M) by (conclude lemma_collinearright).
(* Goal: False *)
assert (~ Per M R C) by (conclude lemma_8_7).
(* Goal: False *)
assert (Per E R M) by (conclude lemma_8_2).
(* Goal: False *)
assert (Col B C R) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col B C E) by (conclude lemma_collinear4).
(* Goal: False *)
assert (neq C B) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq B C) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col C R E) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col E R C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq C R) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Per C R M) by (conclude lemma_collinearright).
(* Goal: False *)
assert (Per M R C) by (conclude lemma_8_2).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (~ eq M C).
(* Goal: False *)
(* Goal: not (@eq Ax0 M C) *)
{
(* Goal: not (@eq Ax0 M C) *)
intro.
(* Goal: False *)
assert (Col A B M) by (conclude cn_equalitysub).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (Cong Q C P C) by (forward_using lemma_congruenceflip).
(* Goal: False *)
assert (BetS Q M P) by (conclude axiom_betweennesssymmetry).
(* Goal: False *)
assert (Cong Q M P M) by (forward_using lemma_doublereverse).
(* Goal: False *)
assert (Per Q M C) by (conclude_def Per ).
(* Goal: False *)
assert (neq C Q) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq Q C) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Per E R M) by (conclude lemma_8_2).
(* Goal: False *)
assert (neq Q R) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col B C Q) by (conclude_def Col ).
(* Goal: False *)
assert (Col C B Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col Q B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B E R) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col B E Q) by (conclude lemma_collinear4).
(* Goal: False *)
assert (~ neq B E).
(* Goal: False *)
(* Goal: not (@neq Ax0 B E) *)
{
(* Goal: not (@neq Ax0 B E) *)
intro.
(* Goal: False *)
assert (Col E R Q) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Per Q R M) by (conclude lemma_collinearright).
(* Goal: False *)
assert (Per Q C M) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Per M C Q) by (conclude lemma_8_2).
(* Goal: False *)
assert (~ Per Q M C) by (conclude lemma_8_7).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (Col A E R) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col A B Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A E Q) by (conclude cn_equalitysub).
(* Goal: False *)
assert (neq A E) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col E R Q) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Per Q R M) by (conclude lemma_collinearright).
(* Goal: False *)
assert (Per Q C M) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Per M C Q) by (conclude lemma_8_2).
(* Goal: False *)
assert (~ Per Q M C) by (conclude lemma_8_7).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@nCol Ax0 A B X) (and (@OS Ax0 X P A B) (not (@Per Ax0 A C X)))) *)
exists M;close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_raystrict.
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinear4.
Require Export GeoCoq.Elements.OriginalProofs.lemma_lessthancongruence.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_crossbar :
forall A B C E U V,
Triangle A B C -> BetS A E C -> Out B A U -> Out B C V ->
exists X, Out B E X /\ BetS U X V.
Proof.
(* Goal: forall (A B C E U V : @Point Ax0) (_ : @Triangle Ax0 A B C) (_ : @BetS Ax0 A E C) (_ : @Out Ax0 B A U) (_ : @Out Ax0 B C V), @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (nCol A B C) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (~ eq B E).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* Goal: not (@eq Ax0 B E) *)
{
(* Goal: not (@eq Ax0 B E) *)
intro.
(* Goal: False *)
assert (~ BetS A B C).
(* Goal: False *)
(* Goal: not (@BetS Ax0 A B C) *)
{
(* Goal: not (@BetS Ax0 A B C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (BetS A B C) by (conclude cn_equalitysub).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (~ eq B A).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* Goal: not (@eq Ax0 B A) *)
{
(* Goal: not (@eq Ax0 B A) *)
intro.
(* Goal: False *)
assert (eq A B) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (~ eq B C).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* 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: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (neq B U) by (conclude lemma_raystrict).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (neq B V) by (conclude lemma_raystrict).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists P, (BetS B A P /\ Cong A P B U)) by (conclude lemma_extension);destruct Tf as [P];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists Q, (BetS B C Q /\ Cong C Q B V)) by (conclude lemma_extension);destruct Tf as [Q];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (~ Col B Q A).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* Goal: not (@Col Ax0 B Q A) *)
{
(* Goal: not (@Col Ax0 B Q A) *)
intro.
(* Goal: False *)
assert (Col Q B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B C Q) by (conclude_def Col ).
(* Goal: False *)
assert (Col Q B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B Q) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq Q B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B A C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists F, (BetS A F Q /\ BetS B E F)) by (conclude postulate_Pasch_outer);destruct Tf as [F];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS Q F A) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (~ Col B P Q).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* Goal: not (@Col Ax0 B P Q) *)
{
(* Goal: not (@Col Ax0 B P Q) *)
intro.
(* Goal: False *)
assert (Col P B Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B A P) by (conclude_def Col ).
(* Goal: False *)
assert (Col P B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B P) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq P B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B Q A) by (conclude lemma_collinear4).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists W, (BetS Q W P /\ BetS B F W)) by (conclude postulate_Pasch_outer);destruct Tf as [W];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS B E W) by (conclude lemma_3_6b).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists J, (BetS J B U /\ BetS J B A)) by (conclude_def Out );destruct Tf as [J];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong A P P A) by (conclude cn_equalityreverse).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong B U A P) by (conclude lemma_congruencesymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong B U P A) by (conclude lemma_congruencetransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong P A B U) by (conclude lemma_congruencesymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS P A B) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Lt B U P B) by (conclude_def Lt ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong P B B P) by (conclude cn_equalityreverse).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Lt B U B P) by (conclude lemma_lessthancongruence).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists S, (BetS B S P /\ Cong B S B U)) by (conclude_def Lt );destruct Tf as [S];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS J B P) by (conclude lemma_3_7b).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS J B S) by (conclude axiom_innertransitivity).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (eq S U) by (conclude lemma_extensionunique).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS B U P) by (conclude cn_equalitysub).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists K, (BetS K B V /\ BetS K B C)) by (conclude_def Out );destruct Tf as [K];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong B V C Q) by (conclude lemma_congruencesymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong C Q Q C) by (conclude cn_equalityreverse).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong B V Q C) by (conclude lemma_congruencetransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong Q C B V) by (conclude lemma_congruencesymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS Q C B) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Lt B V Q B) by (conclude_def Lt ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Cong Q B B Q) by (conclude cn_equalityreverse).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Lt B V B Q) by (conclude lemma_lessthancongruence).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists R, (BetS B R Q /\ Cong B R B V)) by (conclude_def Lt );destruct Tf as [R];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS K B Q) by (conclude lemma_3_7b).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS K B R) by (conclude axiom_innertransitivity).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (eq R V) by (conclude lemma_extensionunique).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS B V Q) by (conclude cn_equalitysub).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (~ Col Q P B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* Goal: not (@Col Ax0 Q P B) *)
{
(* Goal: not (@Col Ax0 Q P B) *)
intro.
(* Goal: False *)
assert (Col B P Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists M, (BetS Q M U /\ BetS B M W)) by (conclude postulate_Pasch_inner);destruct Tf as [M];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS U M Q) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (~ Col U Q B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* Goal: not (@Col Ax0 U Q B) *)
{
(* Goal: not (@Col Ax0 U Q B) *)
intro.
(* Goal: False *)
assert (Col B U P) by (conclude_def Col ).
(* Goal: False *)
assert (Col B U Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B U) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col U B P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col U B Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq U B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B P Q) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col Q P B) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
rename_H H;let Tf:=fresh in assert (Tf:exists H, (BetS U H V /\ BetS B H M)) by (conclude postulate_Pasch_inner);destruct Tf as [H];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (~ eq E B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
(* Goal: not (@eq Ax0 E B) *)
{
(* Goal: not (@eq Ax0 E B) *)
intro.
(* Goal: False *)
assert (eq B E) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
let Tf:=fresh in assert (Tf:exists N, (BetS E B N /\ Cong B N B E)) by (conclude lemma_extension);destruct Tf as [N];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS N B E) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS B H W) by (conclude lemma_3_6b).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS N B W) by (conclude lemma_3_7b).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (BetS N B H) by (conclude axiom_innertransitivity).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
assert (Out B E H) by (conclude_def Out ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 B E X) (@BetS Ax0 U X V)) *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.proposition_10.
Require Export GeoCoq.Elements.OriginalProofs.proposition_15.
Require Export GeoCoq.Elements.OriginalProofs.lemma_equalanglesreflexive.
Require Export GeoCoq.Elements.OriginalProofs.lemma_angleorderrespectscongruence.
Require Export GeoCoq.Elements.OriginalProofs.lemma_angleorderrespectscongruence2.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_16 :
forall A B C D,
Triangle A B C -> BetS B C D ->
LtA B A C A C D /\ LtA C B A A C D.
Proof.
(* Goal: forall (A B C D : @Point Ax0) (_ : @Triangle Ax0 A B C) (_ : @BetS Ax0 B C D), and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
intros.
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (nCol A B C) by (conclude_def Triangle ).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ eq A C).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* 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 (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ eq B C).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* 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 (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq C B) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
let Tf:=fresh in assert (Tf:exists E, (BetS A E C /\ Cong E A E C)) by (conclude proposition_10);destruct Tf as [E];spliter.
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ eq B E).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@eq Ax0 B E) *)
{
(* Goal: not (@eq Ax0 B E) *)
intro.
(* Goal: False *)
assert (BetS A B C) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq E B) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
let Tf:=fresh in assert (Tf:exists F, (BetS B E F /\ Cong E F E B)) by (conclude lemma_extension);destruct Tf as [F];spliter.
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ eq A C).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* 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 (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq C A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq E C) by (forward_using lemma_betweennotequal).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
let Tf:=fresh in assert (Tf:exists G, (BetS A C G /\ Cong C G E C)) by (conclude lemma_extension);destruct Tf as [G];spliter.
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col B E A).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 B E A) *)
{
(* Goal: not (@Col Ax0 B E A) *)
intro.
(* Goal: False *)
assert (Col A E C) by (conclude_def Col ).
(* Goal: False *)
assert (Col E A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col E A C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq A E) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq E A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A B C) by (conclude lemma_collinear4).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B E A C E F) by (conclude proposition_15a).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col A E B).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 A E B) *)
{
(* Goal: not (@Col Ax0 A E B) *)
intro.
(* Goal: False *)
assert (Col B E A) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A E B B E A) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A E B C E F) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Cong B E F E) by (forward_using lemma_doublereverse).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Cong E B E F) by (forward_using lemma_congruenceflip).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col E A B).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 E A B) *)
{
(* Goal: not (@Col Ax0 E A B) *)
intro.
(* Goal: False *)
assert (Col B E A) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert ((Cong A B C F /\ CongA E A B E C F /\ CongA E B A E F C)) by (conclude proposition_04).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col B A E).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 B A E) *)
{
(* Goal: not (@Col Ax0 B A E) *)
intro.
(* Goal: False *)
assert (Col E A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out A C E) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq A B) by (forward_using lemma_angledistinct).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out A B B) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col B A C).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 B A C) *)
{
(* Goal: not (@Col Ax0 B A C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A C B A C) by (conclude lemma_equalanglesreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A C B A E) by (conclude lemma_equalangleshelper).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A E E A B) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A C E A B) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A C E C F) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS C E A) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq C E) by (forward_using lemma_betweennotequal).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C E A) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (eq F F) by (conclude cn_equalityreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col E C F).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 E C F) *)
{
(* Goal: not (@Col Ax0 E C F) *)
intro.
(* Goal: False *)
assert (Col B E F) by (conclude_def Col ).
(* Goal: False *)
assert (Col F E B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col F E C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq E F) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq F E) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col E B C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A E C) by (conclude_def Col ).
(* Goal: False *)
assert (Col E C B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col E C A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq E C) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col C B A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ eq C F).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@eq Ax0 C F) *)
{
(* Goal: not (@eq Ax0 C F) *)
intro.
(* Goal: False *)
assert (Col E C F) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C F F) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA E C F E C F) by (conclude lemma_equalanglesreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA E C F A C F) by (conclude lemma_equalangleshelper).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A C A C F) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS D C B) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS F E B) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col D B F).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 D B F) *)
{
(* Goal: not (@Col Ax0 D B F) *)
intro.
(* Goal: False *)
assert (Col F B D) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B E F) by (conclude_def Col ).
(* Goal: False *)
assert (Col F B E) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B F) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq F B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B D E) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col D B E) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B C D) by (conclude_def Col ).
(* Goal: False *)
assert (Col D B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B D) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq D B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B E C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col E C B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A E C) by (conclude_def Col ).
(* Goal: False *)
assert (Col E C A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq E C) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col C B A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
rename_H H; let Tf:=fresh in assert (Tf:exists H, (BetS D H E /\ BetS F H C)) by (conclude postulate_Pasch_inner);destruct Tf as [H];spliter.
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS C H F) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C F H) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C A A) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A C A C H) by (conclude lemma_equalangleshelper).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A C A C F) by (conclude lemma_equalangleshelper).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS E H D) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C A E) by (conclude lemma_ray5).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (eq D D) by (conclude cn_equalityreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq D C) by (forward_using lemma_betweennotequal).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq C D) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C D D) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B A C A C H) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (LtA B A C A C D) by (conclude_def LtA ).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq B C) by (forward_using lemma_betweennotequal).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
let Tf:=fresh in assert (Tf:exists e, (BetS B e C /\ Cong e B e C)) by (conclude proposition_10);destruct Tf as [e];spliter.
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Col B e C) by (conclude_def Col ).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ eq A e).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@eq Ax0 A e) *)
{
(* Goal: not (@eq Ax0 A e) *)
intro.
(* Goal: False *)
assert (BetS B A C) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col B A C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq e A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
let Tf:=fresh in assert (Tf:exists f, (BetS A e f /\ Cong e f e A)) by (conclude lemma_extension);destruct Tf as [f];spliter.
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ eq B C).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@eq Ax0 B C) *)
{
(* Goal: not (@eq Ax0 B C) *)
intro.
(* Goal: False *)
assert (Col B A C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col A e B).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 A e B) *)
{
(* Goal: not (@Col Ax0 A e B) *)
intro.
(* Goal: False *)
assert (Col B e C) by (conclude_def Col ).
(* Goal: False *)
assert (Col e B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col e B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B e) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq e B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B A C) by (conclude lemma_collinear4).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A e B C e f) by (conclude proposition_15a).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col B e A).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 B e A) *)
{
(* Goal: not (@Col Ax0 B e A) *)
intro.
(* Goal: False *)
assert (Col A e B) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B e A A e B) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA B e A C e f) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Cong A e f e) by (forward_using lemma_doublereverse).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Cong e A e f) by (forward_using lemma_congruenceflip).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col e B A).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 e B A) *)
{
(* Goal: not (@Col Ax0 e B A) *)
intro.
(* Goal: False *)
assert (Col A e B) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert ((Cong B A C f /\ CongA e B A e C f /\ CongA e A B e f C)) by (conclude proposition_04).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col A B e).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 A B e) *)
{
(* Goal: not (@Col Ax0 A B e) *)
intro.
(* Goal: False *)
assert (Col e B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out B C e) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out B A A) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col A B C).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 A B C) *)
{
(* Goal: not (@Col Ax0 A B C) *)
intro.
(* Goal: False *)
assert (Col B A C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B C A B C) by (conclude lemma_equalanglesreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B C A B e) by (conclude lemma_equalangleshelper).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B e e B A) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B C e B A) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B C e C f) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS C e B) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq C e) by (forward_using lemma_betweennotequal).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C e B) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (eq f f) by (conclude cn_equalityreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (nCol e C f) by (conclude lemma_equalanglesNC).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ eq C f).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@eq Ax0 C f) *)
{
(* Goal: not (@eq Ax0 C f) *)
intro.
(* Goal: False *)
assert (Col e C f) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C f f) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col e C f).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 e C f) *)
{
(* Goal: not (@Col Ax0 e C f) *)
intro.
(* Goal: False *)
assert (Col A e f) by (conclude_def Col ).
(* Goal: False *)
assert (Col f e A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col f e C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq e f) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq f e) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col e A C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col e C A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col e C B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq e C) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col C A B) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col B A C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA e C f e C f) by (conclude lemma_equalanglesreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA e C f B C f) by (conclude lemma_equalangleshelper).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B C B C f) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS G C A) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq G C) by (forward_using lemma_betweennotequal).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq C G) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS f e A) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col G A f).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 G A f) *)
{
(* Goal: not (@Col Ax0 G A f) *)
intro.
(* Goal: False *)
assert (Col f A G) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A e f) by (conclude_def Col ).
(* Goal: False *)
assert (Col f A e) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq A f) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq f A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A G e) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col G A e) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A C G) by (conclude_def Col ).
(* Goal: False *)
assert (Col G A C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq A G) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq G A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A e C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col e C A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B e C) by (conclude_def Col ).
(* Goal: False *)
assert (Col e C B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq e C) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col C A B) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
let Tf:=fresh in assert (Tf:exists h, (BetS G h e /\ BetS f h C)) by (conclude postulate_Pasch_inner);destruct Tf as [h];spliter.
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS C h f) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq h C) by (forward_using lemma_betweennotequal).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (neq C h) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C h f) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C f h) by (conclude lemma_ray5).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C B B) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B C B C h) by (conclude lemma_equalangleshelper).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B C B C f) by (conclude lemma_equalangleshelper).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS e h G) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (BetS C e B) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C e B) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C B e) by (conclude lemma_ray5).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (Out C G G) by (conclude lemma_ray4).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A B C B C h) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (LtA A B C B C G) by (conclude_def LtA ).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col G C B).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 G C B) *)
{
(* Goal: not (@Col Ax0 G C B) *)
intro.
(* Goal: False *)
assert (Col A C G) by (conclude_def Col ).
(* Goal: False *)
assert (Col G C A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq C G) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq G C) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col C B A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA G C B D C A) by (conclude proposition_15a).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col A C D).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 A C D) *)
{
(* Goal: not (@Col Ax0 A C D) *)
intro.
(* Goal: False *)
assert (Col D C A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B C D) by (conclude_def Col ).
(* Goal: False *)
assert (Col D C B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq C D) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq D C) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col C A B) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA G C B B C G) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (LtA A B C G C B) by (conclude lemma_angleorderrespectscongruence).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col D C A).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 D C A) *)
{
(* Goal: not (@Col Ax0 D C A) *)
intro.
(* Goal: False *)
assert (Col A C D) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA D C A A C D) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA G C B A C D) by (conclude lemma_equalanglestransitive).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA A C D G C B) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (LtA A B C A C D) by (conclude lemma_angleorderrespectscongruence).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (~ Col C B A).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
(* Goal: not (@Col Ax0 C B A) *)
{
(* Goal: not (@Col Ax0 C B A) *)
intro.
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
}
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (CongA C B A A B C) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
assert (LtA C B A A C D) by (conclude lemma_angleorderrespectscongruence2).
(* Goal: and (@LtA Ax0 B A C A C D) (@LtA Ax0 C B A A C D) *)
close.
Qed.
End Euclid.
|
Require Export Lib_Pred.
Lemma minus_SS_n : forall n : nat, S (S n) - n = 2.
Proof.
(* Goal: forall n : nat, @eq nat (Init.Nat.sub (S (S n)) n) (S (S O)) *)
intros n.
(* Goal: @eq nat (Init.Nat.sub (S (S n)) n) (S (S O)) *)
elim minus_Sn_m.
(* Goal: le n (S n) *)
(* Goal: @eq nat (S (Init.Nat.sub (S n) n)) (S (S O)) *)
apply eq_S.
(* Goal: le n (S n) *)
(* Goal: @eq nat (Init.Nat.sub (S n) n) (S O) *)
elim minus_Sn_m.
(* Goal: le n (S n) *)
(* Goal: le n n *)
(* Goal: @eq nat (S (Init.Nat.sub n n)) (S O) *)
apply eq_S.
(* Goal: le n (S n) *)
(* Goal: le n n *)
(* Goal: @eq nat (Init.Nat.sub n n) O *)
elim minus_n_n; auto with arith.
(* Goal: le n (S n) *)
(* Goal: le n n *)
auto with arith.
(* Goal: le n (S n) *)
auto with arith.
Qed.
Hint Resolve minus_SS_n.
Lemma minus_S : forall n m : nat, n - m = S n - S m.
Proof.
(* Goal: forall n m : nat, @eq nat (Init.Nat.sub n m) (Init.Nat.sub (S n) (S m)) *)
intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve minus_S.
Lemma pred_minus_minus : forall n m : nat, pred (n - m) = n - S m.
Proof.
(* Goal: forall n m : nat, @eq nat (Init.Nat.pred (Init.Nat.sub n m)) (Init.Nat.sub n (S m)) *)
simple induction n; simple induction m; auto with arith.
(* Goal: forall (n : nat) (_ : @eq nat (Init.Nat.pred (Init.Nat.sub (S n0) n)) (Init.Nat.sub (S n0) (S n))), @eq nat (Init.Nat.pred (Init.Nat.sub (S n0) (S n))) (Init.Nat.sub (S n0) (S (S n))) *)
intros; elim minus_S.
(* Goal: @eq nat (Init.Nat.pred (Init.Nat.sub n0 n1)) (Init.Nat.sub (S n0) (S (S n1))) *)
elim minus_S; auto with arith.
Qed.
Hint Resolve pred_minus_minus.
Lemma minus_pred_S : forall n m p : nat, n = m - p -> pred n = m - S p.
Proof.
(* Goal: forall (n m p : nat) (_ : @eq nat n (Init.Nat.sub m p)), @eq nat (Init.Nat.pred n) (Init.Nat.sub m (S p)) *)
intros n m p H.
(* Goal: @eq nat (Init.Nat.pred n) (Init.Nat.sub m (S p)) *)
rewrite H; auto with arith.
Qed.
Hint Resolve minus_pred_S.
Lemma pred_minus : forall n : nat, pred n = n - 1.
Proof.
(* Goal: forall n : nat, @eq nat (Init.Nat.pred n) (Init.Nat.sub n (S O)) *)
simple induction n; auto with arith.
Qed.
Hint Resolve pred_minus.
Lemma O_minus_S : forall n m : nat, 0 = n - m -> 0 = n - S m.
Proof.
(* Goal: forall (n m : nat) (_ : @eq nat O (Init.Nat.sub n m)), @eq nat O (Init.Nat.sub n (S m)) *)
intros n m H.
(* Goal: @eq nat O (Init.Nat.sub n (S m)) *)
elim pred_minus_minus.
(* Goal: @eq nat O (Init.Nat.pred (Init.Nat.sub n m)) *)
elim H; auto with arith.
Qed.
Hint Resolve O_minus_S.
Lemma minus_minus_plus : forall n m p : nat, n - m - p = n - (m + p).
Proof.
(* Goal: forall n m p : nat, @eq nat (Init.Nat.sub (Init.Nat.sub n m) p) (Init.Nat.sub n (Init.Nat.add m p)) *)
simple induction n; simple induction m; auto with arith.
(* Goal: forall (n : nat) (_ : forall p : nat, @eq nat (Init.Nat.sub (Init.Nat.sub (S n0) n) p) (Init.Nat.sub (S n0) (Init.Nat.add n p))) (p : nat), @eq nat (Init.Nat.sub (Init.Nat.sub (S n0) (S n)) p) (Init.Nat.sub (S n0) (Init.Nat.add (S n) p)) *)
intros; elim minus_S.
(* Goal: @eq nat (Init.Nat.sub (Init.Nat.sub n0 n1) p) (Init.Nat.sub (S n0) (Init.Nat.add (S n1) p)) *)
change (n0 - n1 - p = S n0 - S (n1 + p)) in |- *.
(* Goal: @eq nat (Init.Nat.sub (Init.Nat.sub n0 n1) p) (Init.Nat.sub (S n0) (S (Init.Nat.add n1 p))) *)
elim minus_S; apply H.
Qed.
Hint Resolve minus_minus_plus.
Lemma lt_O_minus : forall n m : nat, n < m -> 0 < m - n.
Proof.
(* Goal: forall (n m : nat) (_ : lt n m), lt O (Init.Nat.sub m n) *)
simple induction n; simple induction m; simpl in |- *; auto with arith.
(* Goal: forall _ : lt (S n0) O, lt O O *)
intro.
(* Goal: lt O O *)
apply lt_trans with (S n0); auto with arith.
Qed.
Hint Resolve lt_O_minus.
Lemma le_minus : forall n m : nat, n - m <= n.
Proof.
(* Goal: forall n m : nat, le (Init.Nat.sub n m) n *)
simple induction n; auto with arith.
(* Goal: forall (n : nat) (_ : forall m : nat, le (Init.Nat.sub n m) n) (m : nat), le (Init.Nat.sub (S n) m) (S n) *)
intros.
(* Goal: le (Init.Nat.sub (S n0) m) (S n0) *)
case m; simpl in |- *; auto with arith.
Qed.
Hint Resolve le_minus.
Lemma le_minus_n_Sn : forall n m : nat, n - m <= S n - m.
Proof.
(* Goal: forall n m : nat, le (Init.Nat.sub n m) (Init.Nat.sub (S n) m) *)
simple induction n; simple induction m; auto with arith.
(* Goal: forall (n : nat) (_ : le (Init.Nat.sub (S n0) n) (Init.Nat.sub (S (S n0)) n)), le (Init.Nat.sub (S n0) (S n)) (Init.Nat.sub (S (S n0)) (S n)) *)
intros.
(* Goal: le (Init.Nat.sub (S n0) (S n1)) (Init.Nat.sub (S (S n0)) (S n1)) *)
elim minus_S.
(* Goal: le (Init.Nat.sub n0 n1) (Init.Nat.sub (S (S n0)) (S n1)) *)
elim minus_S; apply H.
Qed.
Hint Resolve le_minus_n_Sn.
Lemma le_reg_minus : forall n m p : nat, n <= m -> n - p <= m - p.
Proof.
(* Goal: forall (n m p : nat) (_ : le n m), le (Init.Nat.sub n p) (Init.Nat.sub m p) *)
intros.
(* Goal: le (Init.Nat.sub n p) (Init.Nat.sub m p) *)
elim H; auto with arith.
(* Goal: forall (m : nat) (_ : le n m) (_ : le (Init.Nat.sub n p) (Init.Nat.sub m p)), le (Init.Nat.sub n p) (Init.Nat.sub (S m) p) *)
intros.
(* Goal: le (Init.Nat.sub n p) (Init.Nat.sub (S m0) p) *)
apply le_trans with (m0 - p).
(* Goal: le (Init.Nat.sub m0 p) (Init.Nat.sub (S m0) p) *)
(* Goal: le (Init.Nat.sub n p) (Init.Nat.sub m0 p) *)
assumption.
(* Goal: le (Init.Nat.sub m0 p) (Init.Nat.sub (S m0) p) *)
apply le_minus_n_Sn.
Qed.
Hint Resolve le_reg_minus.
Lemma lt_transp_r : forall n m p : nat, 0 < n -> p < n + m -> p - m < n.
Proof.
(* Goal: forall (n m p : nat) (_ : lt O n) (_ : lt p (Init.Nat.add n m)), lt (Init.Nat.sub p m) n *)
simple induction m; simple induction p.
(* Goal: forall (n1 : nat) (_ : forall (_ : lt O n) (_ : lt n1 (Init.Nat.add n (S n0))), lt (Init.Nat.sub n1 (S n0)) n) (_ : lt O n) (_ : lt (S n1) (Init.Nat.add n (S n0))), lt (Init.Nat.sub (S n1) (S n0)) n *)
(* Goal: forall (_ : lt O n) (_ : lt O (Init.Nat.add n (S n0))), lt (Init.Nat.sub O (S n0)) n *)
(* Goal: forall (n0 : nat) (_ : forall (_ : lt O n) (_ : lt n0 (Init.Nat.add n O)), lt (Init.Nat.sub n0 O) n) (_ : lt O n) (_ : lt (S n0) (Init.Nat.add n O)), lt (Init.Nat.sub (S n0) O) n *)
(* Goal: forall (_ : lt O n) (_ : lt O (Init.Nat.add n O)), lt (Init.Nat.sub O O) n *)
elim plus_n_O; auto with arith.
(* Goal: forall (n1 : nat) (_ : forall (_ : lt O n) (_ : lt n1 (Init.Nat.add n (S n0))), lt (Init.Nat.sub n1 (S n0)) n) (_ : lt O n) (_ : lt (S n1) (Init.Nat.add n (S n0))), lt (Init.Nat.sub (S n1) (S n0)) n *)
(* Goal: forall (_ : lt O n) (_ : lt O (Init.Nat.add n (S n0))), lt (Init.Nat.sub O (S n0)) n *)
(* Goal: forall (n0 : nat) (_ : forall (_ : lt O n) (_ : lt n0 (Init.Nat.add n O)), lt (Init.Nat.sub n0 O) n) (_ : lt O n) (_ : lt (S n0) (Init.Nat.add n O)), lt (Init.Nat.sub (S n0) O) n *)
elim plus_n_O; auto with arith.
(* Goal: forall (n1 : nat) (_ : forall (_ : lt O n) (_ : lt n1 (Init.Nat.add n (S n0))), lt (Init.Nat.sub n1 (S n0)) n) (_ : lt O n) (_ : lt (S n1) (Init.Nat.add n (S n0))), lt (Init.Nat.sub (S n1) (S n0)) n *)
(* Goal: forall (_ : lt O n) (_ : lt O (Init.Nat.add n (S n0))), lt (Init.Nat.sub O (S n0)) n *)
auto with arith.
(* Goal: forall (n1 : nat) (_ : forall (_ : lt O n) (_ : lt n1 (Init.Nat.add n (S n0))), lt (Init.Nat.sub n1 (S n0)) n) (_ : lt O n) (_ : lt (S n1) (Init.Nat.add n (S n0))), lt (Init.Nat.sub (S n1) (S n0)) n *)
intros.
(* Goal: lt (Init.Nat.sub (S n1) (S n0)) n *)
simpl in |- *.
(* Goal: lt (Init.Nat.sub n1 n0) n *)
apply H.
(* Goal: lt n1 (Init.Nat.add n n0) *)
(* Goal: lt O n *)
auto with arith.
(* Goal: lt n1 (Init.Nat.add n n0) *)
apply lt_S_n.
(* Goal: lt (S n1) (S (Init.Nat.add n n0)) *)
replace (S (n + n0)) with (n + S n0).
(* Goal: @eq nat (Init.Nat.add n (S n0)) (S (Init.Nat.add n n0)) *)
(* Goal: lt (S n1) (Init.Nat.add n (S n0)) *)
auto with arith.
(* Goal: @eq nat (Init.Nat.add n (S n0)) (S (Init.Nat.add n n0)) *)
elim plus_comm; simpl in |- *; auto with arith.
Qed.
Lemma lt_neq_O_pred : forall n m : nat, S n < m -> pred (m - n) <> 0.
Proof.
(* Goal: forall (n m : nat) (_ : lt (S n) m), not (@eq nat (Init.Nat.pred (Init.Nat.sub m n)) O) *)
intros.
(* Goal: not (@eq nat (Init.Nat.pred (Init.Nat.sub m n)) O) *)
elim H.
(* Goal: forall (m : nat) (_ : le (S (S n)) m) (_ : not (@eq nat (Init.Nat.pred (Init.Nat.sub m n)) O)), not (@eq nat (Init.Nat.pred (Init.Nat.sub (S m) n)) O) *)
(* Goal: not (@eq nat (Init.Nat.pred (Init.Nat.sub (S (S n)) n)) O) *)
rewrite minus_SS_n; auto with arith.
(* Goal: forall (m : nat) (_ : le (S (S n)) m) (_ : not (@eq nat (Init.Nat.pred (Init.Nat.sub m n)) O)), not (@eq nat (Init.Nat.pred (Init.Nat.sub (S m) n)) O) *)
intros.
(* Goal: not (@eq nat (Init.Nat.pred (Init.Nat.sub (S m0) n)) O) *)
elim minus_Sn_m.
(* Goal: le n m0 *)
(* Goal: not (@eq nat (Init.Nat.pred (S (Init.Nat.sub m0 n))) O) *)
simpl in |- *.
(* Goal: le n m0 *)
(* Goal: not (@eq nat (Init.Nat.sub m0 n) O) *)
auto with arith.
(* Goal: le n m0 *)
apply le_trans with (S (S n)); auto with arith.
Qed.
Hint Resolve lt_neq_O_pred.
Lemma minus_Sn_n : forall n : nat, S n - n = 1.
Proof.
(* Goal: forall n : nat, @eq nat (Init.Nat.sub (S n) n) (S O) *)
simple induction n; auto with arith.
Qed.
Hint Resolve minus_Sn_n.
Lemma eq_minus_plus : forall n m : nat, m <= n -> n - m + m = n.
Proof.
(* Goal: forall (n m : nat) (_ : le m n), @eq nat (Init.Nat.add (Init.Nat.sub n m) m) n *)
intros n m.
(* Goal: forall _ : le m n, @eq nat (Init.Nat.add (Init.Nat.sub n m) m) n *)
generalize n.
(* Goal: forall (n : nat) (_ : le m n), @eq nat (Init.Nat.add (Init.Nat.sub n m) m) n *)
elim m.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : le n n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 n) n) n0) (n0 : nat) (_ : le (S n) n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 (S n)) (S n)) n0 *)
(* Goal: forall (n : nat) (_ : le O n), @eq nat (Init.Nat.add (Init.Nat.sub n O) O) n *)
clear n.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : le n n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 n) n) n0) (n0 : nat) (_ : le (S n) n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 (S n)) (S n)) n0 *)
(* Goal: forall (n : nat) (_ : le O n), @eq nat (Init.Nat.add (Init.Nat.sub n O) O) n *)
intro n.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : le n n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 n) n) n0) (n0 : nat) (_ : le (S n) n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 (S n)) (S n)) n0 *)
(* Goal: forall _ : le O n, @eq nat (Init.Nat.add (Init.Nat.sub n O) O) n *)
intro lenO.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : le n n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 n) n) n0) (n0 : nat) (_ : le (S n) n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 (S n)) (S n)) n0 *)
(* Goal: @eq nat (Init.Nat.add (Init.Nat.sub n O) O) n *)
elim plus_n_O.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : le n n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 n) n) n0) (n0 : nat) (_ : le (S n) n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 (S n)) (S n)) n0 *)
(* Goal: @eq nat (Init.Nat.sub n O) n *)
auto with arith.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : le n n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 n) n) n0) (n0 : nat) (_ : le (S n) n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 (S n)) (S n)) n0 *)
clear n m.
(* Goal: forall (n : nat) (_ : forall (n0 : nat) (_ : le n n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 n) n) n0) (n0 : nat) (_ : le (S n) n0), @eq nat (Init.Nat.add (Init.Nat.sub n0 (S n)) (S n)) n0 *)
intros m H_rec n leSmn.
(* Goal: @eq nat (Init.Nat.add (Init.Nat.sub n (S m)) (S m)) n *)
elim plus_n_Sm.
(* Goal: @eq nat (S (Init.Nat.add (Init.Nat.sub n (S m)) m)) n *)
replace (S (n - S m + m)) with (S (n - S m) + m); auto with arith.
(* Goal: @eq nat (Init.Nat.add (S (Init.Nat.sub n (S m))) m) n *)
rewrite minus_Sn_m; auto with arith.
(* Goal: @eq nat (Init.Nat.add (Init.Nat.sub (S n) (S m)) m) n *)
apply (H_rec n).
(* Goal: le m n *)
auto with arith.
Qed.
Hint Immediate eq_minus_plus.
|
Require Import Le.
Require Import Lt.
Require Import Plus.
Require Import Gt.
Require Import Minus.
Require Import Mult.
Require Import TS.
Require Import sigma_lift.
Require Import comparith.
Definition e_P1 (b : wsort) (U : TS b) : nat :=
(fix F (w : wsort) (t : TS w) {struct t} : nat :=
match t with
| var n => power2 (S n)
| app t0 t1 => F wt t0 + F wt t1
| lambda t0 => F wt t0 + 2
| env t0 t1 => F wt t0 * F ws t1
| id => 2
| shift => 2
| cons t0 t1 => F wt t0 + F ws t1
| comp t0 t1 => F ws t0 * F ws t1
| lift t0 => F ws t0
| meta_X _ => 2
| meta_x _ => 2
end) b U.
Notation P1 := (e_P1 _) (only parsing).
Theorem gt_P1_1 : forall (b : wsort) (M : TS b), e_P1 _ M > 1.
Proof.
(* Goal: forall (b : wsort) (M : TS b), gt (e_P1 b M) (S O) *)
simple induction M; intros; simpl in |- *; auto with arith.
(* Goal: gt (Nat.add (power2 n) (Nat.add (power2 n) O)) (S O) *)
elim plus_n_O; elim n; simpl in |- *.
(* Goal: forall (n : nat) (_ : gt (Nat.add (power2 n) (power2 n)) (S O)), gt (Nat.add (Nat.add (power2 n) (Nat.add (power2 n) O)) (Nat.add (power2 n) (Nat.add (power2 n) O))) (S O) *)
(* Goal: gt (S (S O)) (S O) *)
auto with arith.
(* Goal: forall (n : nat) (_ : gt (Nat.add (power2 n) (power2 n)) (S O)), gt (Nat.add (Nat.add (power2 n) (Nat.add (power2 n) O)) (Nat.add (power2 n) (Nat.add (power2 n) O))) (S O) *)
intros; elim plus_n_O; auto with arith.
Qed.
Hint Resolve gt_P1_1.
Theorem P1_app : forall M N : terms, reg_app M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_app M N), @eq nat (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_app.
Theorem P1_lambda : forall M N : terms, reg_lambda M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_lambda M N), gt (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros; simpl in |- *; rewrite Mult.mult_plus_distr_r; auto with arith.
Qed.
Hint Resolve P1_lambda.
Theorem P1_clos : forall M N : terms, reg_clos M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_clos M N), @eq nat (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_clos.
Theorem P1_varshift1 :
forall M N : terms, reg_varshift1 M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_varshift1 M N), @eq nat (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros.
(* Goal: @eq nat (e_P1 wt (env (var n) shift)) (e_P1 wt (var (S n))) *)
change (power2 (S n) * 2 = 2 * power2 (S n)) in |- *.
(* Goal: @eq nat (Nat.mul (power2 (S n)) (S (S O))) (Nat.mul (S (S O)) (power2 (S n))) *)
auto with arith.
Qed.
Hint Resolve P1_varshift1.
Theorem P1_varshift2 :
forall M N : terms, reg_varshift2 M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_varshift2 M N), @eq nat (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros.
(* Goal: @eq nat (e_P1 wt (env (var n) (comp shift s))) (e_P1 wt (env (var (S n)) s)) *)
change (power2 (S n) * (2 * e_P1 _ s) = 2 * power2 (S n) * e_P1 _ s) in |- *.
(* Goal: @eq nat (Nat.mul (power2 (S n)) (Nat.mul (S (S O)) (e_P1 ws s))) (Nat.mul (Nat.mul (S (S O)) (power2 (S n))) (e_P1 ws s)) *)
elim mult_permut; auto with arith.
Qed.
Hint Resolve P1_varshift2.
Theorem P1_fvarcons :
forall M N : terms, reg_fvarcons M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_fvarcons M N), gt (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros; simpl in |- *; elim plus_n_O; auto with arith.
Qed.
Hint Resolve P1_fvarcons.
Theorem P1_fvarlift1 :
forall M N : terms, reg_fvarlift1 M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_fvarlift1 M N), gt (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros.
(* Goal: gt (e_P1 wt (env (var O) (lift s))) (e_P1 wt (var O)) *)
change (2 * e_P1 _ s > 2) in |- *.
(* Goal: gt (Nat.mul (S (S O)) (e_P1 ws s)) (S (S O)) *)
auto with arith.
Qed.
Hint Resolve P1_fvarlift1.
Theorem P1_fvarlift2 :
forall M N : terms, reg_fvarlift2 M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_fvarlift2 M N), gt (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros.
(* Goal: gt (e_P1 wt (env (var O) (comp (lift s) t))) (e_P1 wt (env (var O) t)) *)
change (2 * (e_P1 _ s * e_P1 _ t) > 2 * e_P1 _ t) in |- *.
(* Goal: gt (Nat.mul (S (S O)) (Nat.mul (e_P1 ws s) (e_P1 ws t))) (Nat.mul (S (S O)) (e_P1 ws t)) *)
auto with arith.
Qed.
Hint Resolve P1_fvarlift2.
Theorem P1_rvarcons :
forall M N : terms, reg_rvarcons M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_rvarcons M N), gt (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros.
(* Goal: gt (e_P1 wt (env (var (S n)) (cons a s))) (e_P1 wt (env (var n) s)) *)
change (2 * power2 (S n) * (e_P1 _ a + e_P1 _ s) > power2 (S n) * e_P1 _ s) in |- *.
(* Goal: gt (Nat.mul (Nat.mul (S (S O)) (power2 (S n))) (Nat.add (e_P1 wt a) (e_P1 ws s))) (Nat.mul (power2 (S n)) (e_P1 ws s)) *)
rewrite comparith.mult_plus_distr_r; auto with arith.
Qed.
Hint Resolve P1_rvarcons.
Theorem P1_rvarlift1 :
forall M N : terms, reg_rvarlift1 M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_rvarlift1 M N), @eq nat (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros.
(* Goal: @eq nat (e_P1 wt (env (var (S n)) (lift s))) (e_P1 wt (env (var n) (comp s shift))) *)
change (2 * power2 (S n) * e_P1 _ s = power2 (S n) * (e_P1 _ s * 2)) in |- *.
(* Goal: @eq nat (Nat.mul (Nat.mul (S (S O)) (power2 (S n))) (e_P1 ws s)) (Nat.mul (power2 (S n)) (Nat.mul (e_P1 ws s) (S (S O)))) *)
elim mult_assoc_l; elim (mult_permut (power2 (S n)) 2 (e_P1 _ s)).
(* Goal: @eq nat (Nat.mul (power2 (S n)) (Nat.mul (S (S O)) (e_P1 ws s))) (Nat.mul (power2 (S n)) (Nat.mul (e_P1 ws s) (S (S O)))) *)
auto with arith.
Qed.
Hint Resolve P1_rvarlift1.
Theorem P1_rvarlift2 :
forall M N : terms, reg_rvarlift2 M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_rvarlift2 M N), @eq nat (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros.
(* Goal: @eq nat (e_P1 wt (env (var (S n)) (comp (lift s) t))) (e_P1 wt (env (var n) (comp s (comp shift t)))) *)
change (2 * power2 (S n) * (e_P1 _ s * e_P1 _ t) = power2 (S n) * (e_P1 _ s * (2 * e_P1 _ t))) in |- *.
(* Goal: @eq nat (Nat.mul (Nat.mul (S (S O)) (power2 (S n))) (Nat.mul (e_P1 ws s) (e_P1 ws t))) (Nat.mul (power2 (S n)) (Nat.mul (e_P1 ws s) (Nat.mul (S (S O)) (e_P1 ws t)))) *)
elim (mult_sym (power2 (S n)) 2); elim mult_assoc_l; auto with arith.
Qed.
Hint Resolve P1_rvarlift2.
Theorem P1_assenv :
forall M N : sub_explicits, reg_assenv M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_assenv M N), @eq nat (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_assenv.
Theorem P1_mapenv :
forall M N : sub_explicits, reg_mapenv M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_mapenv M N), @eq nat (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_mapenv.
Theorem P1_shiftcons :
forall M N : sub_explicits, reg_shiftcons M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_shiftcons M N), gt (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; elim plus_n_O; auto with arith.
Qed.
Hint Resolve P1_shiftcons.
Theorem P1_shiftlift1 :
forall M N : sub_explicits, reg_shiftlift1 M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_shiftlift1 M N), @eq nat (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; elim plus_n_O; auto with arith.
Qed.
Hint Resolve P1_shiftlift1.
Theorem P1_shiftlift2 :
forall M N : sub_explicits, reg_shiftlift2 M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_shiftlift2 M N), @eq nat (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; do 2 elim plus_n_O; auto with arith.
Qed.
Hint Resolve P1_shiftlift2.
Theorem P1_lift1 :
forall M N : sub_explicits, reg_lift1 M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_lift1 M N), @eq nat (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_lift1.
Theorem P1_lift2 :
forall M N : sub_explicits, reg_lift2 M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_lift2 M N), @eq nat (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_lift2.
Theorem P1_liftenv :
forall M N : sub_explicits, reg_liftenv M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_liftenv M N), gt (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; rewrite comparith.mult_plus_distr_r; auto with arith.
Qed.
Hint Resolve P1_liftenv.
Theorem P1_idl :
forall M N : sub_explicits, reg_idl M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_idl M N), gt (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; elim plus_n_O; auto with arith.
Qed.
Hint Resolve P1_idl.
Theorem P1_idr :
forall M N : sub_explicits, reg_idr M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_idr M N), gt (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_idr.
Theorem P1_liftid :
forall M N : sub_explicits, reg_liftid M N -> e_P1 _ M = e_P1 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_liftid M N), @eq nat (e_P1 ws M) (e_P1 ws N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_liftid.
Theorem P1_id : forall M N : terms, reg_id M N -> e_P1 _ M > e_P1 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_id M N), gt (e_P1 wt M) (e_P1 wt N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P1_id.
|
From mathcomp
Require Import ssreflect ssrbool ssrnat ssrfun eqtype seq.
From LemmaOverloading
Require Import prelude prefix perms heaps.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Structure ctx := Context {heap_ctx : seq heap; ptr_ctx : seq ptr}.
Definition empc := Context [::] [::].
Definition subctx i j :=
prefix (heap_ctx i) (heap_ctx j) /\ prefix (ptr_ctx i) (ptr_ctx j).
Lemma subctx_refl i: subctx i i.
Proof.
(* Goal: subctx i i *)
by [].
Qed.
Lemma subctx_trans j i k :
subctx i j -> subctx j k -> subctx i k.
Proof.
(* Goal: forall (_ : subctx i j) (_ : subctx j k), subctx i k *)
move=>[H1 P1][H2 P2].
(* Goal: subctx i k *)
by split; [move: H2|move: P2]; apply: prefix_trans.
Qed.
Inductive elem := Pts of nat & dynamic | Var of nat.
Definition synheap := seq elem.
Fixpoint valid_ptrs i t :=
match t with
Pts sx _ :: s => (sx < size (ptr_ctx i)) && valid_ptrs i s
| Var _ :: s => valid_ptrs i s
| _ => true
end.
Fixpoint valid_heaps i t :=
match t with
Pts _ _ :: s => valid_heaps i s
| Var v :: s => (v < size (heap_ctx i)) && valid_heaps i s
| _ => true
end.
Definition valid i t := valid_ptrs i t && valid_heaps i t.
Lemma valid_cons i e t : valid i (e :: t) = valid i [:: e] && valid i t.
Proof.
(* Goal: @eq bool (valid i (@cons elem e t)) (andb (valid i (@cons elem e (@nil elem))) (valid i t)) *)
case: e=>[x d|v] /=; rewrite /valid /=; by [rewrite !andbT andbA | rewrite andbT andbCA].
Qed.
Lemma valid_ptrs_cat j t1 t2 :
valid_ptrs j (t1 ++ t2) = valid_ptrs j t1 && valid_ptrs j t2.
Proof.
(* Goal: @eq bool (valid_ptrs j (@cat elem t1 t2)) (andb (valid_ptrs j t1) (valid_ptrs j t2)) *)
elim: t1 t2=>[//|v t1 IH /=] t2.
(* Goal: @eq bool match v with | Pts sx d => andb (leq (S sx) (@size ptr (ptr_ctx j))) (valid_ptrs j (@cat elem t1 t2)) | Var n => valid_ptrs j (@cat elem t1 t2) end (andb match v with | Pts sx d => andb (leq (S sx) (@size ptr (ptr_ctx j))) (valid_ptrs j t1) | Var n => valid_ptrs j t1 end (valid_ptrs j t2)) *)
by case: v=>[x d | v]; rewrite IH // andbA.
Qed.
Lemma valid_heaps_cat j t1 t2 :
valid_heaps j (t1 ++ t2) = valid_heaps j t1 && valid_heaps j t2.
Proof.
(* Goal: @eq bool (valid_heaps j (@cat elem t1 t2)) (andb (valid_heaps j t1) (valid_heaps j t2)) *)
elim: t1 t2=>[//|v t1 IH /=] t2.
(* Goal: @eq bool match v with | Pts n d => valid_heaps j (@cat elem t1 t2) | Var v => andb (leq (S v) (@size heap (heap_ctx j))) (valid_heaps j (@cat elem t1 t2)) end (andb match v with | Pts n d => valid_heaps j t1 | Var v => andb (leq (S v) (@size heap (heap_ctx j))) (valid_heaps j t1) end (valid_heaps j t2)) *)
by case: v=>[x d | v]; rewrite IH // andbA.
Qed.
Lemma valid_cat j t1 t2 : valid j (t1 ++ t2) = valid j t1 && valid j t2.
Proof.
(* Goal: @eq bool (valid j (@cat elem t1 t2)) (andb (valid j t1) (valid j t2)) *)
rewrite /valid valid_ptrs_cat valid_heaps_cat.
(* Goal: @eq bool (andb (andb (valid_ptrs j t1) (valid_ptrs j t2)) (andb (valid_heaps j t1) (valid_heaps j t2))) (andb (andb (valid_ptrs j t1) (valid_heaps j t1)) (andb (valid_ptrs j t2) (valid_heaps j t2))) *)
by rewrite -!andbA -!(andbCA (valid_ptrs j t2)).
Qed.
Lemma valid_subctx i j t : subctx i j -> valid i t -> valid j t.
Proof.
(* Goal: forall (_ : subctx i j) (_ : is_true (valid i t)), is_true (valid j t) *)
case: i j=>hs1 xs1 [hs2 xs2][/= P1 P2].
(* Goal: forall _ : is_true (valid (Context hs1 xs1) t), is_true (valid (Context hs2 xs2) t) *)
elim: t=>[//|e t IH]; rewrite -cat1s 2!valid_cat.
(* Goal: forall _ : is_true (andb (valid (Context hs1 xs1) (@cons elem e (@nil elem))) (valid (Context hs1 xs1) t)), is_true (andb (valid (Context hs2 xs2) (@cons elem e (@nil elem))) (valid (Context hs2 xs2) t)) *)
case/andP=>H; move/IH=>->.
(* Goal: is_true (andb (valid (Context hs2 xs2) (@cons elem e (@nil elem))) true) *)
case: e H=>[x d| v]; rewrite /valid /= !andbT => H; apply: leq_trans H _; by [apply: (prefix_size P2) | apply: (prefix_size P1)].
Qed.
Definition hlook := [fun i => onth (heap_ctx i)].
Definition plook := [fun i => onth (ptr_ctx i)].
Notation plook' i x := (odflt null (plook i x)).
Definition einterp i e :=
match e with
Pts x d =>
if plook i x is Some x'
then x' :-> Dyn.val d
else Undef
| Var h => if hlook i h is Some h' then h' else Undef
end.
Fixpoint interp i t :=
if t is e :: t' then
if t' is [::] then einterp i e else einterp i e :+ interp i t'
else empty.
Lemma interp_cons i e t : interp i (e :: t) = einterp i e :+ interp i t.
Proof.
(* Goal: @eq heap (interp i (@cons elem e t)) (union2 (einterp i e) (interp i t)) *)
by case:t=>//; rewrite unh0.
Qed.
Lemma interp_cat i t1 t2 : interp i (t1 ++ t2) = interp i t1 :+ interp i t2.
Proof.
(* Goal: @eq heap (interp i (@cat elem t1 t2)) (union2 (interp i t1) (interp i t2)) *)
elim:t1 t2=>[/=|e t1 IH] t2; first by rewrite un0h.
(* Goal: @eq heap (interp i (@cat elem (@cons elem e t1) t2)) (union2 (interp i (@cons elem e t1)) (interp i t2)) *)
by rewrite cat_cons !interp_cons IH unA.
Qed.
Lemma interp_perm i : forall t1 t2, perm t1 t2 -> interp i t1 = interp i t2.
Proof.
(* Goal: forall (t1 t2 : list elem) (_ : @perm elem t1 t2), @eq heap (interp i t1) (interp i t2) *)
apply: perm_ind=>[s1 s2 ->-> //|t1 t2 x t1' t2' ->->|x y t1' t2' t ->->|x y t].
(* Goal: forall (_ : @perm elem x t) (_ : @eq heap (interp i x) (interp i t)) (_ : @perm elem t y) (_ : @eq heap (interp i t) (interp i y)), @eq heap (interp i x) (interp i y) *)
(* Goal: @eq heap (interp i (@cons elem t1' (@cons elem t2' t))) (interp i (@cons elem t2' (@cons elem t1' t))) *)
(* Goal: forall (_ : @perm elem t1' t2') (_ : @eq heap (interp i t1') (interp i t2')), @eq heap (interp i (@cons elem x t1')) (interp i (@cons elem x t2')) *)
-
(* Goal: forall (_ : @perm elem x t) (_ : @eq heap (interp i x) (interp i t)) (_ : @perm elem t y) (_ : @eq heap (interp i t) (interp i y)), @eq heap (interp i x) (interp i y) *)
(* Goal: @eq heap (interp i (@cons elem t1' (@cons elem t2' t))) (interp i (@cons elem t2' (@cons elem t1' t))) *)
(* Goal: forall (_ : @perm elem t1' t2') (_ : @eq heap (interp i t1') (interp i t2')), @eq heap (interp i (@cons elem x t1')) (interp i (@cons elem x t2')) *)
by rewrite 2!interp_cons=>_ ->.
(* Goal: forall (_ : @perm elem x t) (_ : @eq heap (interp i x) (interp i t)) (_ : @perm elem t y) (_ : @eq heap (interp i t) (interp i y)), @eq heap (interp i x) (interp i y) *)
(* Goal: @eq heap (interp i (@cons elem t1' (@cons elem t2' t))) (interp i (@cons elem t2' (@cons elem t1' t))) *)
-
(* Goal: forall (_ : @perm elem x t) (_ : @eq heap (interp i x) (interp i t)) (_ : @perm elem t y) (_ : @eq heap (interp i t) (interp i y)), @eq heap (interp i x) (interp i y) *)
(* Goal: @eq heap (interp i (@cons elem t1' (@cons elem t2' t))) (interp i (@cons elem t2' (@cons elem t1' t))) *)
by rewrite !interp_cons unCA.
(* Goal: forall (_ : @perm elem x t) (_ : @eq heap (interp i x) (interp i t)) (_ : @perm elem t y) (_ : @eq heap (interp i t) (interp i y)), @eq heap (interp i x) (interp i y) *)
by move=>_ -> _ ->.
Qed.
Lemma interp_subctx j k t: valid j t -> subctx j k -> interp j t = interp k t.
Proof.
(* Goal: forall (_ : is_true (valid j t)) (_ : subctx j k), @eq heap (interp j t) (interp k t) *)
move=>I [S1 S2]; elim:t I=>[//|e t IH].
(* Goal: forall _ : is_true (valid j (@cons elem e t)), @eq heap (interp j (@cons elem e t)) (interp k (@cons elem e t)) *)
rewrite 2!interp_cons valid_cons; case/andP=>H1.
(* Goal: forall _ : is_true (valid j t), @eq heap (union2 (einterp j e) (interp j t)) (union2 (einterp k e) (interp k t)) *)
move/IH=>->; case: e H1=>[x d|v] /=; rewrite /valid /= !andbT; move/prefix_onth; by [move/(_ _ S2)=>-> | move/(_ _ S1)=>->].
Qed.
Inductive fact :=
eqH of synheap & synheap | eqD of dynamic & dynamic | eqX of nat & nat.
Definition eval_fact i f :=
match f with
| eqH h1 h2 => interp i h1 = interp i h2
| eqD d1 d2 => d1 = d2
| eqX x1 x2 => plook i x1 = plook i x2
end.
Fixpoint eval i s :=
match s with
| [:: f] => eval_fact i f
| (f :: fs) => eval_fact i f /\ eval i fs
| [::] => True
end.
Fixpoint ptrs t : seq nat :=
if t is e :: t' then
if e is Pts x _ then x :: (ptrs t')
else ptrs t'
else [::].
Fixpoint vars t : seq nat :=
if t is e :: t' then
if e is Var h then h :: (vars t')
else vars t'
else [::].
Definition ptreq (x : nat) e := if e is Pts y _ then x == y else false.
Definition vareq (h : nat) e := if e is Var k then h == k else false.
Fixpoint pread x t :=
match t with
Pts y d :: s => if x == y then some d else pread x s
| e :: s => pread x s
| _ => None
end.
Notation pread' x t := (odflt (dyn tt) (pread x t)).
Definition pfree x t := filter (predC (ptreq x)) t.
Definition hfree h t := filter (predC (vareq h)) t.
Fixpoint cancel' (i : ctx) (t1 t2 r : synheap) (f : seq fact) : seq fact :=
match t1 with
| [::] => match r, t2 with
| [::], [::] => f
| [:: Pts x d], [:: Pts x' d'] =>
[:: eqX x x', eqD d d' & f]
| _ , _ => [:: eqH r t2 & f]
end
| Pts x d :: t1' =>
if x \in ptrs t2
then cancel' i t1' (pfree x t2) r [:: eqD d (pread' x t2) & f]
else cancel' i t1' t2 [:: Pts x d & r] f
| Var h :: t1' =>
if h \in vars t2 then cancel' i t1' (hfree h t2) r f
else cancel' i t1' t2 [:: Var h & r] f
end.
Definition cancel i t1 t2 := cancel' i t1 t2 [::] [::].
Lemma eval_cons i f s : eval i (f :: s) <-> eval_fact i f /\ eval i s.
Proof.
(* Goal: iff (eval i (@cons fact f s)) (and (eval_fact i f) (eval i s)) *)
by case:s=>//; split=>//; case.
Qed.
Lemma eval_cat i s1 s2 : eval i (s1 ++ s2) <-> eval i s1 /\ eval i s2.
Proof.
(* Goal: iff (eval i (@cat fact s1 s2)) (and (eval i s1) (eval i s2)) *)
elim: s1=>[/=|f s1 IH]; first tauto.
(* Goal: iff (eval i (@cat fact (@cons fact f s1) s2)) (and (eval i (@cons fact f s1)) (eval i s2)) *)
by rewrite cat_cons !eval_cons IH; tauto.
Qed.
Lemma eval_rcons i f s : eval i (rcons s f) <-> eval i s /\ eval_fact i f.
Proof.
(* Goal: iff (eval i (@rcons fact s f)) (and (eval i s) (eval_fact i f)) *)
by rewrite -cats1 eval_cat.
Qed.
Lemma pfreeE x t :
pfree x t =
if t is e :: t' then
if e is Pts y d then
if x == y then pfree x t' else e :: pfree x t'
else e :: pfree x t'
else [::].
Proof.
(* Goal: @eq (list elem) (pfree x t) match t with | nil => @nil elem | cons (Pts y d as e) t' => if @eq_op nat_eqType x y then pfree x t' else @cons elem e (pfree x t') | cons (Var n as e) t' => @cons elem e (pfree x t') end *)
by elim:t=>[|e t IH] //; case: e=>[y d|] //=; case: eqP.
Qed.
Lemma hfreeE h t :
hfree h t =
if t is e :: t' then
if e is Var k then
if h == k then hfree h t' else e :: hfree h t'
else e :: hfree h t'
else [::].
Proof.
(* Goal: @eq (list elem) (hfree h t) match t with | nil => @nil elem | cons (Pts n d as e) t' => @cons elem e (hfree h t') | cons (Var k as e) t' => if @eq_op nat_eqType h k then hfree h t' else @cons elem e (hfree h t') end *)
by elim:t=>[|e t IH] //; case: e=>[| n] //=; case: eqP.
Qed.
Lemma ptr_has x t : has (ptreq x) t = (x \in ptrs t).
Proof.
(* Goal: @eq bool (@has elem (ptreq x) t) (@in_mem nat x (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (ptrs t))) *)
by elim:t=>[//|e t IH]; case: e=>[y d|//]; rewrite /= inE IH.
Qed.
Lemma var_has h t : has (vareq h) t = (h \in vars t).
Proof.
(* Goal: @eq bool (@has elem (vareq h) t) (@in_mem nat h (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (vars t))) *)
by elim:t=>[//|e t IH]; case: e=>[//|n]; rewrite /= inE IH.
Qed.
Lemma pfreeN x t : x \notin ptrs t -> pfree x t = t.
Proof.
(* Goal: forall _ : is_true (negb (@in_mem (Equality.sort nat_eqType) x (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (ptrs t)))), @eq (list elem) (pfree x t) t *)
rewrite -ptr_has; elim: t=>[|e t IH] //=; rewrite negb_or.
(* Goal: forall _ : is_true (andb (negb (ptreq x e)) (negb (@has elem (ptreq x) t))), @eq (list elem) (if negb (ptreq x e) then @cons elem e (pfree x t) else pfree x t) (@cons elem e t) *)
by case/andP=>->; move/IH=>->.
Qed.
Lemma pfree_subdom i x t :
def (interp i t) -> subdom (interp i (pfree x t)) (interp i t).
Lemma pfree_def i x t: def (interp i t) -> def (interp i (pfree x t)).
Proof.
(* Goal: forall _ : is_true (def (interp i t)), is_true (def (interp i (pfree x t))) *)
by move/(pfree_subdom x); move/subdom_def; move/andP=>[-> _].
Qed.
Lemma hfreeN h t : h \notin vars t -> hfree h t = t.
Proof.
(* Goal: forall _ : is_true (negb (@in_mem (Equality.sort nat_eqType) h (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (vars t)))), @eq (list elem) (hfree h t) t *)
rewrite -var_has; elim: t=>[|e t IH] //=; rewrite negb_or.
(* Goal: forall _ : is_true (andb (negb (vareq h e)) (negb (@has elem (vareq h) t))), @eq (list elem) (if negb (vareq h e) then @cons elem e (hfree h t) else hfree h t) (@cons elem e t) *)
by case/andP=>->; move/IH=>->.
Qed.
Lemma vars_hfree (h1 h2 : nat) t :
has (vareq h1) (hfree h2 t) = (h1 != h2) && (has (vareq h1) t).
Proof.
(* Goal: @eq bool (@has elem (vareq h1) (hfree h2 t)) (andb (negb (@eq_op nat_eqType h1 h2)) (@has elem (vareq h1) t)) *)
elim:t=>[|e t IH]; first by rewrite andbF.
(* Goal: @eq bool (@has elem (vareq h1) (hfree h2 (@cons elem e t))) (andb (negb (@eq_op nat_eqType h1 h2)) (@has elem (vareq h1) (@cons elem e t))) *)
case: e=>[//|n /=].
(* Goal: @eq bool (@has elem (vareq h1) (if negb (@eq_op nat_eqType h2 n) then @cons elem (Var n) (hfree h2 t) else hfree h2 t)) (andb (negb (@eq_op nat_eqType h1 h2)) (orb (@eq_op nat_eqType h1 n) (@has elem (vareq h1) t))) *)
by case: ifP=>/= E; rewrite IH; case: (h1 =P n)=>// ->; rewrite eq_sym E.
Qed.
Lemma hfree_subdom i h t :
def (interp i t) ->
{subset dom (interp i (hfree h t)) <= dom (interp i t)}.
Proof.
(* Goal: forall _ : is_true (def (interp i t)), @sub_mem ptr (@mem ptr (predPredType ptr) (dom (interp i (hfree h t)))) (@mem ptr (predPredType ptr) (dom (interp i t))) *)
elim:t=>[_ x //|e t IH]; rewrite interp_cons /= => D.
(* Goal: @sub_mem ptr (@mem ptr (predPredType ptr) (dom (interp i (if negb (vareq h e) then @cons elem e (hfree h t) else hfree h t)))) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e) (interp i t)))) *)
case: ifP=>_; last first.
(* Goal: @sub_mem ptr (@mem ptr (predPredType ptr) (dom (interp i (@cons elem e (hfree h t))))) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e) (interp i t)))) *)
(* Goal: @sub_mem ptr (@mem ptr (predPredType ptr) (dom (interp i (hfree h t)))) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e) (interp i t)))) *)
-
(* Goal: @sub_mem ptr (@mem ptr (predPredType ptr) (dom (interp i (@cons elem e (hfree h t))))) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e) (interp i t)))) *)
(* Goal: @sub_mem ptr (@mem ptr (predPredType ptr) (dom (interp i (hfree h t)))) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e) (interp i t)))) *)
move=>x; move/(IH (defUnr D)).
(* Goal: @sub_mem ptr (@mem ptr (predPredType ptr) (dom (interp i (@cons elem e (hfree h t))))) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e) (interp i t)))) *)
(* Goal: forall _ : is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (interp i t)))), is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (union2 (einterp i e) (interp i t))))) *)
by rewrite domUn !inE D orbC => ->.
(* Goal: @sub_mem ptr (@mem ptr (predPredType ptr) (dom (interp i (@cons elem e (hfree h t))))) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e) (interp i t)))) *)
rewrite interp_cons => x; rewrite !domUn !inE D /=.
(* Goal: forall _ : is_true (andb (def (union2 (einterp i e) (interp i (hfree h t)))) (orb (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (einterp i e)))) (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (interp i (hfree h t))))))), is_true (@in_mem ptr x (@mem ptr (simplPredType ptr) (@SimplPred ptr (fun x : ptr => @in_mem ptr x (@mem ptr (simplPredType ptr) (@predU ptr (@pred_of_simpl ptr (@pred_of_mem_pred ptr (@mem ptr (predPredType ptr) (dom (einterp i e))))) (@pred_of_simpl ptr (@pred_of_mem_pred ptr (@mem ptr (predPredType ptr) (dom (interp i t))))))))))) *)
case/andP=>D2; case/orP; rewrite ?inE; first by move->.
(* Goal: forall _ : is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (interp i (hfree h t))))), is_true (orb (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (einterp i e)))) (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (interp i t))))) *)
by move/(IH (defUnr D) x)=>->; rewrite orbT.
Qed.
Lemma hfree_subdom' i h t :
def (interp i t) ->
subdom (interp i (hfree h t)) (interp i t).
Lemma hfree_def i h t : def (interp i t) -> def (interp i (hfree h t)).
Proof.
(* Goal: forall _ : is_true (def (interp i t)), is_true (def (interp i (hfree h t))) *)
by move/(hfree_subdom' h); move/subdom_def; move/andP=>[-> _].
Qed.
Lemma count0_hfree v t: count (pred1 v) (vars t) = 0 -> hfree v t = t.
Proof.
(* Goal: forall _ : @eq nat (@count (Equality.sort nat_eqType) (@pred_of_simpl (Equality.sort nat_eqType) (@pred1 nat_eqType v)) (vars t)) O, @eq (list elem) (hfree v t) t *)
by move/eqP; rewrite eqn0Ngt -has_count has_pred1; apply: hfreeN.
Qed.
Lemma count1_hfree v t :
count (pred1 v) (vars t) = 1 -> perm (Var v :: hfree v t) t.
Lemma countN_varfree i v t :
count (pred1 v) (vars t) > 1 -> def (interp i t) ->
hlook i v = Some empty.
Proof.
(* Goal: forall (_ : is_true (leq (S (S O)) (@count (Equality.sort nat_eqType) (@pred_of_simpl (Equality.sort nat_eqType) (@pred1 nat_eqType v)) (vars t)))) (_ : is_true (def (interp i t))), @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i v) (@Some heap empty) *)
elim: t v=>[//|[x d|h] s IH] v H; rewrite interp_cons=>D.
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i v) (@Some heap empty) *)
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i v) (@Some heap empty) *)
-
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i v) (@Some heap empty) *)
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i v) (@Some heap empty) *)
by apply: IH=>//; apply defUnr in D.
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i v) (@Some heap empty) *)
rewrite /= in H.
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i v) (@Some heap empty) *)
case: (h =P v) H=>[<-|_]; last by move/IH; apply; apply: defUnr D.
(* Goal: forall _ : is_true (leq (S (S O)) (addn (nat_of_bool true) (@count nat (@pred_of_simpl nat (@pred1 nat_eqType h)) (vars s)))), @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i h) (@Some heap empty) *)
case H2: (count _ _)=>[//|[|n]] _; last first.
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i h) (@Some heap empty) *)
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i h) (@Some heap empty) *)
-
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i h) (@Some heap empty) *)
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i h) (@Some heap empty) *)
by apply: IH; [rewrite H2 | apply: defUnr D].
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i h) (@Some heap empty) *)
move/count1_hfree: H2=>H2.
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i h) (@Some heap empty) *)
rewrite -(interp_perm i H2) interp_cons unA in D.
(* Goal: @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i h) (@Some heap empty) *)
move: (defUnl D); rewrite defUnhh /=.
(* Goal: forall _ : is_true (empb match @onth heap (heap_ctx i) h with | Some h' => h' | None => Undef end), @eq (option heap) (@onth heap (heap_ctx i) h) (@Some heap empty) *)
by case: (onth _ _)=>// a; move/empP=>->.
Qed.
Lemma empty_hfree i v t :
hlook i v = Some empty -> interp i (hfree v t) = interp i t.
Proof.
(* Goal: forall _ : @eq (option heap) (@fun_of_simpl ctx (forall _ : nat, option heap) hlook i v) (@Some heap empty), @eq heap (interp i (hfree v t)) (interp i t) *)
elim: t=>[//|[x d|v'] t IH] H1; rewrite [hfree _ _]/=.
(* Goal: @eq heap (interp i (if negb (@eq_op nat_eqType v v') then @cons elem (Var v') (hfree v t) else hfree v t)) (interp i (@cons elem (Var v') t)) *)
(* Goal: @eq heap (interp i (@cons elem (Pts x d) (hfree v t))) (interp i (@cons elem (Pts x d) t)) *)
-
(* Goal: @eq heap (interp i (if negb (@eq_op nat_eqType v v') then @cons elem (Var v') (hfree v t) else hfree v t)) (interp i (@cons elem (Var v') t)) *)
(* Goal: @eq heap (interp i (@cons elem (Pts x d) (hfree v t))) (interp i (@cons elem (Pts x d) t)) *)
by rewrite 2!interp_cons IH.
(* Goal: @eq heap (interp i (if negb (@eq_op nat_eqType v v') then @cons elem (Var v') (hfree v t) else hfree v t)) (interp i (@cons elem (Var v') t)) *)
case: ifP=>H2; first by rewrite 2!interp_cons IH.
(* Goal: @eq heap (interp i (hfree v t)) (interp i (@cons elem (Var v') t)) *)
rewrite /= in H1; rewrite -(eqP (negbFE H2)) {}IH //= H1.
(* Goal: @eq heap (interp i t) match t with | nil => empty | cons e l => union2 empty (interp i t) end *)
by case: t=>[//|e s]; rewrite un0h.
Qed.
Lemma domR i (x : nat) t :
def (interp i t) -> has (ptreq x) t ->
plook' i x \in dom (interp i t).
Proof.
(* Goal: forall (_ : is_true (def (interp i t))) (_ : is_true (@has elem (ptreq x) t)), is_true (@in_mem ptr (@Option.default ptr null (@fun_of_simpl ctx (forall _ : nat, option ptr) plook i x)) (@mem ptr (predPredType ptr) (dom (interp i t)))) *)
elim: t x=>[//|e1 t IH] x; rewrite interp_cons /= => D.
(* Goal: forall _ : is_true (orb (ptreq x e1) (@has elem (ptreq x) t)), is_true (@in_mem ptr (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e1) (interp i t))))) *)
case/orP=>E; last by rewrite domUn !inE D (IH _ (defUnr D) E) orbT.
(* Goal: is_true (@in_mem ptr (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (@mem ptr (predPredType ptr) (dom (union2 (einterp i e1) (interp i t))))) *)
rewrite domUn !inE D.
(* Goal: is_true (andb true (orb (@in_mem ptr (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (@mem ptr (predPredType ptr) (dom (einterp i e1)))) (@in_mem ptr (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (@mem ptr (predPredType ptr) (dom (interp i t)))))) *)
case: e1 E D=>//= y d; move/eqP=><-; move/defUnl.
(* Goal: forall _ : is_true (def match @onth ptr (ptr_ctx i) x with | Some x' => @pts (Dyn.typ d) x' (Dyn.val d) | None => Undef end), is_true (orb (@in_mem ptr (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (@mem ptr (predPredType ptr) (dom match @onth ptr (ptr_ctx i) x with | Some x' => @pts (Dyn.typ d) x' (Dyn.val d) | None => Undef end))) (@in_mem ptr (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (@mem ptr (predPredType ptr) (dom (interp i t))))) *)
case: (onth _ _)=>[a|] //=.
(* Goal: forall _ : is_true (def (@pts (Dyn.typ d) a (Dyn.val d))), is_true (orb (@in_mem ptr a (@mem ptr (predPredType ptr) (dom (@pts (Dyn.typ d) a (Dyn.val d))))) (@in_mem ptr a (@mem ptr (predPredType ptr) (dom (interp i t))))) *)
by rewrite defPt domPt !inE eqxx => ->.
Qed.
Lemma lookR i t x :
def (interp i t) -> has (ptreq x) t ->
look (plook' i x) (interp i t) = pread' x t.
Proof.
(* Goal: forall (_ : is_true (def (interp i t))) (_ : is_true (@has elem (ptreq x) t)), @eq Dyn.dynamic (look (@Option.default ptr null (@fun_of_simpl ctx (forall _ : nat, option ptr) plook i x)) (interp i t)) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) (pread x t)) *)
elim: t x=>[//|e1 t IH] x; rewrite interp_cons /=.
(* Goal: forall (_ : is_true (def (union2 (einterp i e1) (interp i t)))) (_ : is_true (orb (ptreq x e1) (@has elem (ptreq x) t))), @eq Dyn.dynamic (look (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e1) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) match e1 with | Pts y d => if @eq_op nat_eqType x y then @Some Dyn.dynamic d else pread x t | Var n => pread x t end) *)
case F: (ptreq x e1)=>/= D E; last first.
(* Goal: @eq Dyn.dynamic (look (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e1) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) match e1 with | Pts y d => if @eq_op nat_eqType x y then @Some Dyn.dynamic d else pread x t | Var n => pread x t end) *)
(* Goal: @eq Dyn.dynamic (look (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e1) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) match e1 with | Pts y d => if @eq_op nat_eqType x y then @Some Dyn.dynamic d else pread x t | Var n => pread x t end) *)
-
(* Goal: @eq Dyn.dynamic (look (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e1) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) match e1 with | Pts y d => if @eq_op nat_eqType x y then @Some Dyn.dynamic d else pread x t | Var n => pread x t end) *)
(* Goal: @eq Dyn.dynamic (look (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e1) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) match e1 with | Pts y d => if @eq_op nat_eqType x y then @Some Dyn.dynamic d else pread x t | Var n => pread x t end) *)
rewrite (lookUnr _ D) (domR (defUnr D) E) (IH _ (defUnr D) E).
(* Goal: @eq Dyn.dynamic (look (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e1) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) match e1 with | Pts y d => if @eq_op nat_eqType x y then @Some Dyn.dynamic d else pread x t | Var n => pread x t end) *)
(* Goal: @eq Dyn.dynamic (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) (pread x t)) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) match e1 with | Pts y d => if @eq_op nat_eqType x y then @Some Dyn.dynamic d else pread x t | Var n => pread x t end) *)
by case: e1 F {D}=>//= y d ->.
(* Goal: @eq Dyn.dynamic (look (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e1) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) match e1 with | Pts y d => if @eq_op nat_eqType x y then @Some Dyn.dynamic d else pread x t | Var n => pread x t end) *)
case: e1 {E} F D=>// y d; move/eqP=><-{y} D.
(* Goal: @eq Dyn.dynamic (look (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i (Pts x d)) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) (if @eq_op nat_eqType x x then @Some Dyn.dynamic d else pread x t)) *)
rewrite (_ : einterp i _ = interp i [:: Pts x d]) // in D *.
rewrite (lookUnl _ D) (domR (defUnl D)) /= ?eqxx //.
move/defUnl: D=>/=; case: (onth _ x)=>[a|] //.
(* Goal: forall _ : is_true (def (@pts (Dyn.typ d) a (Dyn.val d))), @eq Dyn.dynamic (look (@Option.default ptr null (@Some ptr a)) (union2 (@pts (Dyn.typ d) a (Dyn.val d)) (interp i t))) (@Option.default Dyn.dynamic (@Dyn.dyn unit tt) (if @eq_op nat_eqType x x then @Some Dyn.dynamic d else pread x t)) *)
rewrite defPt lookU /= eqxx => ->.
by rewrite -dyn_eta.
Qed.
Qed.
Lemma defR i t : def (interp i t) -> uniq (ptrs t).
Lemma freeR i t x :
def (interp i t) -> has (ptreq x) t ->
free (plook' i x) (interp i t) = interp i (pfree x t).
Proof.
(* Goal: forall (_ : is_true (def (interp i t))) (_ : is_true (@has elem (ptreq x) t)), @eq heap (free (@Option.default ptr null (@fun_of_simpl ctx (forall _ : nat, option ptr) plook i x)) (interp i t)) (interp i (pfree x t)) *)
elim: t=>[//|e t IH]; rewrite interp_cons=>D /=.
(* Goal: forall _ : is_true (orb (ptreq x e) (@has elem (ptreq x) t)), @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) (interp i (if negb (ptreq x e) then @cons elem e (pfree x t) else pfree x t)) *)
case E: (ptreq x e)=>/=; last first.
(* Goal: forall _ : is_true true, @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) (interp i (pfree x t)) *)
(* Goal: forall _ : is_true (@has elem (ptreq x) t), @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) match pfree x t with | nil => einterp i e | cons e0 l => union2 (einterp i e) (interp i (pfree x t)) end *)
-
(* Goal: forall _ : is_true true, @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) (interp i (pfree x t)) *)
(* Goal: forall _ : is_true (@has elem (ptreq x) t), @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) match pfree x t with | nil => einterp i e | cons e0 l => union2 (einterp i e) (interp i (pfree x t)) end *)
move=>H; rewrite freeUnl; first by rewrite (IH (defUnr D) H) -{1}interp_cons.
(* Goal: forall _ : is_true true, @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) (interp i (pfree x t)) *)
(* Goal: is_true (negb (@in_mem ptr (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (@mem ptr (predPredType ptr) (dom (einterp i e))))) *)
case: defUn D=>// D1 D2 L _.
(* Goal: forall _ : is_true true, @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) (interp i (pfree x t)) *)
(* Goal: is_true (negb (@in_mem ptr (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (@mem ptr (predPredType ptr) (dom (einterp i e))))) *)
apply: (contra (L (plook' i x))); rewrite negbK.
(* Goal: forall _ : is_true true, @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) (interp i (pfree x t)) *)
(* Goal: is_true (@in_mem ptr (@Option.default ptr null (@fun_of_simpl ctx (forall _ : nat, option ptr) plook i x)) (@mem ptr (predPredType ptr) (dom (interp i t)))) *)
by apply: domR.
(* Goal: forall _ : is_true true, @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 (einterp i e) (interp i t))) (interp i (pfree x t)) *)
case: e E D=>//= y d; move/eqP=><-{y}.
(* Goal: forall (_ : is_true (def (union2 match @onth ptr (ptr_ctx i) x with | Some x' => @pts (Dyn.typ d) x' (Dyn.val d) | None => Undef end (interp i t)))) (_ : is_true true), @eq heap (free (@Option.default ptr null (@onth ptr (ptr_ctx i) x)) (union2 match @onth ptr (ptr_ctx i) x with | Some x' => @pts (Dyn.typ d) x' (Dyn.val d) | None => Undef end (interp i t))) (interp i (pfree x t)) *)
case F: (onth _ x)=>[a|//] D _.
(* Goal: @eq heap (free (@Option.default ptr null (@Some ptr a)) (union2 (@pts (Dyn.typ d) a (Dyn.val d)) (interp i t))) (interp i (pfree x t)) *)
rewrite freePtUn //= pfreeN // -ptr_has.
(* Goal: is_true (negb (@has elem (ptreq x) t)) *)
apply: contra (defPt_dom D); move/(domR (defPt_def D)).
(* Goal: forall _ : is_true (@in_mem ptr (@Option.default ptr null (@fun_of_simpl ctx (forall _ : nat, option ptr) plook i x)) (@mem ptr (predPredType ptr) (dom (interp i t)))), is_true (@in_mem ptr a (@mem ptr (predPredType ptr) (dom (interp i t)))) *)
by rewrite /= F.
Qed.
Lemma cancel_sound' i sh1 sh2 unm fs :
interp i sh2 = interp i (sh1 ++ unm) ->
def (interp i sh2) -> eval i fs ->
eval i (cancel' i sh1 sh2 unm fs).
Lemma cancel_sound i t1 t2 :
def (interp i t1) -> interp i t1 = interp i t2 ->
eval i (cancel i t1 t2).
Proof.
(* Goal: forall (_ : is_true (def (interp i t1))) (_ : @eq heap (interp i t1) (interp i t2)), eval i (cancel i t1 t2) *)
by move=>D H; apply: cancel_sound'=>//; rewrite -H // cats0.
Qed.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_NChelper.
Require Export GeoCoq.Elements.OriginalProofs.proposition_16.
Require Export GeoCoq.Elements.OriginalProofs.lemma_crossbar.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCdistinct.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCorder.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_17 :
forall A B C,
Triangle A B C ->
exists X Y Z, SumA A B C B C A X Y Z.
Proof.
(* Goal: forall (A B C : @Point Ax0) (_ : @Triangle Ax0 A B C), @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol A B C) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq B C) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
let Tf:=fresh in assert (Tf:exists D, (BetS B C D /\ Cong C D B C)) by (conclude lemma_extension);destruct Tf as [D];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol B C A) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col B C D) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col B C B) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq B D) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol B D A) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol A D B) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (LtA C B A A C D) by (conclude proposition_16).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA A B C C B A) by (conclude lemma_ABCequalsCBA).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (LtA A B C A C D) by (conclude lemma_angleorderrespectscongruence2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
let Tf:=fresh in assert (Tf:exists a d e, (BetS a e d /\ Out C A a /\ Out C D d /\ CongA A B C A C e)) by (conclude_def LtA );destruct Tf as [a[d[e]]];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Out C a A) by (conclude lemma_ray5).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Out C d D) by (conclude lemma_ray5).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col B C D) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col B C C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol B C A) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C D) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol C D A) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col C D C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col C D d) by (conclude lemma_rayimpliescollinear).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C d) by (conclude lemma_ray2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol C d A) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol C A d) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col C A a) by (conclude lemma_rayimpliescollinear).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col C A C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C a) by (conclude lemma_ray2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol C a d) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol a C d) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol D A C) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Triangle a C d) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
let Tf:=fresh in assert (Tf:exists E, (Out C e E /\ BetS A E D)) by (conclude lemma_crossbar);destruct Tf as [E];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Out C E e) by (conclude lemma_ray5).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col A E D) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col D A E) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col D A A) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq A E) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq E A) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol E A C) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol A C E) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol C E A) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col C E e) by (conclude lemma_rayimpliescollinear).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col C E C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C e) by (conclude lemma_ray2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol C e A) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol A C e) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col C A a) by (conclude lemma_rayimpliescollinear).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col A C a) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col A C C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C a) by (conclude lemma_ray2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq a C) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol a C e) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol E C A) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA a C e a C e) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA a C e A C E) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (eq e e) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C e) by (conclude lemma_ray2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Out C e e) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA A C e A C e) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA A C e a C e) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA A B C a C e) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA A B C A C E) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
let Tf:=fresh in assert (Tf:exists F, (BetS A F C /\ BetS B F E)) by (conclude postulate_Pasch_inner);destruct Tf as [F];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol A C B) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col A F C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col A C F) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Col A C C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq F C) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol F C B) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol B C F) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (BetS E F B) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA A C E E C A) by (conclude lemma_ABCequalsCBA).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA A B C E C A) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA E C A E C A) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (BetS C F A) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C F) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Out C F A) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Out C A F) by (conclude lemma_ray5).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (eq E E) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C E) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Out C E E) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA E C A E C F) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA A B C E C F) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (nCol B C A) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA B C A B C A) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (neq C B) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (Out C B B) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA B C A B C F) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA B C F F C B) by (conclude lemma_ABCequalsCBA).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (CongA B C A F C B) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
assert (SumA A B C B C A E C B) by (conclude_def SumA ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => @SumA Ax0 A B C B C A X Y Z))) *)
close.
Qed.
End Euclid.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Sets.
Comments
"We define here the set of parts of a set, inclusion, union of a part,".
Comments
"and we prove that there is no surjection from a set in its part set".
Section Subtype.
Comments "In Coq type theory, there is no primitive notion of subtype".
Comments "Then we have to define such a notion".
Variable E : Setoid.
Variable F : Type.
Variable i : F -> E.
Comments "We have implicitely defined a subset of" E "which is the image of"
i ".".
Comments "As a setoid, this subset has" F
" as carrier, and we identify two elements of" F
"which have the same image by" i ":".
Definition subtype_image_equal (x y : F) : Prop := Equal (i x) (i y).
Lemma subtype_image_equiv : equivalence subtype_image_equal.
Proof.
(* Goal: @equivalence F subtype_image_equal *)
red in |- *.
(* Goal: and (@reflexive F subtype_image_equal) (@partial_equivalence F subtype_image_equal) *)
split; [ try assumption | idtac ].
(* Goal: @partial_equivalence F subtype_image_equal *)
(* Goal: @reflexive F subtype_image_equal *)
red in |- *.
(* Goal: @partial_equivalence F subtype_image_equal *)
(* Goal: forall x : F, @app_rel F subtype_image_equal x x *)
unfold subtype_image_equal in |- *; unfold app_rel in |- *; simpl in |- *; auto with algebra.
(* Goal: @partial_equivalence F subtype_image_equal *)
red in |- *.
(* Goal: and (@transitive F subtype_image_equal) (@symmetric F subtype_image_equal) *)
split; [ try assumption | idtac ].
(* Goal: @symmetric F subtype_image_equal *)
(* Goal: @transitive F subtype_image_equal *)
red in |- *.
(* Goal: @symmetric F subtype_image_equal *)
(* Goal: forall (x y z : F) (_ : @app_rel F subtype_image_equal x y) (_ : @app_rel F subtype_image_equal y z), @app_rel F subtype_image_equal x z *)
unfold subtype_image_equal in |- *; unfold app_rel in |- *; simpl in |- *; auto with algebra.
(* Goal: @symmetric F subtype_image_equal *)
(* Goal: forall (x y z : F) (_ : @Equal E (i x) (i y)) (_ : @Equal E (i y) (i z)), @Equal E (i x) (i z) *)
intros x y z H' H'0; try assumption.
(* Goal: @symmetric F subtype_image_equal *)
(* Goal: @Equal E (i x) (i z) *)
apply Trans with (i y); auto with algebra.
(* Goal: @symmetric F subtype_image_equal *)
red in |- *.
(* Goal: forall (x y : F) (_ : @app_rel F subtype_image_equal x y), @app_rel F subtype_image_equal y x *)
unfold subtype_image_equal in |- *; unfold app_rel in |- *; simpl in |- *; auto with algebra.
Qed.
Definition subtype_image_set : Setoid := Build_Setoid subtype_image_equiv.
End Subtype.
Section Part_type.
Comments "We define now a general structure for this kind of subset:".
Variable E : Setoid.
Record subtype_image : Type :=
{subtype_image_carrier : Type;
subtype_image_inj :> subtype_image_carrier -> E}.
Definition set_of_subtype_image (S : subtype_image) :=
subtype_image_set (subtype_image_inj (s:=S)).
Comments "Parts of" E "will be nothing more than predicates on" E
" which are compatible with equality:".
Definition pred_compatible (P : E -> Prop) : Prop :=
forall x y : E, P x -> Equal y x -> (P y:Prop).
Record Predicate : Type :=
{Pred_fun : E -> Prop; Pred_compatible_prf : pred_compatible Pred_fun:Prop}.
Variable P : Predicate.
Comments "The type of elements of the subset defined by" P
"is the following:".
Record subtype : Type :=
{subtype_elt : E; subtype_prf : Pred_fun P subtype_elt:Prop}.
Comments "Then elements of subsets are composed of an element of" E
"and a proof that they verify the predicate" "given by" P.
Comments "We can now define the subset of" E "defined by the predicate" P ":".
Definition part :=
Build_subtype_image (subtype_image_carrier:=subtype) subtype_elt.
End Part_type.
Comments "We can see a subset as a set with these coercions:".
Coercion set_of_subtype_image : subtype_image >-> Setoid.
Coercion part : Predicate >-> subtype_image.
Comments "We define" (in_part x A) "for elements of" E ":".
Definition in_part (E : Setoid) (x : E) (A : Predicate E) := Pred_fun A x.
Section Part_set.
Variable E : Setoid.
Comments "The equality between parts of" E ":".
Definition eq_part (A B : Predicate E) : Prop :=
forall x : E, (in_part x A -> in_part x B) /\ (in_part x B -> in_part x A).
Let eq_part_equiv : equivalence eq_part.
Proof.
(* Goal: @equivalence (Predicate E) eq_part *)
red in |- *.
(* Goal: and (@reflexive (Predicate E) eq_part) (@partial_equivalence (Predicate E) eq_part) *)
split; [ try assumption | idtac ].
(* Goal: @partial_equivalence (Predicate E) eq_part *)
(* Goal: @reflexive (Predicate E) eq_part *)
red in |- *.
(* Goal: @partial_equivalence (Predicate E) eq_part *)
(* Goal: forall x : Predicate E, @app_rel (Predicate E) eq_part x x *)
unfold eq_part, app_rel in |- *; simpl in |- *.
(* Goal: @partial_equivalence (Predicate E) eq_part *)
(* Goal: forall (x : Predicate E) (x0 : Carrier E), and (forall _ : @in_part E x0 x, @in_part E x0 x) (forall _ : @in_part E x0 x, @in_part E x0 x) *)
intuition.
(* Goal: @partial_equivalence (Predicate E) eq_part *)
red in |- *.
(* Goal: and (@transitive (Predicate E) eq_part) (@symmetric (Predicate E) eq_part) *)
split; [ try assumption | idtac ].
(* Goal: @symmetric (Predicate E) eq_part *)
(* Goal: @transitive (Predicate E) eq_part *)
red in |- *.
(* Goal: @symmetric (Predicate E) eq_part *)
(* Goal: forall (x y z : Predicate E) (_ : @app_rel (Predicate E) eq_part x y) (_ : @app_rel (Predicate E) eq_part y z), @app_rel (Predicate E) eq_part x z *)
unfold eq_part, app_rel in |- *; simpl in |- *.
(* Goal: @symmetric (Predicate E) eq_part *)
(* Goal: forall (x y z : Predicate E) (_ : forall x0 : Carrier E, and (forall _ : @in_part E x0 x, @in_part E x0 y) (forall _ : @in_part E x0 y, @in_part E x0 x)) (_ : forall x0 : Carrier E, and (forall _ : @in_part E x0 y, @in_part E x0 z) (forall _ : @in_part E x0 z, @in_part E x0 y)) (x0 : Carrier E), and (forall _ : @in_part E x0 x, @in_part E x0 z) (forall _ : @in_part E x0 z, @in_part E x0 x) *)
intros x y z H' H'0 x0; try assumption.
(* Goal: @symmetric (Predicate E) eq_part *)
(* Goal: and (forall _ : @in_part E x0 x, @in_part E x0 z) (forall _ : @in_part E x0 z, @in_part E x0 x) *)
elim (H'0 x0); intros H'2 H'3; try exact H'2.
(* Goal: @symmetric (Predicate E) eq_part *)
(* Goal: and (forall _ : @in_part E x0 x, @in_part E x0 z) (forall _ : @in_part E x0 z, @in_part E x0 x) *)
elim (H' x0); intros H'1 H'4; try exact H'1.
(* Goal: @symmetric (Predicate E) eq_part *)
(* Goal: and (forall _ : @in_part E x0 x, @in_part E x0 z) (forall _ : @in_part E x0 z, @in_part E x0 x) *)
intuition.
(* Goal: @symmetric (Predicate E) eq_part *)
red in |- *.
(* Goal: forall (x y : Predicate E) (_ : @app_rel (Predicate E) eq_part x y), @app_rel (Predicate E) eq_part y x *)
unfold eq_part, app_rel in |- *; simpl in |- *.
(* Goal: forall (x y : Predicate E) (_ : forall x0 : Carrier E, and (forall _ : @in_part E x0 x, @in_part E x0 y) (forall _ : @in_part E x0 y, @in_part E x0 x)) (x0 : Carrier E), and (forall _ : @in_part E x0 y, @in_part E x0 x) (forall _ : @in_part E x0 x, @in_part E x0 y) *)
intros x y H' x0; try assumption.
(* Goal: and (forall _ : @in_part E x0 y, @in_part E x0 x) (forall _ : @in_part E x0 x, @in_part E x0 y) *)
elim (H' x0); intros H'2 H'3; try exact H'2.
(* Goal: and (forall _ : @in_part E x0 y, @in_part E x0 x) (forall _ : @in_part E x0 x, @in_part E x0 y) *)
intuition.
Qed.
Comments "We define the set" (part_set E) "of all parts of" E
", with its equality:".
Definition part_set : Setoid := Build_Setoid eq_part_equiv.
Comments "The empty part" (empty E) ":".
Hint Unfold pred_compatible: algebra.
Definition empty : part_set.
Proof.
(* Goal: Carrier part_set *)
apply (Build_Predicate (E:=E) (Pred_fun:=fun x : E => False)).
(* Goal: @pred_compatible E (fun _ : Carrier E => False) *)
auto with algebra.
Qed.
Comments "And the full part:".
Definition full : part_set.
Proof.
(* Goal: Carrier part_set *)
apply (Build_Predicate (E:=E) (Pred_fun:=fun x : E => True)).
(* Goal: @pred_compatible E (fun _ : Carrier E => True) *)
auto with algebra.
Qed.
End Part_set.
Hint Unfold pred_compatible: algebra.
Section Inclusion.
Variable E : Setoid.
Comments "The relation of belonging is compatible with equality:".
Lemma in_part_comp_l :
forall (A : part_set E) (x y : E), in_part x A -> Equal y x -> in_part y A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E) (_ : @in_part E x A) (_ : @Equal E y x), @in_part E y A *)
intros A; try assumption.
(* Goal: forall (x y : Carrier E) (_ : @in_part E x A) (_ : @Equal E y x), @in_part E y A *)
exact (Pred_compatible_prf (E:=E) (p:=A)).
Qed.
Lemma in_part_comp_r :
forall (x : E) (A B : part_set E), in_part x A -> Equal A B -> in_part x B.
Proof.
(* Goal: forall (x : Carrier E) (A B : Carrier (part_set E)) (_ : @in_part E x A) (_ : @Equal (part_set E) A B), @in_part E x B *)
simpl in |- *; unfold eq_part in |- *.
(* Goal: forall (x : Carrier E) (A B : Predicate E) (_ : @in_part E x A) (_ : forall x0 : Carrier E, and (forall _ : @in_part E x0 A, @in_part E x0 B) (forall _ : @in_part E x0 B, @in_part E x0 A)), @in_part E x B *)
intros x A B H' H'0; try assumption.
(* Goal: @in_part E x B *)
elim (H'0 x).
(* Goal: forall (_ : forall _ : @in_part E x A, @in_part E x B) (_ : forall _ : @in_part E x B, @in_part E x A), @in_part E x B *)
intuition.
Qed.
Lemma empty_prop : forall x : E, ~ in_part x (empty E).
Proof.
(* Goal: forall x : Carrier E, not (@in_part E x (empty E)) *)
unfold not in |- *; auto with algebra.
Qed.
Hint Resolve empty_prop: algebra.
Lemma full_prop : forall x : E, in_part x (full E).
Proof.
(* Goal: forall x : Carrier E, @in_part E x (full E) *)
unfold full in |- *; simpl in |- *; auto with algebra.
Qed.
Hint Resolve full_prop: algebra.
Definition full_to_set : MAP (full E) E.
Proof.
(* Goal: Carrier (MAP (@set_of_subtype_image E (@part E (full E))) E) *)
apply (Build_Map (Ap:=fun x : full E => full E x)).
(* Goal: @fun_compatible (@set_of_subtype_image E (@part E (full E))) E (fun x : Carrier (@set_of_subtype_image E (@part E (full E))) => @subtype_image_inj E (@part E (full E)) x) *)
red in |- *.
(* Goal: forall (x y : Carrier (@set_of_subtype_image E (@part E (full E)))) (_ : @Equal (@set_of_subtype_image E (@part E (full E))) x y), @Equal E (@subtype_image_inj E (@part E (full E)) x) (@subtype_image_inj E (@part E (full E)) y) *)
intros x y; try assumption.
(* Goal: forall _ : @Equal (@set_of_subtype_image E (@part E (full E))) x y, @Equal E (@subtype_image_inj E (@part E (full E)) x) (@subtype_image_inj E (@part E (full E)) y) *)
elim x.
(* Goal: forall (subtype_elt : Carrier E) (subtype_prf : @Pred_fun E (full E) subtype_elt) (_ : @Equal (@set_of_subtype_image E (@part E (full E))) (@Build_subtype E (full E) subtype_elt subtype_prf) y), @Equal E (@subtype_image_inj E (@part E (full E)) (@Build_subtype E (full E) subtype_elt subtype_prf)) (@subtype_image_inj E (@part E (full E)) y) *)
elim y.
(* Goal: forall (subtype_elt : Carrier E) (subtype_prf : @Pred_fun E (full E) subtype_elt) (subtype_elt0 : Carrier E) (subtype_prf0 : @Pred_fun E (full E) subtype_elt0) (_ : @Equal (@set_of_subtype_image E (@part E (full E))) (@Build_subtype E (full E) subtype_elt0 subtype_prf0) (@Build_subtype E (full E) subtype_elt subtype_prf)), @Equal E (@subtype_image_inj E (@part E (full E)) (@Build_subtype E (full E) subtype_elt0 subtype_prf0)) (@subtype_image_inj E (@part E (full E)) (@Build_subtype E (full E) subtype_elt subtype_prf)) *)
simpl in |- *.
(* Goal: forall (subtype_elt0 : Carrier E) (subtype_prf : True) (subtype_elt1 : Carrier E) (subtype_prf0 : True) (_ : @subtype_image_equal E (@subtype E (full E)) (@subtype_elt E (full E)) (@Build_subtype E (full E) subtype_elt1 subtype_prf0) (@Build_subtype E (full E) subtype_elt0 subtype_prf)), @Equal E subtype_elt1 subtype_elt0 *)
unfold subtype_image_equal in |- *.
(* Goal: forall (subtype_elt0 : Carrier E) (subtype_prf : True) (subtype_elt1 : Carrier E) (subtype_prf0 : True) (_ : @Equal E (@subtype_elt E (full E) (@Build_subtype E (full E) subtype_elt1 subtype_prf0)) (@subtype_elt E (full E) (@Build_subtype E (full E) subtype_elt0 subtype_prf))), @Equal E subtype_elt1 subtype_elt0 *)
simpl in |- *; auto with algebra.
Qed.
Definition set_to_full : MAP E (full E).
Proof.
(* Goal: Carrier (MAP E (@set_of_subtype_image E (@part E (full E)))) *)
apply (Build_Map (A:=E) (B:=full E) (Ap:=fun x : E => Build_subtype (E:=E) (P:=full E) (subtype_elt:=x) (full_prop x))).
(* Goal: @fun_compatible E (@set_of_subtype_image E (@part E (full E))) (fun x : Carrier E => @Build_subtype E (full E) x (full_prop x)) *)
red in |- *.
(* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal (@set_of_subtype_image E (@part E (full E))) (@Build_subtype E (full E) x (full_prop x)) (@Build_subtype E (full E) y (full_prop y)) *)
simpl in |- *; auto with algebra.
Qed.
Lemma set_full_set : Equal (comp_map_map full_to_set set_to_full) (Id E).
Proof.
(* Goal: @Equal (MAP E E) (@comp_map_map E (@set_of_subtype_image E (@part E (full E))) E full_to_set set_to_full) (Id E) *)
simpl in |- *; auto with algebra.
(* Goal: @Map_eq E E (@comp_map_map E (@set_of_subtype_image E (@part E (full E))) E full_to_set set_to_full) (Id E) *)
red in |- *.
(* Goal: forall x : Carrier E, @Equal E (@Ap E E (@comp_map_map E (@set_of_subtype_image E (@part E (full E))) E full_to_set set_to_full) x) (@Ap E E (Id E) x) *)
simpl in |- *; auto with algebra.
Qed.
Lemma full_set_full :
Equal (comp_map_map set_to_full full_to_set) (Id (full E)).
Proof.
(* Goal: @Equal (MAP (@set_of_subtype_image E (@part E (full E))) (@set_of_subtype_image E (@part E (full E)))) (@comp_map_map (@set_of_subtype_image E (@part E (full E))) E (@set_of_subtype_image E (@part E (full E))) set_to_full full_to_set) (Id (@set_of_subtype_image E (@part E (full E)))) *)
simpl in |- *; auto with algebra.
(* Goal: @Map_eq (@set_of_subtype_image E (@part E (full E))) (@set_of_subtype_image E (@part E (full E))) (@comp_map_map (@set_of_subtype_image E (@part E (full E))) E (@set_of_subtype_image E (@part E (full E))) set_to_full full_to_set) (Id (@set_of_subtype_image E (@part E (full E)))) *)
red in |- *.
(* Goal: forall x : Carrier (@set_of_subtype_image E (@part E (full E))), @Equal (@set_of_subtype_image E (@part E (full E))) (@Ap (@set_of_subtype_image E (@part E (full E))) (@set_of_subtype_image E (@part E (full E))) (@comp_map_map (@set_of_subtype_image E (@part E (full E))) E (@set_of_subtype_image E (@part E (full E))) set_to_full full_to_set) x) (@Ap (@set_of_subtype_image E (@part E (full E))) (@set_of_subtype_image E (@part E (full E))) (Id (@set_of_subtype_image E (@part E (full E)))) x) *)
simpl in |- *; auto with algebra.
(* Goal: forall x : @subtype E (full E), @subtype_image_equal E (@subtype E (full E)) (@subtype_elt E (full E)) (@Build_subtype E (full E) (@subtype_elt E (full E) x) (full_prop (@subtype_elt E (full E) x))) x *)
intros x; try assumption.
(* Goal: @subtype_image_equal E (@subtype E (full E)) (@subtype_elt E (full E)) (@Build_subtype E (full E) (@subtype_elt E (full E) x) (full_prop (@subtype_elt E (full E) x))) x *)
elim x.
(* Goal: forall (subtype_elt0 : Carrier E) (subtype_prf : @Pred_fun E (full E) subtype_elt0), @subtype_image_equal E (@subtype E (full E)) (@subtype_elt E (full E)) (@Build_subtype E (full E) (@subtype_elt E (full E) (@Build_subtype E (full E) subtype_elt0 subtype_prf)) (full_prop (@subtype_elt E (full E) (@Build_subtype E (full E) subtype_elt0 subtype_prf)))) (@Build_subtype E (full E) subtype_elt0 subtype_prf) *)
simpl in |- *; auto with algebra.
(* Goal: forall (subtype_elt0 : Carrier E) (subtype_prf : True), @subtype_image_equal E (@subtype E (full E)) (@subtype_elt E (full E)) (@Build_subtype E (full E) subtype_elt0 (full_prop subtype_elt0)) (@Build_subtype E (full E) subtype_elt0 subtype_prf) *)
intros subtype_elt' subtype_prf'; red in |- *.
(* Goal: @Equal E (@subtype_elt E (full E) (@Build_subtype E (full E) subtype_elt' (full_prop subtype_elt'))) (@subtype_elt E (full E) (@Build_subtype E (full E) subtype_elt' subtype_prf')) *)
simpl in |- *; auto with algebra.
Qed.
Comments "The inclusion of parts:".
Definition included (A B : part_set E) : Prop :=
forall x : E, in_part x A -> in_part x B.
Comments "The relation of inclusion is an order relation:".
Lemma included_refl : forall A : part_set E, included A A.
Proof.
(* Goal: forall A : Carrier (part_set E), included A A *)
simpl in |- *; unfold included in |- *; auto with algebra.
Qed.
Hint Resolve included_refl: algebra.
Lemma included_antisym :
forall A B : part_set E, included A B -> included B A -> Equal A B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : included A B) (_ : included B A), @Equal (part_set E) A B *)
simpl in |- *; unfold eq_part, included in |- *; auto with algebra.
Qed.
Lemma included_trans :
forall A B C : part_set E, included A B -> included B C -> included A C.
Proof.
(* Goal: forall (A B C : Carrier (part_set E)) (_ : included A B) (_ : included B C), included A C *)
simpl in |- *; unfold included in |- *; auto with algebra.
Qed.
Comments "The inclusion relation is compatible with equality:".
Lemma included_comp :
forall A A' B B' : part_set E,
Equal A A' -> Equal B B' -> included A B -> included A' B'.
Proof.
(* Goal: forall (A A' B B' : Carrier (part_set E)) (_ : @Equal (part_set E) A A') (_ : @Equal (part_set E) B B') (_ : included A B), included A' B' *)
simpl in |- *; unfold eq_part, included in |- *.
(* Goal: forall (A A' B B' : Predicate E) (_ : forall x : Carrier E, and (forall _ : @in_part E x A, @in_part E x A') (forall _ : @in_part E x A', @in_part E x A)) (_ : forall x : Carrier E, and (forall _ : @in_part E x B, @in_part E x B') (forall _ : @in_part E x B', @in_part E x B)) (_ : forall (x : Carrier E) (_ : @in_part E x A), @in_part E x B) (x : Carrier E) (_ : @in_part E x A'), @in_part E x B' *)
intros A A' B B' H' H'0 H'1 x H'2; try assumption.
(* Goal: @in_part E x B' *)
elim (H'0 x); intros H'4 H'5; apply H'4.
(* Goal: @in_part E x B *)
lapply (H'1 x); [ intros H'6; apply H'6 | idtac ].
(* Goal: @in_part E x A *)
elim (H' x); intros H'6 H'7; apply H'7; auto with algebra.
Qed.
Lemma eq_part_included : forall A B : part_set E, Equal A B -> included A B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : @Equal (part_set E) A B), included A B *)
simpl in |- *; unfold eq_part, included in |- *.
(* Goal: forall (A B : Predicate E) (_ : forall x : Carrier E, and (forall _ : @in_part E x A, @in_part E x B) (forall _ : @in_part E x B, @in_part E x A)) (x : Carrier E) (_ : @in_part E x A), @in_part E x B *)
intros A B H' x H'0; try assumption.
(* Goal: @in_part E x B *)
specialize H' with (x := x); rename H' into H'1; try exact H'1.
(* Goal: @in_part E x B *)
elim H'1; intros H'2 H'3; try exact H'2; clear H'1; auto with algebra.
Qed.
Hint Resolve eq_part_included: algebra.
Lemma empty_included : forall A : part_set E, included (empty E) A.
Proof.
(* Goal: forall A : Carrier (part_set E), included (empty E) A *)
simpl in |- *; unfold included in |- *; auto with algebra.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : @in_part E x (empty E)), @in_part E x A *)
intros A x H'; try assumption.
(* Goal: @in_part E x A *)
absurd (in_part x (empty E)); auto with algebra.
Qed.
Lemma full_included : forall A : part_set E, included A (full E).
Proof.
(* Goal: forall A : Carrier (part_set E), included A (full E) *)
simpl in |- *; unfold included in |- *; auto with algebra.
Qed.
Hint Resolve empty_included full_included: algebra.
Definition inj_part : forall A : part_set E, MAP A E.
Proof.
(* Goal: forall A : Carrier (part_set E), Carrier (MAP (@set_of_subtype_image E (@part E A)) E) *)
intros A; try assumption.
(* Goal: Carrier (MAP (@set_of_subtype_image E (@part E A)) E) *)
apply (Build_Map (Ap:=fun x : A => subtype_elt x)).
(* Goal: @fun_compatible (@set_of_subtype_image E (@part E A)) E (fun x : Carrier (@set_of_subtype_image E (@part E A)) => @subtype_elt E A x) *)
red in |- *.
(* Goal: forall (x y : Carrier (@set_of_subtype_image E (@part E A))) (_ : @Equal (@set_of_subtype_image E (@part E A)) x y), @Equal E (@subtype_elt E A x) (@subtype_elt E A y) *)
auto with algebra.
Qed.
Lemma inj_part_injective : forall A : part_set E, injective (inj_part A).
Proof.
(* Goal: forall A : Carrier (part_set E), @injective (@set_of_subtype_image E (@part E A)) E (inj_part A) *)
intros A; try assumption.
(* Goal: @injective (@set_of_subtype_image E (@part E A)) E (inj_part A) *)
red in |- *.
(* Goal: forall (x y : Carrier (@set_of_subtype_image E (@part E A))) (_ : @Equal E (@Ap (@set_of_subtype_image E (@part E A)) E (inj_part A) x) (@Ap (@set_of_subtype_image E (@part E A)) E (inj_part A) y)), @Equal (@set_of_subtype_image E (@part E A)) x y *)
auto with algebra.
Qed.
Definition inj_part_included :
forall A B : part_set E, included A B -> MAP A B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : included A B), Carrier (MAP (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B))) *)
intros A B H'; try assumption.
(* Goal: Carrier (MAP (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B))) *)
red in H'.
(* Goal: Carrier (MAP (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B))) *)
apply (Build_Map (A:=A) (B:=B) (Ap:=fun x : A => Build_subtype (H' (A x) (subtype_prf (E:=E) (P:=A) x)))).
(* Goal: @fun_compatible (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (fun x : Carrier (@set_of_subtype_image E (@part E A)) => @Build_subtype E B (@subtype_image_inj E (@part E A) x) (H' (@subtype_image_inj E (@part E A) x) (@subtype_prf E A x))) *)
red in |- *.
(* Goal: forall (x y : Carrier (@set_of_subtype_image E (@part E A))) (_ : @Equal (@set_of_subtype_image E (@part E A)) x y), @Equal (@set_of_subtype_image E (@part E B)) (@Build_subtype E B (@subtype_image_inj E (@part E A) x) (H' (@subtype_image_inj E (@part E A) x) (@subtype_prf E A x))) (@Build_subtype E B (@subtype_image_inj E (@part E A) y) (H' (@subtype_image_inj E (@part E A) y) (@subtype_prf E A y))) *)
simpl in |- *; auto with algebra.
Qed.
Lemma inj_part_included_prop :
forall (A B : part_set E) (p : included A B) (x : A),
Equal (B (inj_part_included p x)) (A x).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (p : included A B) (x : Carrier (@set_of_subtype_image E (@part E A))), @Equal E (@subtype_image_inj E (@part E B) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) x)) (@subtype_image_inj E (@part E A) x) *)
simpl in |- *; auto with algebra.
Qed.
Lemma inj_part_included_injective :
forall (A B : part_set E) (p : included A B),
injective (inj_part_included p).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (p : included A B), @injective (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) *)
intros A B p; red in |- *.
(* Goal: forall (x y : Carrier (@set_of_subtype_image E (@part E A))) (_ : @Equal (@set_of_subtype_image E (@part E B)) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) x) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) y)), @Equal (@set_of_subtype_image E (@part E A)) x y *)
intros x y; try assumption.
(* Goal: forall _ : @Equal (@set_of_subtype_image E (@part E B)) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) x) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) y), @Equal (@set_of_subtype_image E (@part E A)) x y *)
elim x.
(* Goal: forall (subtype_elt : Carrier E) (subtype_prf : @Pred_fun E A subtype_elt) (_ : @Equal (@set_of_subtype_image E (@part E B)) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) (@Build_subtype E A subtype_elt subtype_prf)) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) y)), @Equal (@set_of_subtype_image E (@part E A)) (@Build_subtype E A subtype_elt subtype_prf) y *)
elim y.
(* Goal: forall (subtype_elt : Carrier E) (subtype_prf : @Pred_fun E A subtype_elt) (subtype_elt0 : Carrier E) (subtype_prf0 : @Pred_fun E A subtype_elt0) (_ : @Equal (@set_of_subtype_image E (@part E B)) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) (@Build_subtype E A subtype_elt0 subtype_prf0)) (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@inj_part_included A B p) (@Build_subtype E A subtype_elt subtype_prf))), @Equal (@set_of_subtype_image E (@part E A)) (@Build_subtype E A subtype_elt0 subtype_prf0) (@Build_subtype E A subtype_elt subtype_prf) *)
simpl in |- *; auto with algebra.
Qed.
Definition id_map_parts_equal : forall A B : part_set E, Equal A B -> MAP A B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : @Equal (part_set E) A B), Carrier (MAP (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B))) *)
intros A B H'; try assumption.
(* Goal: Carrier (MAP (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B))) *)
exact (inj_part_included (eq_part_included H')).
Qed.
Lemma id_map_parts_equal_prop :
forall (A B : part_set E) (p : Equal A B) (x : A),
Equal (subtype_elt (id_map_parts_equal p x)) (subtype_elt x).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (p : @Equal (part_set E) A B) (x : Carrier (@set_of_subtype_image E (@part E A))), @Equal E (@subtype_elt E B (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image E (@part E B)) (@id_map_parts_equal A B p) x)) (@subtype_elt E A x) *)
simpl in |- *; auto with algebra.
Qed.
End Inclusion.
Section Union_of_part.
Variable E : Setoid.
Comments "We define the union of a part of" (part_set E).
Variable P : part_set (part_set E).
Definition union_part : part_set E.
Proof.
(* Goal: Carrier (part_set E) *)
apply (Build_Predicate (Pred_fun:=fun x : E => exists A : part_set E, in_part A P /\ in_part x A)).
(* Goal: @pred_compatible E (fun x : Carrier E => @ex (Carrier (part_set E)) (fun A : Carrier (part_set E) => and (@in_part (part_set E) A P) (@in_part E x A))) *)
red in |- *.
(* Goal: forall (x y : Carrier E) (_ : @ex (Carrier (part_set E)) (fun A : Carrier (part_set E) => and (@in_part (part_set E) A P) (@in_part E x A))) (_ : @Equal E y x), @ex (Carrier (part_set E)) (fun A : Carrier (part_set E) => and (@in_part (part_set E) A P) (@in_part E y A)) *)
intros x y H' H'0; try assumption.
(* Goal: @ex (Carrier (part_set E)) (fun A : Carrier (part_set E) => and (@in_part (part_set E) A P) (@in_part E y A)) *)
elim H'; intros A E0; elim E0; clear H'.
(* Goal: forall (_ : @in_part (part_set E) A P) (_ : @in_part E x A), @ex (Carrier (part_set E)) (fun A : Carrier (part_set E) => and (@in_part (part_set E) A P) (@in_part E y A)) *)
intros H' H'1; try assumption.
(* Goal: @ex (Carrier (part_set E)) (fun A : Carrier (part_set E) => and (@in_part (part_set E) A P) (@in_part E y A)) *)
exists A; split; [ try assumption | idtac ].
(* Goal: @in_part E y A *)
apply in_part_comp_l with x; auto with algebra.
Qed.
Lemma union_part_prop :
forall x : E,
in_part x union_part -> exists A : part_set E, in_part A P /\ in_part x A.
Proof.
(* Goal: forall (x : Carrier E) (_ : @in_part E x union_part), @ex (Carrier (part_set E)) (fun A : Carrier (part_set E) => and (@in_part (part_set E) A P) (@in_part E x A)) *)
intros x H'; red in H'; auto with algebra.
Qed.
Lemma union_part_prop_rev :
forall A : part_set E,
in_part A P -> forall x : E, in_part x A -> in_part x union_part.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (_ : @in_part (part_set E) A P) (x : Carrier E) (_ : @in_part E x A), @in_part E x union_part *)
unfold union_part in |- *; simpl in |- *; auto with algebra.
(* Goal: forall (A : Predicate E) (_ : @in_part (part_set E) A P) (x : Carrier E) (_ : @in_part E x A), @ex (Predicate E) (fun A0 : Predicate E => and (@in_part (part_set E) A0 P) (@in_part E x A0)) *)
intros A H' x H'0; try assumption.
(* Goal: @ex (Predicate E) (fun A : Predicate E => and (@in_part (part_set E) A P) (@in_part E x A)) *)
exists A; split; [ try assumption | idtac ].
(* Goal: @in_part E x A *)
auto with algebra.
Qed.
Lemma union_part_included :
forall A : part_set E, in_part A P -> included A union_part.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (_ : @in_part (part_set E) A P), @included E A union_part *)
intros A H'; try assumption.
(* Goal: @included E A union_part *)
unfold included in |- *; auto with algebra.
(* Goal: forall (x : Carrier E) (_ : @in_part E x A), @in_part E x union_part *)
intros x H'0; try assumption.
(* Goal: @in_part E x union_part *)
apply union_part_prop_rev with (A := A); auto with algebra.
Qed.
Lemma union_part_upper_bound :
forall Y : part_set E,
(forall A : part_set E, in_part A P -> included A Y) ->
included union_part Y.
Proof.
(* Goal: forall (Y : Carrier (part_set E)) (_ : forall (A : Carrier (part_set E)) (_ : @in_part (part_set E) A P), @included E A Y), @included E union_part Y *)
intros Y H'; try assumption.
(* Goal: @included E union_part Y *)
unfold included in |- *.
(* Goal: forall (x : Carrier E) (_ : @in_part E x union_part), @in_part E x Y *)
intros x H'0; try assumption.
(* Goal: @in_part E x Y *)
case (union_part_prop H'0).
(* Goal: forall (x0 : Carrier (part_set E)) (_ : and (@in_part (part_set E) x0 P) (@in_part E x x0)), @in_part E x Y *)
intros A H'1; try assumption.
(* Goal: @in_part E x Y *)
elim H'1.
(* Goal: forall (_ : @in_part (part_set E) A P) (_ : @in_part E x A), @in_part E x Y *)
intros H'2 H'3; try assumption.
(* Goal: @in_part E x Y *)
unfold included in H'.
(* Goal: @in_part E x Y *)
apply H' with (A := A); auto with algebra.
Qed.
End Union_of_part.
Section Part_set_greater.
Comments "A nice theorem:".
Variable E : Setoid.
Variable f : MAP E (part_set E).
Hypothesis fsurj : surjective f.
Let X_def (x : E) : Prop := ~ in_part x (f x).
Let X : part_set E.
Proof.
(* Goal: Carrier (part_set E) *)
apply (Build_Predicate (E:=E) (Pred_fun:=X_def)).
(* Goal: @pred_compatible E X_def *)
unfold X_def in |- *.
(* Goal: @pred_compatible E (fun x : Carrier E => not (@in_part E x (@Ap E (part_set E) f x))) *)
red in |- *.
(* Goal: forall (x y : Carrier E) (_ : not (@in_part E x (@Ap E (part_set E) f x))) (_ : @Equal E y x), not (@in_part E y (@Ap E (part_set E) f y)) *)
unfold not in |- *.
(* Goal: forall (x y : Carrier E) (_ : forall _ : @in_part E x (@Ap E (part_set E) f x), False) (_ : @Equal E y x) (_ : @in_part E y (@Ap E (part_set E) f y)), False *)
intros x y H' H'0 H'1; try assumption.
(* Goal: False *)
apply H'.
(* Goal: @in_part E x (@Ap E (part_set E) f x) *)
apply in_part_comp_l with y; auto with algebra.
(* Goal: @in_part E y (@Ap E (part_set E) f x) *)
apply in_part_comp_r with (Ap f y); auto with algebra.
Qed.
Let invX : exists x : E, Equal X (f x).
Proof.
(* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal (part_set E) X (@Ap E (part_set E) f x)) *)
exact (fsurj X).
Qed.
Lemma not_inpart_comp_r :
forall (E : Setoid) (x : E) (A B : part_set E),
~ in_part x A -> Equal A B -> ~ in_part x B.
Proof.
(* Goal: forall (E : Setoid) (x : Carrier E) (A B : Carrier (part_set E)) (_ : not (@in_part E x A)) (_ : @Equal (part_set E) A B), not (@in_part E x B) *)
unfold not in |- *.
(* Goal: forall (E : Setoid) (x : Carrier E) (A B : Carrier (part_set E)) (_ : forall _ : @in_part E x A, False) (_ : @Equal (part_set E) A B) (_ : @in_part E x B), False *)
intros E0 x A B H' H'0 H'1; try assumption.
(* Goal: False *)
apply H'.
(* Goal: @in_part E0 x A *)
apply in_part_comp_r with B; auto with algebra.
Qed.
Theorem part_set_is_strictly_greater_than_set1 : False.
Proof.
(* Goal: False *)
case invX.
(* Goal: forall (x : Carrier E) (_ : @Equal (part_set E) X (@Ap E (part_set E) f x)), False *)
intros x H'; try assumption.
(* Goal: False *)
cut (~ in_part x X).
(* Goal: not (@in_part E x X) *)
(* Goal: forall _ : not (@in_part E x X), False *)
intros H'0; try assumption.
(* Goal: not (@in_part E x X) *)
(* Goal: False *)
absurd (in_part x X); auto with algebra.
(* Goal: not (@in_part E x X) *)
(* Goal: @in_part E x X *)
simpl in |- *.
(* Goal: not (@in_part E x X) *)
(* Goal: X_def x *)
unfold X_def in |- *.
(* Goal: not (@in_part E x X) *)
(* Goal: not (@in_part E x (@Ap E (part_set E) f x)) *)
apply not_inpart_comp_r with X; auto with algebra.
(* Goal: not (@in_part E x X) *)
unfold not in |- *.
(* Goal: forall _ : @in_part E x X, False *)
intros H'0; try assumption.
(* Goal: False *)
absurd (in_part x X); auto with algebra.
(* Goal: not (@in_part E x X) *)
apply not_inpart_comp_r with (Ap f x); auto with algebra.
Qed.
End Part_set_greater.
Theorem part_set_is_strictly_greater_than_set :
forall (E : Setoid) (f : MAP E (part_set E)), ~ surjective f.
Proof.
(* Goal: forall (E : Setoid) (f : Carrier (MAP E (part_set E))), not (@surjective E (part_set E) f) *)
exact part_set_is_strictly_greater_than_set1.
Qed.
Hint Unfold pred_compatible: algebra.
Hint Resolve empty_prop full_prop included_refl eq_part_included
empty_included full_included inj_part_injective inj_part_included_injective
id_map_parts_equal_prop union_part_included union_part_upper_bound
not_inpart_comp_r: algebra. |
Require Export GeoCoq.Tarski_dev.Ch10_line_reflexivity_2.
Ltac permut :=
match goal with
|H : (Col ?X ?Y ?Z) |- Col ?X ?Y ?Z => assumption
|H : (Col ?X ?Y ?Z) |- Col ?Y ?Z ?X => apply col_permutation_1; assumption
|H : (Col ?X ?Y ?Z) |- Col ?Z ?X ?Y => apply col_permutation_2; assumption
|H : (Col ?X ?Y ?Z) |- Col ?X ?Z ?Y => apply col_permutation_5; assumption
|H : (Col ?X ?Y ?Z) |- Col ?Y ?X ?Z => apply col_permutation_4; assumption
|H : (Col ?X ?Y ?Z) |- Col ?Z ?Y ?X => apply col_permutation_3; assumption
|_ : _ |- _ => idtac
end.
Ltac bet :=
match goal with
|H0 : Bet ?A ?B ?C |- Bet ?A ?B ?C => assumption
|H0 : Bet ?A ?B ?C, H1 : Bet ?B ?C ?D , H : ?B <> ?C |- Bet ?A ?B ?D => apply (outer_transitivity_between _ _ _ _ H0 H1 H)
|H0 : Bet ?A ?B ?C, H1 : Bet ?B ?C ?D , H : ?B <> ?C |- Bet ?A ?C ?D => apply (outer_transitivity_between2 _ _ _ _ H0 H1 H)
|H0 : Bet ?A ?B ?D, H1 : Bet ?B ?C ?D |- Bet ?A ?B ?C => apply (between_inner_transitivity _ _ _ _ H0 H1)
|H0 : Bet ?A ?B ?C, H1 : Bet ?A ?C ?D |- Bet ?B ?C ?D => apply (between_exchange3 _ _ _ _ H0 H1)
|H0 : Bet ?A ?B ?D, H1 : Bet ?B ?C ?D |- Bet ?A ?C ?D => apply (between_exchange2 _ _ _ _ H0 H1)
|H0 : Bet ?A ?B ?C, H1 : Bet ?A ?C ?D |- Bet ?A ?B ?D => apply (between_exchange4 _ _ _ _ H0 H1)
|H0 : Bet ?A ?B ?C |- Bet ?A ?B ?C => assumption
|H0 : Bet ?A ?B ?C, H1 : Bet ?B ?C ?D , H : ?B <> ?C |- Bet ?D ?B ?A => apply between_symmetry; apply (outer_transitivity_between _ _ _ _ H0 H1 H)
|H0 : Bet ?A ?B ?C, H1 : Bet ?B ?C ?D , H : ?B <> ?C |- Bet ?D ?C ?A => apply (outer_transitivity_between2 _ _ _ _ H0 H1 H)
|H0 : Bet ?A ?B ?D, H1 : Bet ?B ?C ?D |- Bet ?C ?B ?A => apply between_symmetry; apply (between_inner_transitivity _ _ _ _ H0 H1)
|H0 : Bet ?A ?B ?C, H1 : Bet ?A ?C ?D |- Bet ?D ?C ?B => apply between_symmetry; apply (between_exchange3 _ _ _ _ H0 H1)
|H0 : Bet ?A ?B ?D, H1 : Bet ?B ?C ?D |- Bet ?D ?C ?A => apply between_symmetry; apply (between_exchange2 _ _ _ _ H0 H1)
|H0 : Bet ?A ?B ?C, H1 : Bet ?A ?C ?D |- Bet ?D ?B ?A => apply between_symmetry; apply (between_exchange4 _ _ _ _ H0 H1)
|H0 : Bet ?A ?B ?C |- Bet ?C ?B ?A => apply (between_symmetry _ _ _ H0)
|H0 : Bet ?A ?B ?C |- Bet ?C ?B ?A => apply (between_symmetry _ _ _ H0)
|_ : _ |- Bet ?A ?B ?B => apply between_trivial
|_ : _ |- Bet ?A ?A ?B => apply between_trivial2
|_ : _ |- _ => idtac
end.
Ltac cong :=
match goal with
|_ : Cong ?A ?B ?C ?BD |- Cong ?A ?B ?C ?D => assumption
|_ : _ |- Cong ?A ?B ?A ?B => apply cong_reflexivity
|_ : _ |- Cong ?A ?A ?B ?B => apply cong_trivial_identity
|H0 : Cong ?A ?B ?C ?D |- Cong ?A ?B ?C ?C => assumption
|H0 : Cong ?A ?B ?C ?D |- Cong ?A ?B ?D ?C => apply (cong_right_commutativity _ _ _ _ H0)
|H0 : Cong ?A ?B ?C ?D |- Cong ?B ?A ?D ?C => apply (cong_commutativity _ _ _ _ H0)
|H0 : Cong ?A ?B ?C ?D |- Cong ?B ?A ?C ?D => apply (cong_left_commutativity _ _ _ _ H0)
|H0 : Cong ?A ?B ?C ?D |- Cong ?C ?D ?A ?B => apply (cong_symmetry _ _ _ _ H0)
|H0 : Cong ?A ?B ?C ?D |- Cong ?C ?D ?B ?A => apply (cong_symmetry _ _ _ _ (cong_left_commutativity _ _ _ _ H0))
|H0 : Cong ?A ?B ?C ?D |- Cong ?D ?C ?B ?B => apply (cong_symmetry _ _ _ _ (cong_commutativity _ _ _ _ H0))
|H0 : Cong ?A ?B ?C ?D |- Cong ?D ?C ?A ?B => apply (cong_symmetry _ _ _ _ (cong_right_commutativity _ _ _ _ H0))
|_ : _ |- _ => idtac
end.
Section T11_1.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma l11_3 : forall A B C D E F,
CongA A B C D E F ->
exists A', exists C', exists D', exists F',
Out B A' A /\ Out B C C' /\ Out E D' D /\ Out E F F' /\
Cong_3 A' B C' D' E F'.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @CongA Tn A B C D E F), @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))))) *)
unfold CongA in H.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))))) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))))) *)
ex_and H3 A'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))))) *)
ex_and H4 C'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))))) *)
ex_and H3 D'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))))) *)
ex_and H4 F'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))))) *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F'))))))) *)
exists C'.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))))) *)
exists D'.
(* Goal: @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F'))))) *)
exists F'.
(* Goal: and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))) *)
assert_diffs.
(* Goal: and (@Out Tn B A' A) (and (@Out Tn B C C') (and (@Out Tn E D' D) (and (@Out Tn E F F') (@Cong_3 Tn A' B C' D' E F')))) *)
repeat split;finish.
(* Goal: @Cong Tn B C' E F' *)
(* Goal: @Cong Tn A' B D' E *)
apply cong_left_commutativity.
(* Goal: @Cong Tn B C' E F' *)
(* Goal: @Cong Tn B A' D' E *)
eapply l2_11 with A D;finish.
(* Goal: @Cong Tn B C' E F' *)
apply cong_left_commutativity.
(* Goal: @Cong Tn C' B E F' *)
eapply l2_11; eBetween; Cong.
Qed.
Lemma l11_aux : forall B A A' A0 E D D' D0,
Out B A A' -> Out E D D' -> Cong B A' E D' ->
Bet B A A0 -> Bet E D D0 -> Cong A A0 E D ->
Cong D D0 B A ->
Cong B A0 E D0 /\ Cong A' A0 D' D0.
Lemma l11_3_bis : forall A B C D E F,
(exists A', exists C', exists D', exists F',
Out B A' A /\ Out B C' C /\ Out E D' D /\ Out E F' F /\
Cong_3 A' B C' D' E F') -> CongA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C' C) (and (@Out Tn E D' D) (and (@Out Tn E F' F) (@Cong_3 Tn A' B C' D' E F'))))))))), @CongA Tn A B C D E F *)
intros.
(* Goal: @CongA Tn A B C D E F *)
unfold CongA.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
ex_and H A'.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
ex_and H0 C'.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
ex_and H D'.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
ex_and H0 F'.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
prolong B A A0 E D.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
prolong B C C0 E F.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
prolong E D D0 B A.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
prolong E F F0 B C.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
assert(HH0:=H0).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
assert(HH1:=H1).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
assert(HH2:=H2).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
assert(HH:=H).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
unfold Out in HH.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
unfold Out in HH0.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
unfold Out in HH1.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
unfold Out in HH2.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
repeat split;try assumption.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))) *)
repeat split;try assumption.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))) *)
exists A0.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A0) (and (@Cong Tn A A0 E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A0 C' D' F'))))))))))) *)
exists C0.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A0) (and (@Cong Tn A A0 E D) (and (@Bet Tn B C C0) (and (@Cong Tn C C0 E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A0 C0 D' F')))))))))) *)
exists D0.
(* Goal: @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A0) (and (@Cong Tn A A0 E D) (and (@Bet Tn B C C0) (and (@Cong Tn C C0 E F) (and (@Bet Tn E D D0) (and (@Cong Tn D D0 B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A0 C0 D0 F'))))))))) *)
exists F0.
(* Goal: and (@Bet Tn B A A0) (and (@Cong Tn A A0 E D) (and (@Bet Tn B C C0) (and (@Cong Tn C C0 E F) (and (@Bet Tn E D D0) (and (@Cong Tn D D0 B A) (and (@Bet Tn E F F0) (and (@Cong Tn F F0 B C) (@Cong Tn A0 C0 D0 F0)))))))) *)
repeat split; try (assumption).
(* Goal: @Cong Tn A0 C0 D0 F0 *)
unfold Cong_3 in H3.
(* Goal: @Cong Tn A0 C0 D0 F0 *)
spliter.
(* Goal: @Cong Tn A0 C0 D0 F0 *)
assert(Cong B A0 E D0 /\ Cong A' A0 D' D0).
(* Goal: @Cong Tn A0 C0 D0 F0 *)
(* Goal: and (@Cong Tn B A0 E D0) (@Cong Tn A' A0 D' D0) *)
eapply l11_aux with A D;finish.
(* Goal: @Cong Tn A0 C0 D0 F0 *)
assert(Cong B C0 E F0 /\ Cong C' C0 F' F0).
(* Goal: @Cong Tn A0 C0 D0 F0 *)
(* Goal: and (@Cong Tn B C0 E F0) (@Cong Tn C' C0 F' F0) *)
eapply l11_aux with C F;finish.
(* Goal: @Cong Tn A0 C0 D0 F0 *)
spliter.
(* Goal: @Cong Tn A0 C0 D0 F0 *)
assert (Cong_3 B A' A0 E D' D0) by (repeat split;finish).
(* Goal: @Cong Tn A0 C0 D0 F0 *)
assert (Cong_3 B C' C0 E F' F0) by (repeat split;finish).
(* Goal: @Cong Tn A0 C0 D0 F0 *)
assert (Cong C0 A' F0 D').
(* Goal: @Cong Tn A0 C0 D0 F0 *)
(* Goal: @Cong Tn C0 A' F0 D' *)
apply l4_16 with B C' E F'; unfold FSC;repeat split;finish;ColR.
(* Goal: @Cong Tn A0 C0 D0 F0 *)
apply l4_16 with B A' E D'; unfold FSC;repeat split;finish;ColR.
Qed.
Lemma l11_4_1 : forall A B C D E F,
CongA A B C D E F -> A<>B /\ C<>B /\ D<>E /\ F<>E /\
(forall A' C' D' F', Out B A' A /\ Out B C' C /\ Out E D' D /\ Out E F' F /\
Cong B A' E D' /\ Cong B C' E F' -> Cong A' C' D' F').
Lemma l11_4_2 : forall A B C D E F,
(A<>B /\ C<>B /\ D<>E /\ F<>E /\
(forall A' C' D' F', Out B A' A /\ Out B C' C /\ Out E D' D /\ Out E F' F /\
Cong B A' E D' /\ Cong B C' E F' -> Cong A' C' D' F')) -> CongA A B C D E F.
Lemma conga_refl : forall A B C, A <> B -> C <> B -> CongA A B C A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)), @CongA Tn A B C A B C *)
intros.
(* Goal: @CongA Tn A B C A B C *)
apply l11_3_bis.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A' A) (and (@Out Tn B C' C) (and (@Out Tn B D' A) (and (@Out Tn B F' C) (@Cong_3 Tn A' B C' D' B F')))))))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A A) (and (@Out Tn B C' C) (and (@Out Tn B D' A) (and (@Out Tn B F' C) (@Cong_3 Tn A B C' D' B F'))))))) *)
exists C.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A A) (and (@Out Tn B C C) (and (@Out Tn B D' A) (and (@Out Tn B F' C) (@Cong_3 Tn A B C D' B F')))))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A A) (and (@Out Tn B C C) (and (@Out Tn B A A) (and (@Out Tn B F' C) (@Cong_3 Tn A B C A B F'))))) *)
exists C.
(* Goal: and (@Out Tn B A A) (and (@Out Tn B C C) (and (@Out Tn B A A) (and (@Out Tn B C C) (@Cong_3 Tn A B C A B C)))) *)
repeat split; finish.
Qed.
Lemma conga_sym : forall A B C A' B' C', CongA A B C A' B' C' -> CongA A' B' C' A B C.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @CongA Tn A B C A' B' C'), @CongA Tn A' B' C' A B C *)
unfold CongA.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A'0) (and (@Cong Tn A A'0 B' A') (and (@Bet Tn B C C'0) (and (@Cong Tn C C'0 B' C') (and (@Bet Tn B' A' D') (and (@Cong Tn A' D' B A) (and (@Bet Tn B' C' F') (and (@Cong Tn C' F' B C) (@Cong Tn A'0 C'0 D' F'))))))))))))))))), and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
ex_and H3 A0.
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
ex_and H4 C0.
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
ex_and H3 D0.
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
ex_and H4 F0.
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
repeat split; try assumption.
(* Goal: @ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))) *)
exists D0.
(* Goal: @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' D0) (and (@Cong Tn A' D0 B A) (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn D0 C'0 D' F'))))))))))) *)
exists F0.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' D0) (and (@Cong Tn A' D0 B A) (and (@Bet Tn B' C' F0) (and (@Cong Tn C' F0 B C) (and (@Bet Tn B A D') (and (@Cong Tn A D' B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn D0 F0 D' F')))))))))) *)
exists A0.
(* Goal: @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' D0) (and (@Cong Tn A' D0 B A) (and (@Bet Tn B' C' F0) (and (@Cong Tn C' F0 B C) (and (@Bet Tn B A A0) (and (@Cong Tn A A0 B' A') (and (@Bet Tn B C F') (and (@Cong Tn C F' B' C') (@Cong Tn D0 F0 A0 F'))))))))) *)
exists C0.
(* Goal: and (@Bet Tn B' A' D0) (and (@Cong Tn A' D0 B A) (and (@Bet Tn B' C' F0) (and (@Cong Tn C' F0 B C) (and (@Bet Tn B A A0) (and (@Cong Tn A A0 B' A') (and (@Bet Tn B C C0) (and (@Cong Tn C C0 B' C') (@Cong Tn D0 F0 A0 C0)))))))) *)
repeat split; finish.
Qed.
Lemma out_conga :
forall A B C A' B' C' A0 C0 A1 C1,
CongA A B C A' B' C' ->
Out B A A0 ->
Out B C C0 ->
Out B' A' A1 ->
Out B' C' C1 ->
CongA A0 B C0 A1 B' C1.
Proof.
(* Goal: forall (A B C A' B' C' A0 C0 A1 C1 : @Tpoint Tn) (_ : @CongA Tn A B C A' B' C') (_ : @Out Tn B A A0) (_ : @Out Tn B C C0) (_ : @Out Tn B' A' A1) (_ : @Out Tn B' C' C1), @CongA Tn A0 B C0 A1 B' C1 *)
intros.
(* Goal: @CongA Tn A0 B C0 A1 B' C1 *)
apply l11_4_1 in H.
(* Goal: @CongA Tn A0 B C0 A1 B' C1 *)
spliter.
(* Goal: @CongA Tn A0 B C0 A1 B' C1 *)
apply l11_4_2.
(* Goal: and (not (@eq (@Tpoint Tn) A0 B)) (and (not (@eq (@Tpoint Tn) C0 B)) (and (not (@eq (@Tpoint Tn) A1 B')) (and (not (@eq (@Tpoint Tn) C1 B')) (forall (A' C' D' F' : @Tpoint Tn) (_ : and (@Out Tn B A' A0) (and (@Out Tn B C' C0) (and (@Out Tn B' D' A1) (and (@Out Tn B' F' C1) (and (@Cong Tn B A' B' D') (@Cong Tn B C' B' F')))))), @Cong Tn A' C' D' F')))) *)
assert_diffs.
(* Goal: and (not (@eq (@Tpoint Tn) A0 B)) (and (not (@eq (@Tpoint Tn) C0 B)) (and (not (@eq (@Tpoint Tn) A1 B')) (and (not (@eq (@Tpoint Tn) C1 B')) (forall (A' C' D' F' : @Tpoint Tn) (_ : and (@Out Tn B A' A0) (and (@Out Tn B C' C0) (and (@Out Tn B' D' A1) (and (@Out Tn B' F' C1) (and (@Cong Tn B A' B' D') (@Cong Tn B C' B' F')))))), @Cong Tn A' C' D' F')))) *)
repeat split;try assumption.
(* Goal: forall (A' C' D' F' : @Tpoint Tn) (_ : and (@Out Tn B A' A0) (and (@Out Tn B C' C0) (and (@Out Tn B' D' A1) (and (@Out Tn B' F' C1) (and (@Cong Tn B A' B' D') (@Cong Tn B C' B' F')))))), @Cong Tn A' C' D' F' *)
intros.
(* Goal: @Cong Tn A'0 C'0 D' F' *)
spliter.
(* Goal: @Cong Tn A'0 C'0 D' F' *)
apply H7.
(* Goal: and (@Out Tn B A'0 A) (and (@Out Tn B C'0 C) (and (@Out Tn B' D' A') (and (@Out Tn B' F' C') (and (@Cong Tn B A'0 B' D') (@Cong Tn B C'0 B' F'))))) *)
assert_diffs.
(* Goal: and (@Out Tn B A'0 A) (and (@Out Tn B C'0 C) (and (@Out Tn B' D' A') (and (@Out Tn B' F' C') (and (@Cong Tn B A'0 B' D') (@Cong Tn B C'0 B' F'))))) *)
repeat split;finish.
(* Goal: or (@Bet Tn B' F' C') (@Bet Tn B' C' F') *)
(* Goal: or (@Bet Tn B' D' A') (@Bet Tn B' A' D') *)
(* Goal: or (@Bet Tn B C'0 C) (@Bet Tn B C C'0) *)
(* Goal: or (@Bet Tn B A'0 A) (@Bet Tn B A A'0) *)
eapply l6_7 with A0;finish.
(* Goal: or (@Bet Tn B' F' C') (@Bet Tn B' C' F') *)
(* Goal: or (@Bet Tn B' D' A') (@Bet Tn B' A' D') *)
(* Goal: or (@Bet Tn B C'0 C) (@Bet Tn B C C'0) *)
eapply l6_7 with C0;finish.
(* Goal: or (@Bet Tn B' F' C') (@Bet Tn B' C' F') *)
(* Goal: or (@Bet Tn B' D' A') (@Bet Tn B' A' D') *)
eapply l6_7 with A1;finish.
(* Goal: or (@Bet Tn B' F' C') (@Bet Tn B' C' F') *)
eapply l6_7 with C1;finish.
Qed.
Lemma cong3_diff : forall A B C A' B' C',
A<>B -> Cong_3 A B C A' B' C' -> A' <> B'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Cong_3 Tn A B C A' B' C'), not (@eq (@Tpoint Tn) A' B') *)
unfold Cong_3 in *.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : and (@Cong Tn A B A' B') (and (@Cong Tn A C A' C') (@Cong Tn B C B' C'))), not (@eq (@Tpoint Tn) A' B') *)
intros.
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
spliter.
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
auto.
Qed.
Lemma cong3_diff2: forall A B C A' B' C',
B<>C -> Cong_3 A B C A' B' C' -> B' <> C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Cong_3 Tn A B C A' B' C'), not (@eq (@Tpoint Tn) B' C') *)
unfold Cong_3 in *.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) B C)) (_ : and (@Cong Tn A B A' B') (and (@Cong Tn A C A' C') (@Cong Tn B C B' C'))), not (@eq (@Tpoint Tn) B' C') *)
intros.
(* Goal: not (@eq (@Tpoint Tn) B' C') *)
spliter.
(* Goal: not (@eq (@Tpoint Tn) B' C') *)
assert_diffs.
(* Goal: not (@eq (@Tpoint Tn) B' C') *)
auto.
Qed.
Lemma cong3_conga : forall A B C A' B' C',
A <> B -> C <> B ->
Cong_3 A B C A' B' C' ->
CongA A B C A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)) (_ : @Cong_3 Tn A B C A' B' C'), @CongA Tn A B C A' B' C' *)
intros.
(* Goal: @CongA Tn A B C A' B' C' *)
assert (A' <> B') by (eauto using cong3_diff).
(* Goal: @CongA Tn A B C A' B' C' *)
assert (B' <> C') by (eauto using cong3_diff2).
(* Goal: @CongA Tn A B C A' B' C' *)
apply (l11_3_bis A B C A' B' C').
(* Goal: @ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A'0 A) (and (@Out Tn B C'0 C) (and (@Out Tn B' D' A') (and (@Out Tn B' F' C') (@Cong_3 Tn A'0 B C'0 D' B' F')))))))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A A) (and (@Out Tn B C'0 C) (and (@Out Tn B' D' A') (and (@Out Tn B' F' C') (@Cong_3 Tn A B C'0 D' B' F'))))))) *)
exists C.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A A) (and (@Out Tn B C C) (and (@Out Tn B' D' A') (and (@Out Tn B' F' C') (@Cong_3 Tn A B C D' B' F')))))) *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Out Tn B A A) (and (@Out Tn B C C) (and (@Out Tn B' A' A') (and (@Out Tn B' F' C') (@Cong_3 Tn A B C A' B' F'))))) *)
exists C'.
(* Goal: and (@Out Tn B A A) (and (@Out Tn B C C) (and (@Out Tn B' A' A') (and (@Out Tn B' C' C') (@Cong_3 Tn A B C A' B' C')))) *)
intuition finish.
Qed.
Lemma cong3_conga2 : forall A B C A' B' C' A'' B'' C'',
Cong_3 A B C A' B' C' ->
CongA A B C A'' B'' C'' ->
CongA A' B' C' A'' B'' C''.
Proof.
(* Goal: forall (A B C A' B' C' A'' B'' C'' : @Tpoint Tn) (_ : @Cong_3 Tn A B C A' B' C') (_ : @CongA Tn A B C A'' B'' C''), @CongA Tn A' B' C' A'' B'' C'' *)
intros.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
unfold CongA in H0.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
spliter.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
ex_and H4 A0.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
ex_and H5 C0.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
ex_and H4 A2.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
ex_and H5 C2.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
unfold Cong_3 in H.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
spliter.
(* Goal: @CongA Tn A' B' C' A'' B'' C'' *)
unfold CongA.
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A'' B'')) (and (not (@eq (@Tpoint Tn) C'' B'')) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B'' A'') (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B'' C'') (and (@Bet Tn B'' A'' D') (and (@Cong Tn A'' D' B' A') (and (@Bet Tn B'' C'' F') (and (@Cong Tn C'' F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
assert_diffs.
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (and (not (@eq (@Tpoint Tn) C' B')) (and (not (@eq (@Tpoint Tn) A'' B'')) (and (not (@eq (@Tpoint Tn) C'' B'')) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B'' A'') (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B'' C'') (and (@Bet Tn B'' A'' D') (and (@Cong Tn A'' D' B' A') (and (@Bet Tn B'' C'' F') (and (@Cong Tn C'' F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))))))) *)
repeat split;try solve [auto].
(* Goal: @ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B'' A'') (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B'' C'') (and (@Bet Tn B'' A'' D') (and (@Cong Tn A'' D' B' A') (and (@Bet Tn B'' C'' F') (and (@Cong Tn C'' F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))) *)
prolong B' A' A1 B'' A''.
(* Goal: @ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B'' A'') (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B'' C'') (and (@Bet Tn B'' A'' D') (and (@Cong Tn A'' D' B' A') (and (@Bet Tn B'' C'' F') (and (@Cong Tn C'' F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))) *)
prolong B' C' C1 B'' C''.
(* Goal: @ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A'0) (and (@Cong Tn A' A'0 B'' A'') (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B'' C'') (and (@Bet Tn B'' A'' D') (and (@Cong Tn A'' D' B' A') (and (@Bet Tn B'' C'' F') (and (@Cong Tn C'' F' B' C') (@Cong Tn A'0 C'0 D' F')))))))))))) *)
exists A1.
(* Goal: @ex (@Tpoint Tn) (fun C'0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A1) (and (@Cong Tn A' A1 B'' A'') (and (@Bet Tn B' C' C'0) (and (@Cong Tn C' C'0 B'' C'') (and (@Bet Tn B'' A'' D') (and (@Cong Tn A'' D' B' A') (and (@Bet Tn B'' C'' F') (and (@Cong Tn C'' F' B' C') (@Cong Tn A1 C'0 D' F'))))))))))) *)
exists C1.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A1) (and (@Cong Tn A' A1 B'' A'') (and (@Bet Tn B' C' C1) (and (@Cong Tn C' C1 B'' C'') (and (@Bet Tn B'' A'' D') (and (@Cong Tn A'' D' B' A') (and (@Bet Tn B'' C'' F') (and (@Cong Tn C'' F' B' C') (@Cong Tn A1 C1 D' F')))))))))) *)
exists A2.
(* Goal: @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B' A' A1) (and (@Cong Tn A' A1 B'' A'') (and (@Bet Tn B' C' C1) (and (@Cong Tn C' C1 B'' C'') (and (@Bet Tn B'' A'' A2) (and (@Cong Tn A'' A2 B' A') (and (@Bet Tn B'' C'' F') (and (@Cong Tn C'' F' B' C') (@Cong Tn A1 C1 A2 F'))))))))) *)
exists C2.
(* Goal: and (@Bet Tn B' A' A1) (and (@Cong Tn A' A1 B'' A'') (and (@Bet Tn B' C' C1) (and (@Cong Tn C' C1 B'' C'') (and (@Bet Tn B'' A'' A2) (and (@Cong Tn A'' A2 B' A') (and (@Bet Tn B'' C'' C2) (and (@Cong Tn C'' C2 B' C') (@Cong Tn A1 C1 A2 C2)))))))) *)
repeat split;try assumption.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
(* Goal: @Cong Tn C'' C2 B' C' *)
(* Goal: @Cong Tn A'' A2 B' A' *)
eapply cong_transitivity with B A;finish.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
(* Goal: @Cong Tn C'' C2 B' C' *)
eapply cong_transitivity with B C;finish.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
assert (Cong A A0 A' A1).
(* Goal: @Cong Tn A1 C1 A2 C2 *)
(* Goal: @Cong Tn A A0 A' A1 *)
eapply cong_transitivity with B'' A'';finish.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
assert(Cong B A0 B' A1).
(* Goal: @Cong Tn A1 C1 A2 C2 *)
(* Goal: @Cong Tn B A0 B' A1 *)
eapply l2_11 with A A';finish.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
assert (Cong C C0 C' C1).
(* Goal: @Cong Tn A1 C1 A2 C2 *)
(* Goal: @Cong Tn C C0 C' C1 *)
eapply cong_transitivity with B'' C'';finish.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
assert(Cong B C0 B' C1).
(* Goal: @Cong Tn A1 C1 A2 C2 *)
(* Goal: @Cong Tn B C0 B' C1 *)
eapply l2_11 with C C';finish.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
assert(FSC B A A0 C B' A' A1 C').
(* Goal: @Cong Tn A1 C1 A2 C2 *)
(* Goal: @FSC Tn B A A0 C B' A' A1 C' *)
unfold FSC;assert_cols;repeat split;finish.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
assert(Cong A0 C A1 C').
(* Goal: @Cong Tn A1 C1 A2 C2 *)
(* Goal: @Cong Tn A0 C A1 C' *)
eauto using l4_16.
(* Goal: @Cong Tn A1 C1 A2 C2 *)
apply cong_commutativity.
(* Goal: @Cong Tn C1 A1 C2 A2 *)
assert(Cong C0 A0 C1 A1).
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: @Cong Tn C0 A0 C1 A1 *)
eapply (l4_16 B C C0 A0 B' C' C1 A1).
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: not (@eq (@Tpoint Tn) B C) *)
(* Goal: @FSC Tn B C C0 A0 B' C' C1 A1 *)
unfold FSC;assert_cols;repeat split;finish.
(* Goal: @Cong Tn C1 A1 C2 A2 *)
(* Goal: not (@eq (@Tpoint Tn) B C) *)
auto.
(* Goal: @Cong Tn C1 A1 C2 A2 *)
apply cong_transitivity with A0 C0; Cong.
Qed.
Lemma conga_diff1 : forall A B C A' B' C', CongA A B C A' B' C' -> A <> B.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @CongA Tn A B C A' B' C'), not (@eq (@Tpoint Tn) A B) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
unfold CongA in H.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
spliter.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
assumption.
Qed.
Lemma conga_diff2 : forall A B C A' B' C', CongA A B C A' B' C' -> C <> B.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @CongA Tn A B C A' B' C'), not (@eq (@Tpoint Tn) C B) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
unfold CongA in H.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
spliter.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
assumption.
Qed.
Lemma conga_diff45 : forall A B C A' B' C', CongA A B C A' B' C' -> A' <> B'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @CongA Tn A B C A' B' C'), not (@eq (@Tpoint Tn) A' B') *)
intros A B C A' B' C' H.
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
apply (conga_diff1 A' B' C' A B C); apply conga_sym; auto.
Qed.
Lemma conga_diff56 : forall A B C A' B' C', CongA A B C A' B' C' -> C' <> B'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @CongA Tn A B C A' B' C'), not (@eq (@Tpoint Tn) C' B') *)
intros A B C A' B' C' H.
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
apply (conga_diff2 A' B' C' A B C); apply conga_sym; auto.
Qed.
Lemma conga_trans : forall A B C A' B' C' A'' B'' C'',
CongA A B C A' B' C' -> CongA A' B' C' A'' B'' C'' ->
CongA A B C A'' B'' C''.
Proof.
(* Goal: forall (A B C A' B' C' A'' B'' C'' : @Tpoint Tn) (_ : @CongA Tn A B C A' B' C') (_ : @CongA Tn A' B' C' A'' B'' C''), @CongA Tn A B C A'' B'' C'' *)
intros.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert (HH:=H).
(* Goal: @CongA Tn A B C A'' B'' C'' *)
unfold CongA in H.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
spliter.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
ex_and H4 A0.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
ex_and H5 C0.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
ex_and H4 A1.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
ex_and H5 C1.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert_diffs.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert(A'' <> B'' /\ C'' <> B'').
(* Goal: @CongA Tn A B C A'' B'' C'' *)
(* Goal: and (not (@eq (@Tpoint Tn) A'' B'')) (not (@eq (@Tpoint Tn) C'' B'')) *)
unfold CongA in H0.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
(* Goal: and (not (@eq (@Tpoint Tn) A'' B'')) (not (@eq (@Tpoint Tn) C'' B'')) *)
spliter.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
(* Goal: and (not (@eq (@Tpoint Tn) A'' B'')) (not (@eq (@Tpoint Tn) C'' B'')) *)
split; assumption.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
spliter.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert(CongA A1 B' C1 A'' B'' C'') by (apply out_conga with A' C' A'' C'';finish).
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert (CongA A0 B C0 A' B' C') by (apply out_conga with A C A' C';finish).
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert (Cong B A0 B' A1).
(* Goal: @CongA Tn A B C A'' B'' C'' *)
(* Goal: @Cong Tn B A0 B' A1 *)
{
(* Goal: @Cong Tn B A0 B' A1 *)
apply cong_right_commutativity.
(* Goal: @Cong Tn B A0 A1 B' *)
apply l2_11 with A A';finish.
(* BG Goal: @CongA Tn A B C A'' B'' C'' *)
}
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert (Cong B C0 B' C1).
(* Goal: @CongA Tn A B C A'' B'' C'' *)
(* Goal: @Cong Tn B C0 B' C1 *)
{
(* Goal: @Cong Tn B C0 B' C1 *)
apply cong_right_commutativity.
(* Goal: @Cong Tn B C0 C1 B' *)
eapply l2_11 with C C';finish.
(* BG Goal: @CongA Tn A B C A'' B'' C'' *)
}
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert (Cong A0 C0 A1 C1).
(* Goal: @CongA Tn A B C A'' B'' C'' *)
(* Goal: @Cong Tn A0 C0 A1 C1 *)
{
(* Goal: @Cong Tn A0 C0 A1 C1 *)
apply (l11_4_1) in H24.
(* Goal: @Cong Tn A0 C0 A1 C1 *)
spliter.
(* Goal: @Cong Tn A0 C0 A1 C1 *)
apply H30.
(* Goal: and (@Out Tn B A0 A0) (and (@Out Tn B C0 C0) (and (@Out Tn B' A1 A') (and (@Out Tn B' C1 C') (and (@Cong Tn B A0 B' A1) (@Cong Tn B C0 B' C1))))) *)
repeat split;finish.
(* BG Goal: @CongA Tn A B C A'' B'' C'' *)
}
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert (Cong_3 A0 B C0 A1 B' C1) by (repeat split;finish).
(* Goal: @CongA Tn A B C A'' B'' C'' *)
apply cong3_symmetry in H28.
(* Goal: @CongA Tn A B C A'' B'' C'' *)
assert( CongA A0 B C0 A'' B'' C'') by (eauto using cong3_conga2).
(* Goal: @CongA Tn A B C A'' B'' C'' *)
eapply out_conga with A0 C0 A'' C'';finish.
Qed.
Lemma conga_pseudo_refl : forall A B C,
A <> B -> C <> B -> CongA A B C C B A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)), @CongA Tn A B C C B A *)
intros.
(* Goal: @CongA Tn A B C C B A *)
unfold CongA.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C D') (and (@Cong Tn C D' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
repeat split; try assumption.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C D') (and (@Cong Tn C D' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' D' F')))))))))))) *)
prolong B A A' B C.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C D') (and (@Cong Tn C D' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' D' F')))))))))))) *)
prolong B C C' B A.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C D') (and (@Cong Tn C D' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' D' F')))))))))))) *)
prolong B A A'' B C.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C D') (and (@Cong Tn C D' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' D' F')))))))))))) *)
prolong B C C'' B A.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C D') (and (@Cong Tn C D' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' D' F')))))))))))) *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C D') (and (@Cong Tn C D' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' D' F'))))))))))) *)
exists C'.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C D') (and (@Cong Tn C D' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' D' F')))))))))) *)
exists C''.
(* Goal: @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C C'') (and (@Cong Tn C C'' B A) (and (@Bet Tn B A F') (and (@Cong Tn A F' B C) (@Cong Tn A' C' C'' F'))))))))) *)
exists A''.
(* Goal: and (@Bet Tn B A A') (and (@Cong Tn A A' B C) (and (@Bet Tn B C C') (and (@Cong Tn C C' B A) (and (@Bet Tn B C C'') (and (@Cong Tn C C'' B A) (and (@Bet Tn B A A'') (and (@Cong Tn A A'' B C) (@Cong Tn A' C' C'' A'')))))))) *)
repeat split; try assumption.
(* Goal: @Cong Tn A' C' C'' A'' *)
assert (A' = A'') by (eauto using (construction_uniqueness B A)).
(* Goal: @Cong Tn A' C' C'' A'' *)
subst A''.
(* Goal: @Cong Tn A' C' C'' A' *)
assert (C' = C'') by (eauto using (construction_uniqueness B C)).
(* Goal: @Cong Tn A' C' C'' A' *)
subst C''.
(* Goal: @Cong Tn A' C' C' A' *)
Cong.
Qed.
Lemma conga_trivial_1 : forall A B C D,
A<>B -> C<>D -> CongA A B A C D C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C D)), @CongA Tn A B A C D C *)
intros.
(* Goal: @CongA Tn A B A C D C *)
unfold CongA.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C D)) (and (not (@eq (@Tpoint Tn) C D)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn B A C') (and (@Cong Tn A C' D C) (and (@Bet Tn D C D') (and (@Cong Tn C D' B A) (and (@Bet Tn D C F') (and (@Cong Tn C F' B A) (@Cong Tn A' C' D' F')))))))))))))))) *)
repeat split; try assumption.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn B A C') (and (@Cong Tn A C' D C) (and (@Bet Tn D C D') (and (@Cong Tn C D' B A) (and (@Bet Tn D C F') (and (@Cong Tn C F' B A) (@Cong Tn A' C' D' F')))))))))))) *)
prolong B A A' D C.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn B A C') (and (@Cong Tn A C' D C) (and (@Bet Tn D C D') (and (@Cong Tn C D' B A) (and (@Bet Tn D C F') (and (@Cong Tn C F' B A) (@Cong Tn A' C' D' F')))))))))))) *)
prolong D C C' B A.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn B A C') (and (@Cong Tn A C' D C) (and (@Bet Tn D C D') (and (@Cong Tn C D' B A) (and (@Bet Tn D C F') (and (@Cong Tn C F' B A) (@Cong Tn A' C' D' F')))))))))))) *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn B A C') (and (@Cong Tn A C' D C) (and (@Bet Tn D C D') (and (@Cong Tn C D' B A) (and (@Bet Tn D C F') (and (@Cong Tn C F' B A) (@Cong Tn A' C' D' F'))))))))))) *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn D C D') (and (@Cong Tn C D' B A) (and (@Bet Tn D C F') (and (@Cong Tn C F' B A) (@Cong Tn A' A' D' F')))))))))) *)
exists C'.
(* Goal: @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn D C C') (and (@Cong Tn C C' B A) (and (@Bet Tn D C F') (and (@Cong Tn C F' B A) (@Cong Tn A' A' C' F'))))))))) *)
exists C'.
(* Goal: and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn B A A') (and (@Cong Tn A A' D C) (and (@Bet Tn D C C') (and (@Cong Tn C C' B A) (and (@Bet Tn D C C') (and (@Cong Tn C C' B A) (@Cong Tn A' A' C' C')))))))) *)
repeat split;finish.
Qed.
Lemma l11_10 : forall A B C D E F A' C' D' F',
CongA A B C D E F -> Out B A' A -> Out B C' C -> Out E D' D -> Out E F' 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) (_ : @Out Tn B A' A) (_ : @Out Tn B C' C) (_ : @Out Tn E D' D) (_ : @Out Tn E F' F), @CongA Tn A' B C' D' E F' *)
intros.
(* Goal: @CongA Tn A' B C' D' E F' *)
apply (out_conga A B C D E F); auto using l6_6.
Qed.
Lemma out2__conga : forall A B C A' C', Out B A' A -> Out B C' C -> CongA A B C A' B C'.
Proof.
(* Goal: forall (A B C A' C' : @Tpoint Tn) (_ : @Out Tn B A' A) (_ : @Out Tn B C' C), @CongA Tn A B C A' B C' *)
intros A B C A' C' HAOut HCOut.
(* Goal: @CongA Tn A B C A' B C' *)
assert_diffs.
(* Goal: @CongA Tn A B C A' B C' *)
apply l11_10 with A C A C;finish.
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl;auto.
Qed.
Lemma l11_13 : forall A B C D E F A' D',
CongA A B C D E F -> Bet A B A' -> A'<> B -> Bet D E D' -> D'<> E -> CongA A' B C D' E F.
Lemma conga_right_comm : forall A B C D E F, CongA A B C D E F -> CongA A B C F E D.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @CongA Tn A B C D E F), @CongA Tn A B C F E D *)
intros.
(* Goal: @CongA Tn A B C F E D *)
apply conga_trans with D E F.
(* Goal: @CongA Tn D E F F E D *)
(* Goal: @CongA Tn A B C D E F *)
apply H.
(* Goal: @CongA Tn D E F F E D *)
unfold CongA in H.
(* Goal: @CongA Tn D E F F E D *)
spliter.
(* Goal: @CongA Tn D E F F E D *)
apply conga_pseudo_refl;auto.
Qed.
Lemma conga_left_comm : forall A B C D E F, CongA A B C D E F -> CongA C B A D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @CongA Tn A B C D E F), @CongA Tn C B A D E F *)
intros.
(* Goal: @CongA Tn C B A D E F *)
apply conga_sym.
(* Goal: @CongA Tn D E F C B A *)
apply conga_trans with A B C.
(* Goal: @CongA Tn A B C C B A *)
(* Goal: @CongA Tn D E F A B C *)
apply conga_sym.
(* Goal: @CongA Tn A B C C B A *)
(* Goal: @CongA Tn A B C D E F *)
apply H.
(* Goal: @CongA Tn A B C C B A *)
unfold CongA in H.
(* Goal: @CongA Tn A B C C B A *)
spliter.
(* Goal: @CongA Tn A B C C B A *)
apply conga_pseudo_refl.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
assumption.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
assumption.
Qed.
Lemma conga_comm : forall A B C D E F, CongA A B C D E F -> CongA C B A F E D.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @CongA Tn A B C D E F), @CongA Tn C B A F E D *)
intros.
(* Goal: @CongA Tn C B A F E D *)
apply conga_left_comm.
(* Goal: @CongA Tn A B C F E D *)
apply conga_right_comm.
(* Goal: @CongA Tn A B C D E F *)
assumption.
Qed.
Lemma conga_line : forall A B C A' B' C',
A <> B -> B <> C -> A' <> B' -> B' <> C' -> Bet A B C -> Bet A' B' C' ->
CongA A B C A' B' C'.
Lemma l11_14 : forall A B C A' C',
Bet A B A' -> A <> B -> A' <> B -> Bet C B C' -> B <> C -> B <> C' ->
CongA A B C A' B C'.
Proof.
(* Goal: forall (A B C A' C' : @Tpoint Tn) (_ : @Bet Tn A B A') (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A' B)) (_ : @Bet Tn C B C') (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) B C')), @CongA Tn A B C A' B C' *)
intros.
(* Goal: @CongA Tn A B C A' B C' *)
assert_diffs.
(* Goal: @CongA Tn A B C A' B C' *)
assert (CongA A' B C C' B A).
(* Goal: @CongA Tn A B C A' B C' *)
(* Goal: @CongA Tn A' B C C' B A *)
{
(* Goal: @CongA Tn A' B C C' B A *)
apply l11_13 with A C;finish.
(* Goal: @CongA Tn A B C C B A *)
apply conga_pseudo_refl;finish.
(* BG Goal: @CongA Tn A B C A' B C' *)
}
(* Goal: @CongA Tn A B C A' B C' *)
apply l11_13 with A' A;finish.
(* Goal: @CongA Tn A' B C A B C' *)
apply conga_right_comm.
(* Goal: @CongA Tn A' B C C' B A *)
auto.
Qed.
End T11_1.
Section T11_2.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma l11_16 : forall A B C A' B' C',
Per A B C -> A <> B -> C <> B ->
Per A' B' C' -> A'<> B' -> C'<> B'->
CongA A B C A' B' C'.
Lemma l11_17 : forall A B C A' B' C',
Per A B C -> CongA A B C A' B' C' -> Per A' B' C'.
Lemma l11_18_1 : forall A B C D,
Bet C B D -> B <> C -> B <> D -> A <> B -> Per A B C -> CongA A B C A B D.
Lemma l11_18_2 : forall A B C D,
Bet C B D -> CongA A B C A B D -> Per A B C.
Lemma cong3_preserves_out : forall A B C A' B' C',
Out A B C -> Cong_3 A B C A' B' C' -> Out A' B' C'.
Lemma l11_21_a : forall A B C A' B' C', Out B A C -> CongA A B C A' B' C' -> Out B' A' C'.
Lemma l11_21_b : forall A B C A' B' C',
Out B A C -> Out B' A' C' -> CongA A B C A' B' C'.
Lemma conga_cop__or_out_ts : forall A B C C', Coplanar A B C C' -> CongA A B C A B C' ->
Out B C C' \/ TS A B C C'.
Lemma cong2_conga_cong : forall A B C A' B' C',
CongA A B C A' B' C' -> Cong A B A' B' -> Cong B C B' C' ->
Cong A C A' C'.
Lemma angle_construction_1 : forall A B C A' B' P,
~ Col A B C -> ~ Col A' B' P ->
exists C', CongA A B C A' B' C' /\ OS A' B' C' P.
Lemma angle_construction_2 : forall A B C A' B' P,
A <> B -> A <> C -> B <> C -> A' <> B' -> ~ Col A' B' P ->
exists C', CongA A B C A' B' C' /\ (OS A' B' C' P \/ Col A' B' C').
Lemma ex_conga_ts : forall A B C A' B' P,
~ Col A B C -> ~ Col A' B' P ->
exists C' : Tpoint, CongA A B C A' B' C' /\ TS A' B' C' P.
Proof.
(* Goal: forall (A B C A' B' P : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : not (@Col Tn A' B' P)), @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
intros A B C A' B' P HNCol HNCol'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
assert (HP' : exists P', Midpoint A' P P') by (apply symmetric_point_construction).
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
destruct HP' as [P' HMid].
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
assert (~ Col A' B' P').
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
(* Goal: not (@Col Tn A' B' P') *)
{
(* Goal: not (@Col Tn A' B' P') *)
intro HCol.
(* Goal: False *)
apply HNCol'.
(* Goal: @Col Tn A' B' P *)
assert (Col A' P P') by (apply midpoint_col; auto).
(* Goal: @Col Tn A' B' P *)
apply (col3 A' P'); Col.
(* Goal: not (@eq (@Tpoint Tn) A' P') *)
intro; treat_equalities; Col.
(* BG Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
}
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
assert (HC' : exists C', CongA A B C A' B' C' /\ OS A' B' C' P').
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@OS Tn A' B' C' P')) *)
apply (angle_construction_1 A B C A' B' P'); auto.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
destruct HC' as [C' [HConga HOne]].
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P)) *)
exists C'.
(* Goal: and (@CongA Tn A B C A' B' C') (@TS Tn A' B' C' P) *)
split; auto.
(* Goal: @TS Tn A' B' C' P *)
apply (l9_8_2 A' B' P'); Side.
(* Goal: @TS Tn A' B' P' P *)
split; Col; split; Col.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A' B') (@Bet Tn P' T P)) *)
exists A'.
(* Goal: and (@Col Tn A' A' B') (@Bet Tn P' A' P) *)
split; Col.
(* Goal: @Bet Tn P' A' P *)
destruct HMid; Between.
Qed.
Lemma l11_15 : forall A B C D E P, ~ Col A B C -> ~ Col D E P ->
exists F, CongA A B C D E F /\ OS E D F P /\
(forall F1 F2, ((CongA A B C D E F1 /\ OS E D F1 P) /\
(CongA A B C D E F2 /\ OS E D F2 P)) -> Out E F1 F2).
Lemma l11_19 : forall A B P1 P2,
Per A B P1 -> Per A B P2 -> OS A B P1 P2 ->
Out B P1 P2.
Proof.
(* Goal: forall (A B P1 P2 : @Tpoint Tn) (_ : @Per Tn A B P1) (_ : @Per Tn A B P2) (_ : @OS Tn A B P1 P2), @Out Tn B P1 P2 *)
intros.
(* Goal: @Out Tn B P1 P2 *)
induction (col_dec A B P1).
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
induction (l8_9 A B P1 H H2).
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
subst.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
unfold OS in *.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
decompose [ex and] H1.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
unfold TS in *.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
intuition.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
subst.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B B P2 *)
unfold OS in *.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B B P2 *)
decompose [ex and] H1.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B B P2 *)
unfold TS in *.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B B P2 *)
spliter.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B B P2 *)
assert (Col B A B) by Col.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B B P2 *)
intuition.
(* Goal: @Out Tn B P1 P2 *)
induction (col_dec A B P2).
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
induction (l8_9 A B P2 H0 ).
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
subst.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
unfold OS in *.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
decompose [ex and] H1.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
unfold TS in *.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Out Tn B P1 P2 *)
intuition.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 P2 *)
subst.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 B *)
unfold OS in *.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 B *)
decompose [ex and] H1.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 B *)
unfold TS in *.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 B *)
spliter.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 B *)
assert (Col B A B) by Col.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
(* Goal: @Out Tn B P1 B *)
intuition.
(* Goal: @Out Tn B P1 P2 *)
(* Goal: @Col Tn A B P2 *)
Col.
(* Goal: @Out Tn B P1 P2 *)
assert (T:=l11_15 A B P1 A B P2 H2 H3).
(* Goal: @Out Tn B P1 P2 *)
decompose [ex and] T.
(* Goal: @Out Tn B P1 P2 *)
apply H7.
(* Goal: and (and (@CongA Tn A B P1 A B P1) (@OS Tn B A P1 P2)) (and (@CongA Tn A B P1 A B P2) (@OS Tn B A P2 P2)) *)
split.
(* Goal: and (@CongA Tn A B P1 A B P2) (@OS Tn B A P2 P2) *)
(* Goal: and (@CongA Tn A B P1 A B P1) (@OS Tn B A P1 P2) *)
split.
(* Goal: and (@CongA Tn A B P1 A B P2) (@OS Tn B A P2 P2) *)
(* Goal: @OS Tn B A P1 P2 *)
(* Goal: @CongA Tn A B P1 A B P1 *)
apply conga_refl.
(* Goal: and (@CongA Tn A B P1 A B P2) (@OS Tn B A P2 P2) *)
(* Goal: @OS Tn B A P1 P2 *)
(* Goal: not (@eq (@Tpoint Tn) P1 B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro;subst;Col.
(* Goal: and (@CongA Tn A B P1 A B P2) (@OS Tn B A P2 P2) *)
(* Goal: @OS Tn B A P1 P2 *)
(* Goal: not (@eq (@Tpoint Tn) P1 B) *)
intro;subst;Col.
(* Goal: and (@CongA Tn A B P1 A B P2) (@OS Tn B A P2 P2) *)
(* Goal: @OS Tn B A P1 P2 *)
apply invert_one_side;auto.
(* Goal: and (@CongA Tn A B P1 A B P2) (@OS Tn B A P2 P2) *)
split.
(* Goal: @OS Tn B A P2 P2 *)
(* Goal: @CongA Tn A B P1 A B P2 *)
apply l11_16;try assumption.
(* Goal: @OS Tn B A P2 P2 *)
(* Goal: not (@eq (@Tpoint Tn) P2 B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: not (@eq (@Tpoint Tn) P1 B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro;subst;Col.
(* Goal: @OS Tn B A P2 P2 *)
(* Goal: not (@eq (@Tpoint Tn) P2 B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
(* Goal: not (@eq (@Tpoint Tn) P1 B) *)
intro;subst;Col.
(* Goal: @OS Tn B A P2 P2 *)
(* Goal: not (@eq (@Tpoint Tn) P2 B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro;subst;Col.
(* Goal: @OS Tn B A P2 P2 *)
(* Goal: not (@eq (@Tpoint Tn) P2 B) *)
intro;subst;Col.
(* Goal: @OS Tn B A P2 P2 *)
apply one_side_reflexivity.
(* Goal: not (@Col Tn P2 B A) *)
Col.
Qed.
Lemma l11_22_bet :
forall A B C P A' B' C' P',
Bet A B C ->
TS P' B' A' C' ->
CongA A B P A' B' P' /\ CongA P B C P' B' C' ->
Bet A' B' C'.
Lemma l11_22a :
forall A B C P A' B' C' P',
TS B P A C /\ TS B' P' A' C' /\
CongA A B P A' B' P' /\ CongA P B C P' B' C' ->
CongA A B C A' B' C'.
Lemma l11_22b :
forall A B C P A' B' C' P',
OS B P A C /\ OS B' P' A' C' /\
CongA A B P A' B' P' /\ CongA P B C P' B' C' ->
CongA A B C A' B' C'.
Lemma l11_22 :
forall A B C P A' B' C' P',
((TS B P A C /\ TS B' P' A' C')\/
(OS B P A C /\ OS B' P' A' C')) /\
CongA A B P A' B' P' /\ CongA P B C P' B' C' ->
CongA A B C A' B' C'.
Proof.
(* Goal: forall (A B C P A' B' C' P' : @Tpoint Tn) (_ : and (or (and (@TS Tn B P A C) (@TS Tn B' P' A' C')) (and (@OS Tn B P A C) (@OS Tn B' P' A' C'))) (and (@CongA Tn A B P A' B' P') (@CongA Tn P B C P' B' C'))), @CongA Tn A B C A' B' C' *)
intros.
(* Goal: @CongA Tn A B C A' B' C' *)
spliter.
(* Goal: @CongA Tn A B C A' B' C' *)
induction H.
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @CongA Tn A B C A' B' C' *)
eapply (l11_22a _ _ _ P _ _ _ P');tauto.
(* Goal: @CongA Tn A B C A' B' C' *)
eapply (l11_22b _ _ _ P _ _ _ P');tauto.
Qed.
Lemma l11_24 :
forall P A B C,
InAngle P A B C -> InAngle P C B A.
Proof.
(* Goal: forall (P A B C : @Tpoint Tn) (_ : @InAngle Tn P A B C), @InAngle Tn P C B A *)
unfold InAngle.
(* Goal: forall (P A B C : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) P B)) (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))))))), and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn C X A) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P)))))) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn C X A) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P)))))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn C X A) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P)))))) *)
ex_and H2 X.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) P B)) (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn C X A) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P)))))) *)
repeat split; try assumption.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn C X A) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists X.
(* Goal: and (@Bet Tn C X A) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P)) *)
split.
(* Goal: or (@eq (@Tpoint Tn) X B) (@Out Tn B X P) *)
(* Goal: @Bet Tn C X A *)
apply between_symmetry.
(* Goal: or (@eq (@Tpoint Tn) X B) (@Out Tn B X P) *)
(* Goal: @Bet Tn A X C *)
assumption.
(* Goal: or (@eq (@Tpoint Tn) X B) (@Out Tn B X P) *)
assumption.
Qed.
Lemma out_in_angle :
forall A B C P,
Out B A C -> Out B P A ->
InAngle P A B C.
Lemma col_in_angle :
forall A B C P,
A <> B -> C <> B -> P <> B ->
Out B A P \/ Out B C P ->
InAngle P A B C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)) (_ : not (@eq (@Tpoint Tn) P B)) (_ : or (@Out Tn B A P) (@Out Tn B C P)), @InAngle Tn P A B C *)
intros.
(* Goal: @InAngle Tn P A B C *)
induction H2.
(* Goal: @InAngle Tn P A B C *)
(* Goal: @InAngle Tn P A B C *)
repeat split; try assumption.
(* Goal: @InAngle Tn P A B C *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists A.
(* Goal: @InAngle Tn P A B C *)
(* Goal: and (@Bet Tn A A C) (or (@eq (@Tpoint Tn) A B) (@Out Tn B A P)) *)
split.
(* Goal: @InAngle Tn P A B C *)
(* Goal: or (@eq (@Tpoint Tn) A B) (@Out Tn B A P) *)
(* Goal: @Bet Tn A A C *)
apply between_symmetry.
(* Goal: @InAngle Tn P A B C *)
(* Goal: or (@eq (@Tpoint Tn) A B) (@Out Tn B A P) *)
(* Goal: @Bet Tn C A A *)
apply between_trivial.
(* Goal: @InAngle Tn P A B C *)
(* Goal: or (@eq (@Tpoint Tn) A B) (@Out Tn B A P) *)
right.
(* Goal: @InAngle Tn P A B C *)
(* Goal: @Out Tn B A P *)
assumption.
(* Goal: @InAngle Tn P A B C *)
repeat split; try assumption.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists C.
(* Goal: and (@Bet Tn A C C) (or (@eq (@Tpoint Tn) C B) (@Out Tn B C P)) *)
split.
(* Goal: or (@eq (@Tpoint Tn) C B) (@Out Tn B C P) *)
(* Goal: @Bet Tn A C C *)
apply between_trivial.
(* Goal: or (@eq (@Tpoint Tn) C B) (@Out Tn B C P) *)
right.
(* Goal: @Out Tn B C P *)
assumption.
Qed.
Lemma out321__inangle :
forall A B C P,
C <> B -> Out B A P ->
InAngle P A B C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) C B)) (_ : @Out Tn B A P), @InAngle Tn P A B C *)
intros.
(* Goal: @InAngle Tn P A B C *)
assert_diffs.
(* Goal: @InAngle Tn P A B C *)
apply col_in_angle; auto.
Qed.
Lemma inangle1123 :
forall A B C,
A <> B -> C <> B ->
InAngle A A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)), @InAngle Tn A A B C *)
intros.
(* Goal: @InAngle Tn A A B C *)
apply out321__inangle; auto.
(* Goal: @Out Tn B A A *)
apply out_trivial; auto.
Qed.
Lemma out341__inangle :
forall A B C P,
A <> B -> Out B C P ->
InAngle P A B C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Out Tn B C P), @InAngle Tn P A B C *)
intros.
(* Goal: @InAngle Tn P A B C *)
assert_diffs.
(* Goal: @InAngle Tn P A B C *)
apply col_in_angle; auto.
Qed.
Lemma inangle3123 :
forall A B C,
A <> B -> C <> B ->
InAngle C A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)), @InAngle Tn C A B C *)
intros.
(* Goal: @InAngle Tn C A B C *)
apply out341__inangle; auto.
(* Goal: @Out Tn B C C *)
apply out_trivial; auto.
Qed.
Lemma in_angle_two_sides :
forall A B C P,
~ Col B A P -> ~ Col B C P ->
InAngle P A B C ->
TS P B A C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : not (@Col Tn B A P)) (_ : not (@Col Tn B C P)) (_ : @InAngle Tn P A B C), @TS Tn P B A C *)
intros.
(* Goal: @TS Tn P B A C *)
unfold InAngle in H1.
(* Goal: @TS Tn P B A C *)
spliter.
(* Goal: @TS Tn P B A C *)
ex_and H4 X.
(* Goal: @TS Tn P B A C *)
induction H5.
(* Goal: @TS Tn P B A C *)
(* Goal: @TS Tn P B A C *)
subst X.
(* Goal: @TS Tn P B A C *)
(* Goal: @TS Tn P B A C *)
unfold TS.
(* Goal: @TS Tn P B A C *)
(* Goal: and (not (@Col Tn A P B)) (and (not (@Col Tn C P B)) (@ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)))) *)
repeat split.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
(* Goal: not (@Col Tn A P B) *)
intro.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
(* Goal: False *)
apply H.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
(* Goal: @Col Tn B A P *)
apply col_permutation_2.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
(* Goal: @Col Tn A P B *)
assumption.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
intro.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: False *)
apply H0.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: @Col Tn B C P *)
apply col_permutation_2.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: @Col Tn C P B *)
assumption.
(* Goal: @TS Tn P B A C *)
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
exists B.
(* Goal: @TS Tn P B A C *)
(* Goal: and (@Col Tn B P B) (@Bet Tn A B C) *)
split.
(* Goal: @TS Tn P B A C *)
(* Goal: @Bet Tn A B C *)
(* Goal: @Col Tn B P B *)
apply col_trivial_3.
(* Goal: @TS Tn P B A C *)
(* Goal: @Bet Tn A B C *)
assumption.
(* Goal: @TS Tn P B A C *)
repeat split.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
(* Goal: not (@Col Tn A P B) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
(* Goal: False *)
apply H.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
(* Goal: @Col Tn B A P *)
apply col_permutation_2.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
(* Goal: @Col Tn A P B *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: not (@Col Tn C P B) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: False *)
apply H0.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: @Col Tn B C P *)
apply col_permutation_2.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
(* Goal: @Col Tn C P B *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P B) (@Bet Tn A T C)) *)
exists X.
(* Goal: and (@Col Tn X P B) (@Bet Tn A X C) *)
split.
(* Goal: @Bet Tn A X C *)
(* Goal: @Col Tn X P B *)
apply out_col in H5.
(* Goal: @Bet Tn A X C *)
(* Goal: @Col Tn X P B *)
apply col_permutation_1.
(* Goal: @Bet Tn A X C *)
(* Goal: @Col Tn B X P *)
assumption.
(* Goal: @Bet Tn A X C *)
assumption.
Qed.
Lemma in_angle_out :
forall A B C P,
Out B A C ->
InAngle P A B C ->
Out B A P.
Lemma col_in_angle_out :
forall A B C P,
Col B A P ->
~ Bet A B C ->
InAngle P A B C ->
Out B A P.
Lemma l11_25_aux : forall P A B C A',
InAngle P A B C ->
~ Bet A B C ->
Out B A' A ->
InAngle P A' B C.
Lemma l11_25 : forall P A B C A' C' P',
InAngle P A B C ->
Out B A' A ->
Out B C' C ->
Out B P' P ->
InAngle P' A' B C'.
Lemma inangle_distincts : forall A B C P, InAngle P A B C ->
A <> B /\ C <> B /\ P <> B.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : @InAngle Tn P A B C), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (not (@eq (@Tpoint Tn) P B))) *)
intros; unfold InAngle in *; spliter; repeat split; assumption.
Qed.
Lemma segment_construction_0 : forall A B A', exists B', Cong A' B' A B.
Proof.
(* Goal: forall A B A' : @Tpoint Tn, @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
induction (eq_dec_points A B).
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
(* Goal: @Cong Tn A' A' A B *)
subst B.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
(* Goal: @Cong Tn A' A' A A *)
apply cong_trivial_identity.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
assert(exists X : Tpoint, A' <> X).
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => not (@eq (@Tpoint Tn) A' X)) *)
apply another_point.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
ex_and H0 X.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
assert(HH:=segment_construction_3 A' X A B H1 H).
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
ex_and HH B'.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @Cong Tn A' B' A B) *)
exists B'.
(* Goal: @Cong Tn A' B' A B *)
assumption.
Qed.
Lemma angle_construction_3 :
forall A B C A' B',
A <> B -> C <> B -> A' <> B' ->
exists C', CongA A B C A' B' C'.
Proof.
(* Goal: forall (A B C A' B' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)) (_ : not (@eq (@Tpoint Tn) A' B')), @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
assert(exists P, ~Col A' B' P).
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => not (@Col Tn A' B' P)) *)
eapply not_col_exists.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
ex_and H2 P.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
induction (eq_dec_points A C).
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
subst C.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B A A' B' C') *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: @CongA Tn A B A A' B' A' *)
apply conga_trivial_1; assumption.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
assert(exists C', CongA A B C A' B' C' /\ (OS A' B' C' P \/ Col A' B' C')).
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (or (@OS Tn A' B' C' P) (@Col Tn A' B' C'))) *)
apply angle_construction_2.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: not (@Col Tn A' B' P) *)
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
(* Goal: not (@eq (@Tpoint Tn) B C) *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: not (@Col Tn A' B' P) *)
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
(* Goal: not (@eq (@Tpoint Tn) B C) *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: not (@Col Tn A' B' P) *)
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
(* Goal: not (@eq (@Tpoint Tn) B C) *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: not (@Col Tn A' B' P) *)
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
(* Goal: not (@Col Tn A' B' P) *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
ex_and H4 C'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @CongA Tn A B C A' B' C') *)
exists C'.
(* Goal: @CongA Tn A B C A' B' C' *)
assumption.
Qed.
Lemma l11_28 : forall A B C D A' B' C',
Cong_3 A B C A' B' C' -> Col A C D ->
exists D', Cong A D A' D' /\ Cong B D B' D' /\ Cong C D C' D'.
Lemma bet_conga__bet :
forall A B C A' B' C',
Bet A B C ->
CongA A B C A' B' C' ->
Bet A' B' C'.
Lemma out_in_angle_out :
forall A B C P,
Out B A C ->
InAngle P A B C ->
Out B A P.
Lemma in_angle_one_side :
forall A B C P,
~ Col A B C ->
~ Col B A P ->
InAngle P A B C ->
OS A B P C.
Lemma inangle_one_side : forall A B C P Q , ~ Col A B C -> ~ Col A B P -> ~ Col A B Q ->
InAngle P A B C -> InAngle Q A B C ->
OS A B P Q.
Lemma inangle_one_side2 : forall A B C P Q , ~ Col A B C -> ~ Col A B P -> ~ Col A B Q ->
~ Col C B P -> ~ Col C B Q ->
InAngle P A B C -> InAngle Q A B C ->
OS A B P Q /\ OS C B P Q.
Proof.
(* Goal: forall (A B C P Q : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : not (@Col Tn A B P)) (_ : not (@Col Tn A B Q)) (_ : not (@Col Tn C B P)) (_ : not (@Col Tn C B Q)) (_ : @InAngle Tn P A B C) (_ : @InAngle Tn Q A B C), and (@OS Tn A B P Q) (@OS Tn C B P Q) *)
intros.
(* Goal: and (@OS Tn A B P Q) (@OS Tn C B P Q) *)
split.
(* Goal: @OS Tn C B P Q *)
(* Goal: @OS Tn A B P Q *)
apply (inangle_one_side _ _ C); Col.
(* Goal: @OS Tn C B P Q *)
apply (inangle_one_side _ _ A); Col.
(* Goal: @InAngle Tn Q C B A *)
(* Goal: @InAngle Tn P C B A *)
apply l11_24.
(* Goal: @InAngle Tn Q C B A *)
(* Goal: @InAngle Tn P A B C *)
auto.
(* Goal: @InAngle Tn Q C B A *)
apply l11_24.
(* Goal: @InAngle Tn Q A B C *)
auto.
Qed.
Lemma col_conga_col : forall A B C D E F, Col A B C -> CongA A B C D E F -> Col D E F.
Lemma ncol_conga_ncol : forall A B C D E F, ~ Col A B C -> CongA A B C D E F -> ~ Col D E F.
Lemma angle_construction_4 :
forall A B C A' B' P,
A <> B -> C <> B -> A' <> B' ->
exists C', CongA A B C A' B' C' /\ Coplanar A' B' C' P.
Proof.
(* Goal: forall (A B C A' B' P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)) (_ : not (@eq (@Tpoint Tn) A' B')), @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
destruct (col_dec A' B' P).
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
destruct (angle_construction_3 A B C A' B') as [C']; auto.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
exists C'; split; Cop.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
destruct (col_dec A B C).
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
destruct (angle_construction_3 A B C A' B') as [C']; auto.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
exists C'; split; auto.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
(* Goal: @Coplanar Tn A' B' C' P *)
exists C'; left; split; Col.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
(* Goal: @Col Tn A' B' C' *)
apply (col_conga_col A B C); assumption.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
destruct (angle_construction_1 A B C A' B' P) as [C' []]; auto.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@CongA Tn A B C A' B' C') (@Coplanar Tn A' B' C' P)) *)
exists C'; split; Cop.
Qed.
Lemma lea_distincts : forall A B C D E F, LeA A B C D E F ->
A<>B /\ C<>B /\ D<>E /\ F<>E.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LeA Tn A B C D E F), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
intros A B C D E F Hlea.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
destruct Hlea as [X [HInAngle HConga]].
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
destruct HInAngle as [HDE [HEF _]].
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
repeat split; auto.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
apply (conga_diff1 A B C D E X); auto.
(* Goal: not (@eq (@Tpoint Tn) C B) *)
apply (conga_diff2 A B C D E X); auto.
Qed.
Lemma gea_distincts : forall A B C D E F, GeA A B C D E F ->
A<>B /\ C<>B /\ D<>E /\ F<>E.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @GeA Tn A B C D E F), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
intros A B C D E F Hgea.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
apply lea_distincts in Hgea.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
repeat split; auto.
Qed.
Lemma l11_29_a : forall A B C D E F, LeA A B C D E F ->
exists Q, InAngle C A B Q /\ CongA A B Q D E F.
Lemma in_angle_line : forall A B C P, P <> B -> A <> B -> C <> B -> Bet A B C -> InAngle P A B C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) P B)) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)) (_ : @Bet Tn A B C), @InAngle Tn P A B C *)
intros.
(* Goal: @InAngle Tn P A B C *)
repeat split; try assumption.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists B.
(* Goal: and (@Bet Tn A B C) (or (@eq (@Tpoint Tn) B B) (@Out Tn B B P)) *)
split.
(* Goal: or (@eq (@Tpoint Tn) B B) (@Out Tn B B P) *)
(* Goal: @Bet Tn A B C *)
assumption.
(* Goal: or (@eq (@Tpoint Tn) B B) (@Out Tn B B P) *)
left.
(* Goal: @eq (@Tpoint Tn) B B *)
reflexivity.
Qed.
Lemma l11_29_b : forall A B C D E F, (exists Q, InAngle C A B Q /\ CongA A B Q D E F) ->
LeA A B C D E F.
Lemma bet_in_angle_bet : forall A B C P, Bet A B P -> InAngle P A B C -> Bet A B C.
Lemma lea_line : forall A B C P, Bet A B P -> LeA A B P A B C -> Bet A B C.
Lemma eq_conga_out : forall A B D E F, CongA A B A D E F -> Out E D F.
Lemma conga_ex_cong3 : forall A B C A' B' C',
CongA A B C A' B' C' -> exists AA, exists CC, Out B A AA -> Out B C CC -> Cong_3 AA B CC A' B' C'.
Lemma conga_preserves_in_angle : forall A B C I A' B' C' I',
CongA A B C A' B' C' -> CongA A B I A' B' I' ->
InAngle I A B C -> OS A' B' I' C' ->
InAngle I' A' B' C'.
Lemma l11_30 : forall A B C D E F A' B' C' D' E' F',
LeA A B C D E F ->
CongA A B C A' B' C' ->
CongA D E F D' E' F' ->
LeA A' B' C' D' E' F'.
Lemma l11_31_1 : forall A B C D E F,
Out B A C -> D <> E -> F <> E ->
LeA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Out Tn B A C) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) F E)), @LeA Tn A B C D E F *)
intros.
(* Goal: @LeA Tn A B C D E F *)
unfold LeA.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P D E F) (@CongA Tn A B C D E P)) *)
exists D.
(* Goal: and (@InAngle Tn D D E F) (@CongA Tn A B C D E D) *)
split.
(* Goal: @CongA Tn A B C D E D *)
(* Goal: @InAngle Tn D D E F *)
apply inangle1123; assumption.
(* Goal: @CongA Tn A B C D E D *)
apply l11_21_b.
(* Goal: @Out Tn E D D *)
(* Goal: @Out Tn B A C *)
assumption.
(* Goal: @Out Tn E D D *)
apply out_trivial.
(* Goal: not (@eq (@Tpoint Tn) D E) *)
auto.
Qed.
Lemma l11_31_2 : forall A B C D E F,
A <> B -> C <> B -> D <> E -> F <> E ->
Bet D E F ->
LeA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : 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 D E F), @LeA Tn A B C D E F *)
intros; destruct (angle_construction_3 A B C D E) as [P HCongA]; auto.
(* Goal: @LeA Tn A B C D E F *)
exists P; split; try apply in_angle_line; unfold CongA in *; spliter; auto.
Qed.
Lemma lea_refl : forall A B C,
A <> B -> C <> B -> LeA A B C A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)), @LeA Tn A B C A B C *)
intros.
(* Goal: @LeA Tn A B C A B C *)
unfold LeA.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn A B C A B P)) *)
exists C .
(* Goal: and (@InAngle Tn C A B C) (@CongA Tn A B C A B C) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @InAngle Tn C A B C *)
apply inangle3123; assumption.
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; assumption.
Qed.
Lemma conga__lea : forall A B C D E F,
CongA A B C D E F -> LeA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @CongA 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.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P D E F) (@CongA Tn A B C D E P)) *)
exists F.
(* Goal: and (@InAngle Tn F D E F) (@CongA Tn A B C D E F) *)
split.
(* Goal: @CongA Tn A B C D E F *)
(* Goal: @InAngle Tn F D E F *)
apply inangle3123.
(* Goal: @CongA Tn A B C D E F *)
(* Goal: not (@eq (@Tpoint Tn) F E) *)
(* Goal: not (@eq (@Tpoint Tn) D E) *)
apply (conga_diff45 A B C D E F); assumption.
(* Goal: @CongA Tn A B C D E F *)
(* Goal: not (@eq (@Tpoint Tn) F E) *)
apply (conga_diff56 A B C D); assumption.
(* Goal: @CongA Tn A B C D E F *)
assumption.
Qed.
Lemma conga__lea456123 : forall A B C D E F,
CongA A B C D E F -> LeA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @CongA Tn A B C D E F), @LeA Tn D E F A B C *)
intros; apply conga__lea, conga_sym; trivial.
Qed.
Lemma lea_out4__lea : forall A B C D E F A' C' D' F',
LeA A B C D E F -> Out B A A' -> Out B C C' -> Out E D D' -> Out E F F' ->
LeA A' B C' D' E F'.
Proof.
(* Goal: forall (A B C D E F A' C' D' F' : @Tpoint Tn) (_ : @LeA Tn A B C D E F) (_ : @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' *)
intros A B C D E F A' C' D' F' Hl HA HC HD HF.
(* Goal: @LeA Tn A' B C' D' E F' *)
apply (l11_30 A B C D E F); trivial; apply out2__conga; apply l6_6; assumption.
Qed.
Lemma lea121345 : forall A B C D E, A<>B -> C<>D -> D<>E -> LeA A B A C D E.
Proof.
(* Goal: forall (A B C D E : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C D)) (_ : not (@eq (@Tpoint Tn) D E)), @LeA Tn A B A C D E *)
intros A B C D E HAB HCD HDE.
(* Goal: @LeA Tn A B A C D E *)
apply l11_31_1; try (apply out_trivial); auto.
Qed.
Lemma inangle__lea : forall A B C P, InAngle P A B C -> LeA A B P A B C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : @InAngle Tn P A B C), @LeA Tn A B P A B C *)
intros A B C P HIn.
(* Goal: @LeA Tn A B P A B C *)
exists P; split; trivial.
(* Goal: @CongA Tn A B P A B P *)
unfold InAngle in HIn; spliter.
(* Goal: @CongA Tn A B P A B P *)
apply conga_refl; auto.
Qed.
Lemma in_angle_trans : forall A B C D E,
InAngle C A B D -> InAngle D A B E -> InAngle C A B E.
Lemma lea_trans : forall A B C A1 B1 C1 A2 B2 C2,
LeA A B C A1 B1 C1 ->
LeA A1 B1 C1 A2 B2 C2 ->
LeA A B C A2 B2 C2.
Lemma in_angle_asym : forall A B C D,
InAngle D A B C -> InAngle C A B D -> CongA A B C A B D.
Lemma lea_asym : forall A B C D E F,
LeA A B C D E F -> LeA D E F A B C -> CongA A B C D E F.
Lemma col_lta__bet : forall A B C X Y Z, Col X Y Z -> LtA A B C X Y Z -> Bet X Y Z.
Proof.
(* Goal: forall (A B C X Y Z : @Tpoint Tn) (_ : @Col Tn X Y Z) (_ : @LtA Tn A B C X Y Z), @Bet Tn X Y Z *)
intros.
(* Goal: @Bet Tn X Y Z *)
destruct H0.
(* Goal: @Bet Tn X Y Z *)
assert (Hd := H0).
(* Goal: @Bet Tn X Y Z *)
apply not_out_bet.
(* Goal: not (@Out Tn Y X Z) *)
(* Goal: @Col Tn X Y Z *)
assumption.
(* Goal: not (@Out Tn Y X Z) *)
intro.
(* Goal: False *)
apply H1.
(* Goal: @CongA Tn A B C X Y Z *)
apply lea_asym.
(* Goal: @LeA Tn X Y Z A B C *)
(* Goal: @LeA Tn A B C X Y Z *)
assumption.
(* Goal: @LeA Tn X Y Z A B C *)
apply lea_distincts in H0.
(* Goal: @LeA Tn X Y Z A B C *)
spliter.
(* Goal: @LeA Tn X Y Z A B C *)
apply l11_31_1; auto.
Qed.
Lemma col_lta__out : forall A B C X Y Z, Col A B C -> LtA A B C X Y Z -> Out B A C.
Proof.
(* Goal: forall (A B C X Y Z : @Tpoint Tn) (_ : @Col Tn A B C) (_ : @LtA Tn A B C X Y Z), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B A C *)
apply not_bet_out.
(* Goal: not (@Bet Tn A B C) *)
(* Goal: @Col Tn A B C *)
assumption.
(* Goal: not (@Bet Tn A B C) *)
intro.
(* Goal: False *)
destruct H0.
(* Goal: False *)
apply H2.
(* Goal: @CongA Tn A B C X Y Z *)
apply lea_asym.
(* Goal: @LeA Tn X Y Z A B C *)
(* Goal: @LeA Tn A B C X Y Z *)
assumption.
(* Goal: @LeA Tn X Y Z A B C *)
apply lea_distincts in H0.
(* Goal: @LeA Tn X Y Z A B C *)
spliter.
(* Goal: @LeA Tn X Y Z A B C *)
apply l11_31_2; auto.
Qed.
Lemma lta_distincts : forall A B C D E F, LtA A B C D E F ->
A<>B /\ C<>B /\ D<>E /\ F<>E /\ D <> F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LtA Tn A B C D E F), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) D F))))) *)
intros A B C D E F Hlta.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) D F))))) *)
assert (Hlea : LeA A B C D E F) by (destruct Hlta; assumption).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) D F))))) *)
apply lea_distincts in Hlea.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) D F))))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) D F))))) *)
repeat split; auto.
(* Goal: not (@eq (@Tpoint Tn) D F) *)
intro.
(* Goal: False *)
subst F.
(* Goal: False *)
assert (Bet D E D) by (apply (col_lta__bet A B C); Col).
(* Goal: False *)
treat_equalities; auto.
Qed.
Lemma gta_distincts : forall A B C D E F, GtA A B C D E F ->
A<>B /\ C<>B /\ D<>E /\ F<>E /\ A <> C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @GtA Tn A B C D E F), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) A C))))) *)
intros A B C D E F Hgta.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) A C))))) *)
apply lta_distincts in Hgta.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) A C))))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (not (@eq (@Tpoint Tn) A C))))) *)
repeat split; auto.
Qed.
Lemma acute_distincts : forall A B C, Acute A B C -> A<>B /\ C<>B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Acute Tn A B C), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
intros A B C Hacute.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
destruct Hacute as [x [y [z [HPer Hlta]]]].
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
apply lta_distincts in Hlta.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
split; auto.
Qed.
Lemma obtuse_distincts : forall A B C, Obtuse A B C -> A<>B /\ C<>B /\ A <> C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Obtuse Tn A B C), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (not (@eq (@Tpoint Tn) A C))) *)
intros A B C Hobtuse.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (not (@eq (@Tpoint Tn) A C))) *)
destruct Hobtuse as [x [y [z [HPer Hgta]]]].
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (not (@eq (@Tpoint Tn) A C))) *)
apply gta_distincts in Hgta.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (not (@eq (@Tpoint Tn) A C))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (not (@eq (@Tpoint Tn) A C))) *)
split; auto.
Qed.
Lemma two_sides_in_angle : forall A B C P P',
B <> P' ->
TS B P A C ->
Bet P B P' ->
InAngle P A B C \/ InAngle P' A B C.
Lemma in_angle_reverse :
forall A B A' C D,
A' <> B ->
Bet A B A' ->
InAngle C A B D ->
InAngle D A' B C.
Lemma in_angle_trans2 : forall A B C D E, InAngle C A B D -> InAngle D A B E -> InAngle D C B E.
Proof.
(* Goal: forall (A B C D E : @Tpoint Tn) (_ : @InAngle Tn C A B D) (_ : @InAngle Tn D A B E), @InAngle Tn D C B E *)
intros A B C D E HC HD.
(* Goal: @InAngle Tn D C B E *)
destruct (segment_construction E B E B) as [E' [HE1 HE2]].
(* Goal: @InAngle Tn D C B E *)
assert (Hd := HD).
(* Goal: @InAngle Tn D C B E *)
apply inangle_distincts in Hd.
(* Goal: @InAngle Tn D C B E *)
spliter; assert_diffs.
(* Goal: @InAngle Tn D C B E *)
apply l11_24, in_angle_reverse with E'; Between.
(* Goal: @InAngle Tn C E' B D *)
apply l11_24, in_angle_trans with A; apply l11_24; trivial.
(* Goal: @InAngle Tn A E' B D *)
apply in_angle_reverse with E; auto.
(* Goal: @InAngle Tn D E B A *)
apply l11_24; trivial.
Qed.
Lemma l11_36 : forall A B C D E F A' D',
A <> B -> A' <> B -> D <> E -> D' <> E ->
Bet A B A' -> Bet D E D' ->
(LeA A B C D E F <-> LeA D' E F A' B C).
Lemma l11_41_aux : forall A B C D,
~ Col A B C ->
Bet B A D ->
A <> D ->
LtA A C B C A D.
Lemma l11_41 : forall A B C D,
~ Col A B C ->
Bet B A D ->
A <> D ->
LtA A C B C A D /\ LtA A B C C A D.
Lemma not_conga : forall A B C A' B' C' D E F ,
CongA A B C A' B' C' ->
~ CongA A B C D E F ->
~ CongA A' B' C' D E F.
Lemma not_conga_sym : forall A B C D E F,
~ CongA A B C D E F ->
~ CongA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@CongA Tn A B C D E F)), not (@CongA Tn D E F A B C) *)
intros.
(* Goal: not (@CongA Tn D E F A B C) *)
intro.
(* Goal: False *)
apply H.
(* Goal: @CongA Tn A B C D E F *)
apply conga_sym.
(* Goal: @CongA Tn D E F A B C *)
assumption.
Qed.
Lemma not_and_lta : forall A B C D E F, ~ (LtA A B C D E F /\ LtA D E F A B C).
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, not (and (@LtA Tn A B C D E F) (@LtA Tn D E F A B C)) *)
intros.
(* Goal: not (and (@LtA Tn A B C D E F) (@LtA Tn D E F A B C)) *)
intro.
(* Goal: False *)
unfold LtA in *.
(* Goal: False *)
spliter.
(* Goal: False *)
assert(CongA A B C D E F).
(* Goal: False *)
(* Goal: @CongA Tn A B C D E F *)
apply lea_asym.
(* Goal: False *)
(* Goal: @LeA Tn D E F A B C *)
(* Goal: @LeA Tn A B C D E F *)
assumption.
(* Goal: False *)
(* Goal: @LeA Tn D E F A B C *)
assumption.
(* Goal: False *)
contradiction.
Qed.
Lemma conga_preserves_lta : forall A B C D E F A' B' C' D' E' F',
CongA A B C A' B' C' ->
CongA D E F D' E' F' ->
LtA A B C D E F ->
LtA A' B' C' D' E' F'.
Lemma conga_preserves_gta : forall A B C D E F A' B' C' D' E' F',
CongA A B C A' B' C' ->
CongA D E F D' E' F' ->
GtA A B C D E F ->
GtA A' B' C' D' E' F'.
Lemma lta_trans : forall A B C A1 B1 C1 A2 B2 C2,
LtA A B C A1 B1 C1 ->
LtA A1 B1 C1 A2 B2 C2 ->
LtA A B C A2 B2 C2.
Lemma gta_trans : forall A B C A1 B1 C1 A2 B2 C2,
GtA A B C A1 B1 C1 ->
GtA A1 B1 C1 A2 B2 C2 ->
GtA A B C A2 B2 C2.
Lemma lea_left_comm : forall A B C D E F, LeA A B C D E F -> LeA C B A D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LeA Tn A B C D E F), @LeA Tn C B A D E F *)
intros.
(* Goal: @LeA Tn C B A D E F *)
unfold LeA in *.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P D E F) (@CongA Tn C B A D E P)) *)
ex_and H P.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P D E F) (@CongA Tn C B A D E P)) *)
exists P.
(* Goal: and (@InAngle Tn P D E F) (@CongA Tn C B A D E P) *)
split.
(* Goal: @CongA Tn C B A D E P *)
(* Goal: @InAngle Tn P D E F *)
assumption.
(* Goal: @CongA Tn C B A D E P *)
apply conga_left_comm.
(* Goal: @CongA Tn A B C D E P *)
assumption.
Qed.
Lemma lea_right_comm : forall A B C D E F, LeA A B C D E F -> LeA A B C F E D.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LeA Tn A B C D E F), @LeA Tn A B C F E D *)
intros.
(* Goal: @LeA Tn A B C F E D *)
apply l11_29_b.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@InAngle Tn C A B Q) (@CongA Tn A B Q F E D)) *)
apply l11_29_a in H.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@InAngle Tn C A B Q) (@CongA Tn A B Q F E D)) *)
ex_and H P.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@InAngle Tn C A B Q) (@CongA Tn A B Q F E D)) *)
exists P.
(* Goal: and (@InAngle Tn C A B P) (@CongA Tn A B P F E D) *)
split.
(* Goal: @CongA Tn A B P F E D *)
(* Goal: @InAngle Tn C A B P *)
assumption.
(* Goal: @CongA Tn A B P F E D *)
apply conga_right_comm.
(* Goal: @CongA Tn A B P D E F *)
assumption.
Qed.
Lemma lea_comm : forall A B C D E F, LeA A B C D E F -> LeA C B A F E D.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LeA Tn A B C D E F), @LeA Tn C B A F E D *)
intros.
(* Goal: @LeA Tn C B A F E D *)
apply lea_left_comm.
(* Goal: @LeA Tn A B C F E D *)
apply lea_right_comm.
(* Goal: @LeA Tn A B C D E F *)
assumption.
Qed.
Lemma lta_left_comm : forall A B C D E F, LtA A B C D E F -> LtA C B A D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LtA Tn A B C D E F), @LtA Tn C B A D E F *)
unfold LtA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : and (@LeA Tn A B C D E F) (not (@CongA Tn A B C D E F))), and (@LeA Tn C B A D E F) (not (@CongA Tn C B A D E F)) *)
intros.
(* Goal: and (@LeA Tn C B A D E F) (not (@CongA Tn C B A D E F)) *)
spliter.
(* Goal: and (@LeA Tn C B A D E F) (not (@CongA Tn C B A D E F)) *)
split.
(* Goal: not (@CongA Tn C B A D E F) *)
(* Goal: @LeA Tn C B A D E F *)
apply lea_left_comm.
(* Goal: not (@CongA Tn C B A D E F) *)
(* Goal: @LeA Tn A B C D E F *)
assumption.
(* Goal: not (@CongA Tn C B A D E F) *)
intro.
(* Goal: False *)
apply H0.
(* Goal: @CongA Tn A B C D E F *)
apply conga_left_comm.
(* Goal: @CongA Tn C B A D E F *)
assumption.
Qed.
Lemma lta_right_comm : forall A B C D E F, LtA A B C D E F -> LtA A B C F E D.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LtA Tn A B C D E F), @LtA Tn A B C F E D *)
unfold LtA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : and (@LeA Tn A B C D E F) (not (@CongA Tn A B C D E F))), and (@LeA Tn A B C F E D) (not (@CongA Tn A B C F E D)) *)
intros.
(* Goal: and (@LeA Tn A B C F E D) (not (@CongA Tn A B C F E D)) *)
spliter.
(* Goal: and (@LeA Tn A B C F E D) (not (@CongA Tn A B C F E D)) *)
split.
(* Goal: not (@CongA Tn A B C F E D) *)
(* Goal: @LeA Tn A B C F E D *)
apply lea_right_comm.
(* Goal: not (@CongA Tn A B C F E D) *)
(* Goal: @LeA Tn A B C D E F *)
assumption.
(* Goal: not (@CongA Tn A B C F E D) *)
intro.
(* Goal: False *)
apply H0.
(* Goal: @CongA Tn A B C D E F *)
apply conga_right_comm.
(* Goal: @CongA Tn A B C F E D *)
assumption.
Qed.
Lemma lta_comm : forall A B C D E F, LtA A B C D E F -> LtA C B A F E D.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LtA Tn A B C D E F), @LtA Tn C B A F E D *)
intros.
(* Goal: @LtA Tn C B A F E D *)
apply lta_left_comm.
(* Goal: @LtA Tn A B C F E D *)
apply lta_right_comm.
(* Goal: @LtA Tn A B C D E F *)
assumption.
Qed.
Lemma obtuse_sym : forall A B C, Obtuse A B C -> Obtuse C B A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Obtuse Tn A B C), @Obtuse Tn C B A *)
unfold Obtuse.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@GtA Tn A B C A' B' C'))))), @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@GtA Tn C B A A' B' C')))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@GtA Tn C B A A' B' C')))) *)
ex_and H A'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@GtA Tn C B A A' B' C')))) *)
ex_and H0 B'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@GtA Tn C B A A' B' C')))) *)
ex_and H C'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@GtA Tn C B A A' B' C')))) *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@GtA Tn C B A A' B' C'))) *)
exists B'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@GtA Tn C B A A' B' C')) *)
exists C'.
(* Goal: and (@Per Tn A' B' C') (@GtA Tn C B A A' B' C') *)
split.
(* Goal: @GtA Tn C B A A' B' C' *)
(* Goal: @Per Tn A' B' C' *)
assumption.
(* Goal: @GtA Tn C B A A' B' C' *)
unfold GtA in *.
(* Goal: @LtA Tn A' B' C' C B A *)
apply lta_right_comm.
(* Goal: @LtA Tn A' B' C' A B C *)
assumption.
Qed.
Lemma acute_sym : forall A B C, Acute A B C -> Acute C B A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Acute Tn A B C), @Acute Tn C B A *)
unfold Acute.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn A B C A' B' C'))))), @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn C B A A' B' C')))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn C B A A' B' C')))) *)
ex_and H A'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn C B A A' B' C')))) *)
ex_and H0 B'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn C B A A' B' C')))) *)
ex_and H C'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn C B A A' B' C')))) *)
exists A'.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn C B A A' B' C'))) *)
exists B'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn C B A A' B' C')) *)
exists C'.
(* Goal: and (@Per Tn A' B' C') (@LtA Tn C B A A' B' C') *)
split;auto using lta_left_comm.
Qed.
Lemma acute_col__out : forall A B C, Col A B C -> Acute A B C -> Out B A C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C) (_ : @Acute Tn A B C), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B A C *)
destruct H0 as [X [Y [Z []]]].
(* Goal: @Out Tn B A C *)
apply col_lta__out with X Y Z; assumption.
Qed.
Lemma col_obtuse__bet : forall A B C, Col A B C -> Obtuse A B C -> Bet A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C) (_ : @Obtuse Tn A B C), @Bet Tn A B C *)
intros.
(* Goal: @Bet Tn A B C *)
destruct H0 as [X [Y [Z []]]].
(* Goal: @Bet Tn A B C *)
apply (col_lta__bet X Y Z); assumption.
Qed.
Lemma out__acute : forall A B C, Out B A C -> Acute A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Out Tn B A C), @Acute Tn A B C *)
intros A B C Hout.
(* Goal: @Acute Tn A B C *)
assert_diffs.
(* Goal: @Acute Tn A B C *)
assert(HD := perp_exists B A B).
(* Goal: @Acute Tn A B C *)
destruct HD as [D]; auto.
(* Goal: @Acute Tn A B C *)
assert_diffs.
(* Goal: @Acute Tn A B C *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A B' C') (@LtA Tn A B C A B' C'))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A B C') (@LtA Tn A B C A B C')) *)
exists D.
(* Goal: and (@Per Tn A B D) (@LtA Tn A B C A B D) *)
split; Perp.
(* Goal: @LtA Tn A B C A B D *)
split.
(* Goal: not (@CongA Tn A B C A B D) *)
(* Goal: @LeA Tn A B C A B D *)
apply l11_31_1; auto.
(* Goal: not (@CongA Tn A B C A B D) *)
intro.
(* Goal: False *)
assert(HNCol : ~ Col A B D) by (apply per_not_col; Perp).
(* Goal: False *)
apply HNCol.
(* Goal: @Col Tn A B D *)
apply col_permutation_4.
(* Goal: @Col Tn B A D *)
apply out_col.
(* Goal: @Out Tn B A D *)
apply (l11_21_a A B C); auto.
Qed.
Lemma bet__obtuse : forall A B C, Bet A B C -> A <> B -> B <> C -> Obtuse A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)), @Obtuse Tn A B C *)
intros A B C HBet HAB HBC.
(* Goal: @Obtuse Tn A B C *)
assert(HD := perp_exists B A B).
(* Goal: @Obtuse Tn A B C *)
destruct HD as [D]; auto.
(* Goal: @Obtuse Tn A B C *)
assert_diffs.
(* Goal: @Obtuse Tn A B C *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A B' C') (@GtA Tn A B C A B' C'))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A B C') (@GtA Tn A B C A B C')) *)
exists D.
(* Goal: and (@Per Tn A B D) (@GtA Tn A B C A B D) *)
split; Perp.
(* Goal: @GtA Tn A B C A B D *)
split.
(* Goal: not (@CongA Tn A B D A B C) *)
(* Goal: @LeA Tn A B D A B C *)
apply l11_31_2; auto.
(* Goal: not (@CongA Tn A B D A B C) *)
intro.
(* Goal: False *)
assert(HNCol : ~ Col A B D) by (apply per_not_col; Perp).
(* Goal: False *)
apply HNCol.
(* Goal: @Col Tn A B D *)
apply bet_col.
(* Goal: @Bet Tn A B D *)
apply (bet_conga__bet A B C); try (apply conga_sym); auto.
Qed.
Lemma l11_43_aux : forall A B C, A <> B -> A <> C -> (Per B A C \/ Obtuse B A C) -> Acute A B C.
Lemma l11_43 : forall A B C, A <> B -> A <> C -> (Per B A C \/ Obtuse B A C) -> Acute A B C /\ Acute A C B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A C)) (_ : or (@Per Tn B A C) (@Obtuse Tn B A C)), and (@Acute Tn A B C) (@Acute Tn A C B) *)
intros.
(* Goal: and (@Acute Tn A B C) (@Acute Tn A C B) *)
split.
(* Goal: @Acute Tn A C B *)
(* Goal: @Acute Tn A B C *)
apply l11_43_aux;auto.
(* Goal: @Acute Tn A C B *)
apply l11_43_aux;auto.
(* Goal: or (@Per Tn C A B) (@Obtuse Tn C A B) *)
induction H1.
(* Goal: or (@Per Tn C A B) (@Obtuse Tn C A B) *)
(* Goal: or (@Per Tn C A B) (@Obtuse Tn C A B) *)
left;finish.
(* Goal: or (@Per Tn C A B) (@Obtuse Tn C A B) *)
right;apply obtuse_sym;assumption.
Qed.
Lemma acute_lea_acute : forall A B C D E F, Acute D E F -> LeA A B C D E F -> Acute A B C.
Lemma obtuse_gea_obtuse : forall A B C D E F, Obtuse D E F -> GeA A B C D E F -> Obtuse A B C.
Lemma l11_44_1_a : forall A B C, A <> B -> A <> C -> Cong B A B C -> CongA B A C B C A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A C)) (_ : @Cong Tn B A B C), @CongA Tn B A C B C A *)
intros.
(* Goal: @CongA Tn B A C B C A *)
destruct (midpoint_existence A C) as [P HP].
(* Goal: @CongA Tn B A C B C A *)
assert_diffs.
(* Goal: @CongA Tn B A C B C A *)
assert(Cong_3 B C P B A P) by (repeat split;finish).
(* Goal: @CongA Tn B A C B C A *)
assert(CongA B C P B A P) by (auto using cong3_conga).
(* Goal: @CongA Tn B A C B C A *)
apply conga_sym.
(* Goal: @CongA Tn B C A B A C *)
eapply l11_10 with B P B P;finish.
Qed.
Lemma l11_44_2_a : forall A B C, ~ Col A B C -> Lt B A B C -> LtA B C A B A C.
Lemma not_lta_and_conga : forall A B C D E F, ~ (LtA A B C D E F /\ CongA A B C D E F).
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, not (and (@LtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
intros.
(* Goal: not (and (@LtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
intro.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold LtA in H.
(* Goal: False *)
spliter.
(* Goal: False *)
contradiction.
Qed.
Lemma not_gta_and_conga : forall A B C D E F, ~ (GtA A B C D E F /\ CongA A B C D E F).
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, not (and (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
intros.
(* Goal: not (and (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
intro.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold GtA in H.
(* Goal: False *)
unfold LtA in H.
(* Goal: False *)
spliter.
(* Goal: False *)
apply conga_sym in H0.
(* Goal: False *)
contradiction.
Qed.
Lemma not_lta_and_gta : forall A B C D E F, ~ (LtA A B C D E F /\ GtA A B C D E F).
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, not (and (@LtA Tn A B C D E F) (@GtA Tn A B C D E F)) *)
intros.
(* Goal: not (and (@LtA Tn A B C D E F) (@GtA Tn A B C D E F)) *)
intro.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold GtA in H0.
(* Goal: False *)
unfold LtA in *.
(* Goal: False *)
spliter.
(* Goal: False *)
apply H2.
(* Goal: @CongA Tn A B C D E F *)
apply lea_asym.
(* Goal: @LeA Tn D E F A B C *)
(* Goal: @LeA Tn A B C D E F *)
assumption.
(* Goal: @LeA Tn D E F A B C *)
assumption.
Qed.
Lemma conga_sym_equiv : forall A B C A' B' C', CongA A B C A' B' C' <-> CongA A' B' C' A B C.
Proof.
(* Goal: forall A B C A' B' C' : @Tpoint Tn, iff (@CongA Tn A B C A' B' C') (@CongA Tn A' B' C' A B C) *)
intros.
(* Goal: iff (@CongA Tn A B C A' B' C') (@CongA Tn A' B' C' A B C) *)
split; apply conga_sym.
Qed.
Lemma conga_dec :
forall A B C D E F,
CongA A B C D E F \/ ~ CongA A B C D E F.
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
intros.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
induction (eq_dec_points A B).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
subst;right;intro;unfold CongA in *;intuition.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
induction (eq_dec_points C B).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
subst;right;intro;unfold CongA in *;intuition.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
induction (eq_dec_points D E).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
subst;right;intro;unfold CongA in *;intuition.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
induction (eq_dec_points F E).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
subst;right;intro;unfold CongA in *;intuition.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
assert (exists A' : Tpoint, Bet B A A' /\ Cong A A' E D) by (apply segment_construction).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
decompose [ex and] H3; clear H3.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
assert (exists C' : Tpoint, Bet B C C' /\ Cong C C' E F) by (apply segment_construction).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
decompose [ex and] H3; clear H3.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
assert (exists D' : Tpoint, Bet E D D' /\ Cong D D' B A) by (apply segment_construction).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
decompose [ex and] H3; clear H3.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
assert (exists F' : Tpoint, Bet E F F' /\ Cong F F' B C) by (apply segment_construction).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
decompose [ex and] H3; clear H3.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
induction (cong_dec x x0 x1 x2).
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
left.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: @CongA Tn A B C D E F *)
unfold CongA.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))))))) *)
repeat split; try assumption.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F')))))))))))) *)
exists x; exists x0; exists x1; exists x2.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
(* Goal: and (@Bet Tn B A x) (and (@Cong Tn A x E D) (and (@Bet Tn B C x0) (and (@Cong Tn C x0 E F) (and (@Bet Tn E D x1) (and (@Cong Tn D x1 B A) (and (@Bet Tn E F x2) (and (@Cong Tn F x2 B C) (@Cong Tn x x0 x1 x2)))))))) *)
repeat split; assumption.
(* Goal: or (@CongA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
right.
(* Goal: not (@CongA Tn A B C D E F) *)
unfold CongA.
(* Goal: not (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (and (not (@eq (@Tpoint Tn) F E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => @ex (@Tpoint Tn) (fun F' : @Tpoint Tn => and (@Bet Tn B A A') (and (@Cong Tn A A' E D) (and (@Bet Tn B C C') (and (@Cong Tn C C' E F) (and (@Bet Tn E D D') (and (@Cong Tn D D' B A) (and (@Bet Tn E F F') (and (@Cong Tn F F' B C) (@Cong Tn A' C' D' F'))))))))))))))))) *)
intro.
(* Goal: False *)
decompose [and ex] H4; clear H4.
(* Goal: False *)
assert (x3 = x) by (apply construction_uniqueness with B A E D; intuition).
(* Goal: False *)
assert (x4 = x0) by (apply construction_uniqueness with B C E F; intuition).
(* Goal: False *)
assert (x5 = x1) by (apply construction_uniqueness with E D B A; intuition).
(* Goal: False *)
assert (x6 = x2) by (apply construction_uniqueness with E F B C; intuition).
(* Goal: False *)
subst.
(* Goal: False *)
contradiction.
Qed.
Lemma lta_not_conga : forall A B C D E F, LtA A B C D E F -> ~ CongA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LtA Tn A B C D E F), not (@CongA Tn A B C D E F) *)
intros.
(* Goal: not (@CongA Tn A B C D E F) *)
intro.
(* Goal: False *)
unfold LtA in H.
(* Goal: False *)
spliter.
(* Goal: False *)
contradiction.
Qed.
Lemma l11_44_1_b : forall A B C, ~ Col A B C -> CongA B A C B C A -> Cong B A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : @CongA Tn B A C B C A), @Cong Tn B A B C *)
intros.
(* Goal: @Cong Tn B A B C *)
apply not_col_distincts in H.
(* Goal: @Cong Tn B A B C *)
spliter.
(* Goal: @Cong Tn B A B C *)
assert(HH:= or_lt_cong_gt B A B C).
(* Goal: @Cong Tn B A B C *)
induction HH.
(* Goal: @Cong Tn B A B C *)
(* Goal: @Cong Tn B A B C *)
apply l11_44_2_a in H4.
(* Goal: @Cong Tn B A B C *)
(* Goal: not (@Col Tn A B C) *)
(* Goal: @Cong Tn B A B C *)
apply lta_not_conga in H4.
(* Goal: @Cong Tn B A B C *)
(* Goal: not (@Col Tn A B C) *)
(* Goal: @Cong Tn B A B C *)
apply conga_sym in H0.
(* Goal: @Cong Tn B A B C *)
(* Goal: not (@Col Tn A B C) *)
(* Goal: @Cong Tn B A B C *)
contradiction.
(* Goal: @Cong Tn B A B C *)
(* Goal: not (@Col Tn A B C) *)
assumption.
(* Goal: @Cong Tn B A B C *)
induction H4.
(* Goal: @Cong Tn B A B C *)
(* Goal: @Cong Tn B A B C *)
unfold Gt in H4.
(* Goal: @Cong Tn B A B C *)
(* Goal: @Cong Tn B A B C *)
apply l11_44_2_a in H4.
(* Goal: @Cong Tn B A B C *)
(* Goal: not (@Col Tn C B A) *)
(* Goal: @Cong Tn B A B C *)
apply lta_not_conga in H4.
(* Goal: @Cong Tn B A B C *)
(* Goal: not (@Col Tn C B A) *)
(* Goal: @Cong Tn B A B C *)
contradiction.
(* Goal: @Cong Tn B A B C *)
(* Goal: not (@Col Tn C B A) *)
intro.
(* Goal: @Cong Tn B A B C *)
(* Goal: False *)
apply H.
(* Goal: @Cong Tn B A B C *)
(* Goal: @Col Tn A B C *)
apply col_permutation_3.
(* Goal: @Cong Tn B A B C *)
(* Goal: @Col Tn C B A *)
assumption.
(* Goal: @Cong Tn B A B C *)
assumption.
Qed.
Lemma l11_44_2_b : forall A B C, LtA B A C B C A -> Lt B C B A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @LtA Tn B A C B C A), @Lt Tn B C B A *)
intros.
(* Goal: @Lt Tn B C B A *)
induction (col_dec A B C).
(* Goal: @Lt Tn B C B A *)
(* Goal: @Lt Tn B C B A *)
assert (Hd := H).
(* Goal: @Lt Tn B C B A *)
(* Goal: @Lt Tn B C B A *)
apply lta_distincts in Hd; spliter; clean_reap_hyps.
(* Goal: @Lt Tn B C B A *)
(* Goal: @Lt Tn B C B A *)
apply col_lta__bet in H; Col; Le.
(* Goal: @Lt Tn B C B A *)
apply not_col_distincts in H0.
(* Goal: @Lt Tn B C B A *)
spliter.
(* Goal: @Lt Tn B C B A *)
assert(HH:= or_lt_cong_gt B A B C).
(* Goal: @Lt Tn B C B A *)
induction HH.
(* Goal: @Lt Tn B C B A *)
(* Goal: @Lt Tn B C B A *)
apply l11_44_2_a in H4.
(* Goal: @Lt Tn B C B A *)
(* Goal: not (@Col Tn A B C) *)
(* Goal: @Lt Tn B C B A *)
assert(HH:= not_lta_and_gta B A C B C A).
(* Goal: @Lt Tn B C B A *)
(* Goal: not (@Col Tn A B C) *)
(* Goal: @Lt Tn B C B A *)
exfalso.
(* Goal: @Lt Tn B C B A *)
(* Goal: not (@Col Tn A B C) *)
(* Goal: False *)
apply HH.
(* Goal: @Lt Tn B C B A *)
(* Goal: not (@Col Tn A B C) *)
(* Goal: and (@LtA Tn B A C B C A) (@GtA Tn B A C B C A) *)
split; assumption.
(* Goal: @Lt Tn B C B A *)
(* Goal: not (@Col Tn A B C) *)
assumption.
(* Goal: @Lt Tn B C B A *)
induction H4.
(* Goal: @Lt Tn B C B A *)
(* Goal: @Lt Tn B C B A *)
unfold Gt in H4.
(* Goal: @Lt Tn B C B A *)
(* Goal: @Lt Tn B C B A *)
assumption.
(* Goal: @Lt Tn B C B A *)
apply l11_44_1_a in H4; auto.
(* Goal: @Lt Tn B C B A *)
apply lta_not_conga in H; auto.
(* Goal: @Lt Tn B C B A *)
contradiction.
Qed.
Lemma l11_44_1 : forall A B C, ~ Col A B C -> (CongA B A C B C A <-> Cong B A B C).
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), iff (@CongA Tn B A C B C A) (@Cong Tn B A B C) *)
intros;assert_diffs;split;intro; auto using l11_44_1_b, l11_44_1_a.
Qed.
Lemma l11_44_2 : forall A B C, ~ Col A B C -> (LtA B A C B C A <-> Lt B C B A).
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), iff (@LtA Tn B A C B C A) (@Lt Tn B C B A) *)
intros;split;intro; auto using l11_44_2_b, l11_44_2_a with col.
Qed.
Lemma l11_46 : forall A B C, A <> B -> B <> C -> (Per A B C \/ Obtuse A B C) -> Lt B A A C /\ Lt B C A C.
Lemma l11_47 : forall A B C H , Per A C B -> Perp_at H C H A B ->
Bet A H B /\ A <> H /\ B <> H.
Lemma l11_49 : forall A B C A' B' C',
CongA A B C A' B' C' -> Cong B A B' A' -> Cong B C B' C' ->
Cong A C A' C' /\ (A <> C -> CongA B A C B' A' C' /\ CongA B C A B' C' A').
Lemma l11_50_1 : forall A B C A' B' C',
~ Col A B C -> CongA B A C B' A' C' -> CongA A B C A' B' C' -> Cong A B A' B' ->
Cong A C A' C' /\ Cong B C B' C' /\ CongA A C B A' C' B'.
Lemma l11_50_2 : forall A B C A' B' C',
~ Col A B C -> CongA B C A B' C' A' -> CongA A B C A' B' C' -> Cong A B A' B' ->
Cong A C A' C' /\ Cong B C B' C' /\ CongA C A B C' A' B'.
Lemma l11_51 : forall A B C A' B' C',
A <> B -> A <> C -> B <> C -> Cong A B A' B' -> Cong A C A' C' -> Cong B C B' C' ->
CongA B A C B' A' C' /\ CongA A B C A' B' C' /\ CongA B C A B' C' A'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A C)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Cong Tn A B A' B') (_ : @Cong Tn A C A' C') (_ : @Cong Tn B C B' C'), and (@CongA Tn B A C B' A' C') (and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A')) *)
intros.
(* Goal: and (@CongA Tn B A C B' A' C') (and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A')) *)
assert(Cong_3 B A C B' A' C' /\ Cong_3 A B C A' B' C' /\ Cong_3 B C A B' C' A').
(* Goal: and (@CongA Tn B A C B' A' C') (and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A')) *)
(* Goal: and (@Cong_3 Tn B A C B' A' C') (and (@Cong_3 Tn A B C A' B' C') (@Cong_3 Tn B C A B' C' A')) *)
repeat split; cong.
(* Goal: and (@CongA Tn B A C B' A' C') (and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A')) *)
spliter.
(* Goal: and (@CongA Tn B A C B' A' C') (and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A')) *)
split.
(* Goal: and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A') *)
(* Goal: @CongA Tn B A C B' A' C' *)
apply cong3_conga.
(* Goal: and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A') *)
(* Goal: @Cong_3 Tn B A C B' A' C' *)
(* Goal: not (@eq (@Tpoint Tn) C A) *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
auto.
(* Goal: and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A') *)
(* Goal: @Cong_3 Tn B A C B' A' C' *)
(* Goal: not (@eq (@Tpoint Tn) C A) *)
auto.
(* Goal: and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A') *)
(* Goal: @Cong_3 Tn B A C B' A' C' *)
assumption.
(* Goal: and (@CongA Tn A B C A' B' C') (@CongA Tn B C A B' C' A') *)
split.
(* Goal: @CongA Tn B C A B' C' A' *)
(* Goal: @CongA Tn A B C A' B' C' *)
apply cong3_conga.
(* Goal: @CongA Tn B C A B' C' A' *)
(* Goal: @Cong_3 Tn A B C A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
assumption.
(* Goal: @CongA Tn B C A B' C' A' *)
(* Goal: @Cong_3 Tn A B C A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
auto.
(* Goal: @CongA Tn B C A B' C' A' *)
(* Goal: @Cong_3 Tn A B C A' B' C' *)
assumption.
(* Goal: @CongA Tn B C A B' C' A' *)
apply cong3_conga.
(* Goal: @Cong_3 Tn B C A B' C' A' *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
(* Goal: not (@eq (@Tpoint Tn) B C) *)
assumption.
(* Goal: @Cong_3 Tn B C A B' C' A' *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
assumption.
(* Goal: @Cong_3 Tn B C A B' C' A' *)
assumption.
Qed.
Lemma conga_distinct : forall A B C D E F, CongA A B C D E F -> CongA A B C D E F /\ A <> B /\ C <> B /\ D <> E /\ F <> E.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @CongA Tn A B C D E F), and (@CongA Tn A B C D E F) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E))))) *)
intros.
(* Goal: and (@CongA Tn A B C D E F) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E))))) *)
split.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
(* Goal: @CongA Tn A B C D E F *)
assumption.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
unfold CongA in H.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) F E)))) *)
repeat split; assumption.
Qed.
Lemma l11_52 : forall A B C A' B' C',
CongA A B C A' B' C' -> Cong A C A' C' -> Cong B C B' C' -> Le B C A C ->
Cong B A B' A' /\ CongA B A C B' A' C' /\ CongA B C A B' C' A'.
Lemma l11_53 : forall A B C D,
Per D C B -> C <> D -> A <> B -> B <> C -> Bet A B C ->
LtA C A D C B D /\ Lt B D A D.
Lemma cong2_conga_obtuse__cong_conga2 :
forall A B C A' B' C',
Obtuse A B C ->
CongA A B C A' B' C' ->
Cong A C A' C' ->
Cong B C B' C' ->
Cong B A B' A' /\ CongA B A C B' A' C' /\ CongA B C A B' C' A'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Obtuse Tn A B C) (_ : @CongA Tn A B C A' B' C') (_ : @Cong Tn A C A' C') (_ : @Cong Tn B C B' C'), and (@Cong Tn B A B' A') (and (@CongA Tn B A C B' A' C') (@CongA Tn B C A B' C' A')) *)
intros.
(* Goal: and (@Cong Tn B A B' A') (and (@CongA Tn B A C B' A' C') (@CongA Tn B C A B' C' A')) *)
apply (l11_52 A B C A' B' C'); auto.
(* Goal: @Le Tn B C A C *)
destruct (col_dec A B C).
(* Goal: @Le Tn B C A C *)
(* Goal: @Le Tn B C A C *)
apply bet__le2313, col_obtuse__bet; assumption.
(* Goal: @Le Tn B C A C *)
assert_diffs; apply l11_46; auto.
Qed.
Lemma cong2_per2__cong_conga2 :
forall A B C A' B' C',
A<>B -> B<>C ->
Per A B C ->
Per A' B' C' ->
Cong A C A' C' ->
Cong B C B' C' ->
Cong B A B' A' /\ CongA B A C B' A' C' /\ CongA B C A B' C' A'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Cong Tn A C A' C') (_ : @Cong Tn B C B' C'), and (@Cong Tn B A B' A') (and (@CongA Tn B A C B' A' C') (@CongA Tn B C A B' C' A')) *)
intros.
(* Goal: and (@Cong Tn B A B' A') (and (@CongA Tn B A C B' A' C') (@CongA Tn B C A B' C' A')) *)
assert_diffs.
(* Goal: and (@Cong Tn B A B' A') (and (@CongA Tn B A C B' A' C') (@CongA Tn B C A B' C' A')) *)
destruct (l11_46 A B C) as [_ []]; auto using per_not_col.
(* Goal: and (@Cong Tn B A B' A') (and (@CongA Tn B A C B' A' C') (@CongA Tn B C A B' C' A')) *)
apply (l11_52 A B C A' B' C');auto.
(* Goal: @CongA Tn A B C A' B' C' *)
apply l11_16;auto.
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
intro.
(* Goal: False *)
subst B'.
(* Goal: False *)
apply H9, cong_transitivity with A' C'; Cong.
Qed.
Lemma cong2_per2__cong :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Cong A C A' C' ->
Cong B C B' C' ->
Cong B A B' A'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Cong Tn A C A' C') (_ : @Cong Tn B C B' C'), @Cong Tn B A B' A' *)
intros.
(* Goal: @Cong Tn B A B' A' *)
destruct (eq_dec_points B C).
(* Goal: @Cong Tn B A B' A' *)
(* Goal: @Cong Tn B A B' A' *)
treat_equalities; Cong.
(* Goal: @Cong Tn B A B' A' *)
destruct (eq_dec_points A B).
(* Goal: @Cong Tn B A B' A' *)
(* Goal: @Cong Tn B A B' A' *)
destruct (eq_dec_points A' B'); subst; [Cong|].
(* Goal: @Cong Tn B A B' A' *)
(* Goal: @Cong Tn B B B' A' *)
assert_diffs.
(* Goal: @Cong Tn B A B' A' *)
(* Goal: @Cong Tn B B B' A' *)
destruct (cong2_per2__cong_conga2 A' B' C' B B C); Cong; Perp.
(* Goal: @Cong Tn B A B' A' *)
apply cong2_per2__cong_conga2 with C C'; auto.
Qed.
Lemma cong2_per2__cong_3 :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Cong A C A' C' ->
Cong B C B' C' ->
Cong_3 A B C A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Cong Tn A C A' C') (_ : @Cong Tn B C B' C'), @Cong_3 Tn A B C A' B' C' *)
intros.
(* Goal: @Cong_3 Tn A B C A' B' C' *)
unfold Cong_3.
(* Goal: and (@Cong Tn A B A' B') (and (@Cong Tn A C A' C') (@Cong Tn B C B' C')) *)
assert (Cong B A B' A') by (apply (cong2_per2__cong A B C A' B' C');auto).
(* Goal: and (@Cong Tn A B A' B') (and (@Cong Tn A C A' C') (@Cong Tn B C B' C')) *)
repeat split;Cong.
Qed.
Lemma cong_lt_per2__lt :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Cong A B A' B' ->
Lt B C B' C' ->
Lt A C A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Cong Tn A B A' B') (_ : @Lt Tn B C B' C'), @Lt Tn A C A' C' *)
intros.
(* Goal: @Lt Tn A C A' C' *)
destruct (eq_dec_points A B).
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn A C A' C' *)
treat_equalities; auto.
(* Goal: @Lt Tn A C A' C' *)
destruct (eq_dec_points B C).
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn A C A' C' *)
subst C.
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn A B A' C' *)
apply (cong2_lt__lt B' A' C' A'); Cong.
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn B' A' C' A' *)
assert_diffs.
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn B' A' C' A' *)
apply l11_46; Perp.
(* Goal: @Lt Tn A C A' C' *)
destruct H2 as [[C0 []] HNCong].
(* Goal: @Lt Tn A C A' C' *)
assert_diffs.
(* Goal: @Lt Tn A C A' C' *)
assert (Per A' B' C0) by (apply per_col with C'; Col).
(* Goal: @Lt Tn A C A' C' *)
apply (cong2_lt__lt A' C0 A' C'); [|apply l10_12 with B' B|]; Cong.
(* Goal: @Lt Tn A' C0 A' C' *)
apply lt_comm.
(* Goal: @Lt Tn C0 A' C' A' *)
destruct (l11_53 C' C0 B' A'); Between.
(* Goal: not (@eq (@Tpoint Tn) C' C0) *)
intro; subst; auto.
Qed.
Lemma cong_le_per2__le :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Cong A B A' B' ->
Le B C B' C' ->
Le A C A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Cong Tn A B A' B') (_ : @Le Tn B C B' C'), @Le Tn A C A' C' *)
intros.
(* Goal: @Le Tn A C A' C' *)
destruct (cong_dec B C B' C').
(* Goal: @Le Tn A C A' C' *)
(* Goal: @Le Tn A C A' C' *)
apply cong__le, l10_12 with B B'; assumption.
(* Goal: @Le Tn A C A' C' *)
assert (Lt B C B' C') by (split; assumption).
(* Goal: @Le Tn A C A' C' *)
apply lt__le, cong_lt_per2__lt with B B'; assumption.
Qed.
Lemma lt2_per2__lt :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Lt A B A' B' ->
Lt B C B' C' ->
Lt A C A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Lt Tn A B A' B') (_ : @Lt Tn B C B' C'), @Lt Tn A C A' C' *)
intros.
(* Goal: @Lt Tn A C A' C' *)
destruct (eq_dec_points B C).
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn A C A' C' *)
subst C.
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn A B A' C' *)
apply lt_transitivity with A' B'; auto.
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn A' B' A' C' *)
assert_diffs.
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn A' B' A' C' *)
apply lt_comm, l11_46; Perp.
(* Goal: @Lt Tn A C A' C' *)
apply lt_comm in H1.
(* Goal: @Lt Tn A C A' C' *)
assert (HC0 := H2).
(* Goal: @Lt Tn A C A' C' *)
destruct HC0 as [[C0 []] HNCong].
(* Goal: @Lt Tn A C A' C' *)
assert (Per A' B' C0).
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Per Tn A' B' C0 *)
assert_diffs; apply per_col with C'; Col.
(* Goal: @Lt Tn A C A' C' *)
apply lt_transitivity with A' C0.
(* Goal: @Lt Tn A' C0 A' C' *)
(* Goal: @Lt Tn A C A' C0 *)
apply lt_comm, cong_lt_per2__lt with B B'; Cong; Perp.
(* Goal: @Lt Tn A' C0 A' C' *)
apply cong_lt_per2__lt with B' B'; Cong.
(* Goal: @Lt Tn B' C0 B' C' *)
apply (cong2_lt__lt B C B' C'); Cong.
Qed.
Lemma le_lt_per2__lt :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Le A B A' B' ->
Lt B C B' C' ->
Lt A C A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Le Tn A B A' B') (_ : @Lt Tn B C B' C'), @Lt Tn A C A' C' *)
intros.
(* Goal: @Lt Tn A C A' C' *)
destruct (cong_dec A B A' B').
(* Goal: @Lt Tn A C A' C' *)
(* Goal: @Lt Tn A C A' C' *)
apply cong_lt_per2__lt with B B'; assumption.
(* Goal: @Lt Tn A C A' C' *)
assert (Lt A B A' B') by (split; assumption).
(* Goal: @Lt Tn A C A' C' *)
apply lt2_per2__lt with B B'; assumption.
Qed.
Lemma le2_per2__le :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Le A B A' B' ->
Le B C B' C' ->
Le A C A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Le Tn A B A' B') (_ : @Le Tn B C B' C'), @Le Tn A C A' C' *)
intros.
(* Goal: @Le Tn A C A' C' *)
destruct (cong_dec B C B' C').
(* Goal: @Le Tn A C A' C' *)
(* Goal: @Le Tn A C A' C' *)
apply le_comm, cong_le_per2__le with B B'; finish.
(* Goal: @Le Tn A C A' C' *)
assert (Lt B C B' C') by (split; assumption).
(* Goal: @Le Tn A C A' C' *)
apply le_lt_per2__lt with B B'; assumption.
Qed.
Lemma cong_lt_per2__lt_1 :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Lt A B A' B' ->
Cong A C A' C' ->
Lt B' C' B C.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @Per Tn A' B' C') (_ : @Lt Tn A B A' B') (_ : @Cong Tn A C A' C'), @Lt Tn B' C' B C *)
intros.
(* Goal: @Lt Tn B' C' B C *)
apply nle__lt.
(* Goal: not (@Le Tn B C B' C') *)
intro.
(* Goal: False *)
destruct (le_lt_per2__lt C B A C' B' A'); finish.
Qed.
Lemma symmetry_preserves_conga :
forall A B C A' B' C' M, A <> B -> C <> B ->
Midpoint M A A' ->
Midpoint M B B' ->
Midpoint M C C' ->
CongA A B C A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' M : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)) (_ : @Midpoint Tn M A A') (_ : @Midpoint Tn M B B') (_ : @Midpoint Tn M C C'), @CongA Tn A B C A' B' C' *)
intros.
(* Goal: @CongA Tn A B C A' B' C' *)
assert(Cong A B A' B').
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Cong Tn A B A' B' *)
apply (l7_13 M); Midpoint.
(* Goal: @CongA Tn A B C A' B' C' *)
assert(Cong B C B' C').
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Cong Tn B C B' C' *)
apply (l7_13 M); Midpoint.
(* Goal: @CongA Tn A B C A' B' C' *)
assert(Cong A C A' C').
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Cong Tn A C A' C' *)
apply (l7_13 M); Midpoint.
(* Goal: @CongA Tn A B C A' B' C' *)
apply cong3_conga; auto.
(* Goal: @Cong_3 Tn A B C A' B' C' *)
repeat split; Cong.
Qed.
Lemma l11_57 : forall A B C A' B' C',
OS A A' B B' -> Per B A A' -> Per B' A' A ->
OS A A' C C' -> Per C A A' -> Per C' A' A ->
CongA B A C B' A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @OS Tn A A' B B') (_ : @Per Tn B A A') (_ : @Per Tn B' A' A) (_ : @OS Tn A A' C C') (_ : @Per Tn C A A') (_ : @Per Tn C' A' A), @CongA Tn B A C B' A' C' *)
intros A B C A' B' C' HOSB HPer1 HPer2 HOSC HPer3 HPer4.
(* Goal: @CongA Tn B A C B' A' C' *)
destruct (midpoint_existence A A') as [M HM].
(* Goal: @CongA Tn B A C B' A' C' *)
destruct (symmetric_point_construction B M) as [B'' HB''].
(* Goal: @CongA Tn B A C B' A' C' *)
destruct (symmetric_point_construction C M) as [C'' HC''].
(* Goal: @CongA Tn B A C B' A' C' *)
assert (HNColB := one_side_not_col123 A A' B B' HOSB).
(* Goal: @CongA Tn B A C B' A' C' *)
assert (HNColC := one_side_not_col123 A A' C C' HOSC).
(* Goal: @CongA Tn B A C B' A' C' *)
apply conga_trans with B'' A' C''.
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
(* Goal: @CongA Tn B A C B'' A' C'' *)
assert_diffs; apply symmetry_preserves_conga with M; auto.
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
assert (~ Col B'' A A').
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
(* Goal: not (@Col Tn B'' A A') *)
assert (B <> M) by (intro; subst; apply HNColB; Col); intro; apply HNColB; ColR.
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
assert (Bet B'' A' B').
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
(* Goal: @Bet Tn B'' A' B' *)
{
(* Goal: @Bet Tn B'' A' B' *)
assert (Col B' B'' A').
(* Goal: @Bet Tn B'' A' B' *)
(* Goal: @Col Tn B' B'' A' *)
{
(* Goal: @Col Tn B' B'' A' *)
assert_diffs; apply (cop_per2__col A); auto.
(* Goal: @Per Tn B'' A' A *)
(* Goal: @Coplanar Tn A B' B'' A' *)
apply coplanar_perm_3, coplanar_trans_1 with B; [Col|Cop|].
(* Goal: @Per Tn B'' A' A *)
(* Goal: @Coplanar Tn B A A' B'' *)
exists M; right; right; split; Col.
(* Goal: @Per Tn B'' A' A *)
apply midpoint_preserves_per with B A A' M; Midpoint.
(* BG Goal: @CongA Tn B'' A' C'' B' A' C' *)
(* BG Goal: @Bet Tn B'' A' B' *)
}
(* Goal: @Bet Tn B'' A' B' *)
apply col_two_sides_bet with A; Col.
(* Goal: @TS Tn A' A B'' B' *)
apply invert_two_sides, l9_2, l9_8_2 with B; trivial.
(* Goal: @TS Tn A A' B B'' *)
repeat split; Col.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A A') (@Bet Tn B T B'')) *)
exists M; split; [Col|Between].
(* BG Goal: @CongA Tn B'' A' C'' B' A' C' *)
}
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
assert (~ Col C'' A A').
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
(* Goal: not (@Col Tn C'' A A') *)
assert (C <> M) by (intro; subst; apply HNColC; Col); intro; apply HNColC; ColR.
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
assert (Bet C'' A' C').
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
(* Goal: @Bet Tn C'' A' C' *)
{
(* Goal: @Bet Tn C'' A' C' *)
assert (Col C' C'' A').
(* Goal: @Bet Tn C'' A' C' *)
(* Goal: @Col Tn C' C'' A' *)
{
(* Goal: @Col Tn C' C'' A' *)
assert_diffs; apply (cop_per2__col A); auto.
(* Goal: @Per Tn C'' A' A *)
(* Goal: @Coplanar Tn A C' C'' A' *)
apply coplanar_perm_3, coplanar_trans_1 with C; [Col|Cop|].
(* Goal: @Per Tn C'' A' A *)
(* Goal: @Coplanar Tn C A A' C'' *)
exists M; right; right; split; Col.
(* Goal: @Per Tn C'' A' A *)
apply midpoint_preserves_per with C A A' M; Midpoint.
(* BG Goal: @CongA Tn B'' A' C'' B' A' C' *)
(* BG Goal: @Bet Tn C'' A' C' *)
}
(* Goal: @Bet Tn C'' A' C' *)
apply col_two_sides_bet with A; Col.
(* Goal: @TS Tn A' A C'' C' *)
apply invert_two_sides, l9_2, l9_8_2 with C; trivial.
(* Goal: @TS Tn A A' C C'' *)
repeat split; Col.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A A') (@Bet Tn C T C'')) *)
exists M; split; [Col|Between].
(* BG Goal: @CongA Tn B'' A' C'' B' A' C' *)
}
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
apply one_side_not_col124 in HOSB.
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
apply one_side_not_col124 in HOSC.
(* Goal: @CongA Tn B'' A' C'' B' A' C' *)
assert_diffs; apply l11_14; auto.
Qed.
Lemma cop3_orth_at__orth_at : forall A B C D E F U V X, ~ Col D E F ->
Coplanar A B C D -> Coplanar A B C E -> Coplanar A B C F -> Orth_at X A B C U V ->
Orth_at X D E F U V.
Proof.
(* Goal: forall (A B C D E F U V X : @Tpoint Tn) (_ : not (@Col Tn D E F)) (_ : @Coplanar Tn A B C D) (_ : @Coplanar Tn A B C E) (_ : @Coplanar Tn A B C F) (_ : @Orth_at Tn X A B C U V), @Orth_at Tn X D E F U V *)
intros A B C D E F U V X HNCol HD HE HF [HNCol1 [HUV [HX1 [HX2 HX3]]]].
(* Goal: @Orth_at Tn X D E F U V *)
repeat split; trivial.
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn D E F P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
(* Goal: @Coplanar Tn D E F X *)
apply coplanar_pseudo_trans with A B C; assumption.
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn D E F P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
assert (forall M, Coplanar A B C M -> Coplanar D E F M).
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn D E F P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
(* Goal: forall (M : @Tpoint Tn) (_ : @Coplanar Tn A B C M), @Coplanar Tn D E F M *)
intro; apply coplanar_pseudo_trans; Cop.
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn D E F P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
assert (forall M, Coplanar D E F M -> Coplanar A B C M).
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn D E F P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
(* Goal: forall (M : @Tpoint Tn) (_ : @Coplanar Tn D E F M), @Coplanar Tn A B C M *)
intro; apply coplanar_pseudo_trans; Cop.
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn D E F P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
intros; apply HX3; auto.
Qed.
Lemma col2_orth_at__orth_at : forall A B C P Q U V X, U <> V ->
Col P Q U -> Col P Q V -> Orth_at X A B C P Q -> Orth_at X A B C U V.
Proof.
(* Goal: forall (A B C P Q U V X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)) (_ : @Col Tn P Q U) (_ : @Col Tn P Q V) (_ : @Orth_at Tn X A B C P Q), @Orth_at Tn X A B C U V *)
intros A B C P Q U V X HUV HU HV [HNCol [HPQ [HX1 [HX2 HX3]]]].
(* Goal: @Orth_at Tn X A B C U V *)
repeat split; trivial.
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
(* Goal: @Col Tn U V X *)
apply (col3 P Q); auto.
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
intros D W HD HW.
(* Goal: @Per Tn D X W *)
apply HX3; [|apply (colx U V)]; assumption.
Qed.
Lemma col_orth_at__orth_at : forall A B C U V W X, U <> W ->
Col U V W -> Orth_at X A B C U V -> Orth_at X A B C U W.
Proof.
(* Goal: forall (A B C U V W X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U W)) (_ : @Col Tn U V W) (_ : @Orth_at Tn X A B C U V), @Orth_at Tn X A B C U W *)
intros A B C U V W X HUW HCol HX.
(* Goal: @Orth_at Tn X A B C U W *)
apply col2_orth_at__orth_at with U V; Col.
Qed.
Lemma orth_at_symmetry : forall A B C U V X,
Orth_at X A B C U V -> Orth_at X A B C V U.
Proof.
(* Goal: forall (A B C U V X : @Tpoint Tn) (_ : @Orth_at Tn X A B C U V), @Orth_at Tn X A B C V U *)
unfold Orth_at.
(* Goal: forall (A B C U V X : @Tpoint Tn) (_ : and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) U V)) (and (@Coplanar Tn A B C X) (and (@Col Tn U V X) (forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn U V Q), @Per Tn P X Q))))), and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) V U)) (and (@Coplanar Tn A B C X) (and (@Col Tn V U X) (forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn V U Q), @Per Tn P X Q)))) *)
intros A B C U V X HX; spliter.
(* Goal: and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) V U)) (and (@Coplanar Tn A B C X) (and (@Col Tn V U X) (forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn V U Q), @Per Tn P X Q)))) *)
repeat split; Col.
Qed.
Lemma orth_at_distincts : forall A B C U V X, Orth_at X A B C U V ->
A <> B /\ B <> C /\ A <> C /\ U <> V.
Proof.
(* Goal: forall (A B C U V X : @Tpoint Tn) (_ : @Orth_at Tn X A B C U V), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) A C)) (not (@eq (@Tpoint Tn) U V)))) *)
unfold Orth_at; intros; spliter; assert_diffs.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) A C)) (not (@eq (@Tpoint Tn) U V)))) *)
repeat split; auto.
Qed.
Lemma orth_at_chara : forall A B C P X, Orth_at X A B C X P <->
~ Col A B C /\ X <> P /\ Coplanar A B C X /\ (forall D, Coplanar A B C D -> Per D X P).
Proof.
(* Goal: forall A B C P X : @Tpoint Tn, iff (@Orth_at Tn X A B C X P) (and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) X P)) (and (@Coplanar Tn A B C X) (forall (D : @Tpoint Tn) (_ : @Coplanar Tn A B C D), @Per Tn D X P)))) *)
intros A B C P X; split.
(* Goal: forall _ : and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) X P)) (and (@Coplanar Tn A B C X) (forall (D : @Tpoint Tn) (_ : @Coplanar Tn A B C D), @Per Tn D X P))), @Orth_at Tn X A B C X P *)
(* Goal: forall _ : @Orth_at Tn X A B C X P, and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) X P)) (and (@Coplanar Tn A B C X) (forall (D : @Tpoint Tn) (_ : @Coplanar Tn A B C D), @Per Tn D X P))) *)
-
(* Goal: forall _ : @Orth_at Tn X A B C X P, and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) X P)) (and (@Coplanar Tn A B C X) (forall (D : @Tpoint Tn) (_ : @Coplanar Tn A B C D), @Per Tn D X P))) *)
unfold Orth_at; intro; spliter.
(* Goal: and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) X P)) (and (@Coplanar Tn A B C X) (forall (D : @Tpoint Tn) (_ : @Coplanar Tn A B C D), @Per Tn D X P))) *)
repeat split; Col.
(* BG Goal: forall _ : and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) X P)) (and (@Coplanar Tn A B C X) (forall (D : @Tpoint Tn) (_ : @Coplanar Tn A B C D), @Per Tn D X P))), @Orth_at Tn X A B C X P *)
-
(* Goal: forall _ : and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) X P)) (and (@Coplanar Tn A B C X) (forall (D : @Tpoint Tn) (_ : @Coplanar Tn A B C D), @Per Tn D X P))), @Orth_at Tn X A B C X P *)
intro; spliter.
(* Goal: @Orth_at Tn X A B C X P *)
repeat split; Col.
(* Goal: forall (P0 Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P0) (_ : @Col Tn X P Q), @Per Tn P0 X Q *)
intros; apply per_col with P; auto.
Qed.
Lemma cop3_orth__orth : forall A B C D E F U V, ~ Col D E F ->
Coplanar A B C D -> Coplanar A B C E -> Coplanar A B C F -> Orth A B C U V ->
Orth D E F U V.
Proof.
(* Goal: forall (A B C D E F U V : @Tpoint Tn) (_ : not (@Col Tn D E F)) (_ : @Coplanar Tn A B C D) (_ : @Coplanar Tn A B C E) (_ : @Coplanar Tn A B C F) (_ : @Orth Tn A B C U V), @Orth Tn D E F U V *)
intros A B C D E F U V HNCol HD HE HF [X HX].
(* Goal: @Orth Tn D E F U V *)
exists X.
(* Goal: @Orth_at Tn X D E F U V *)
apply (cop3_orth_at__orth_at A B C); assumption.
Qed.
Lemma col2_orth__orth : forall A B C P Q U V, U <> V ->
Col P Q U -> Col P Q V -> Orth A B C P Q -> Orth A B C U V.
Proof.
(* Goal: forall (A B C P Q U V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)) (_ : @Col Tn P Q U) (_ : @Col Tn P Q V) (_ : @Orth Tn A B C P Q), @Orth Tn A B C U V *)
intros A B C P Q U V HUV HU HV [X HX].
(* Goal: @Orth Tn A B C U V *)
exists X.
(* Goal: @Orth_at Tn X A B C U V *)
apply col2_orth_at__orth_at with P Q; assumption.
Qed.
Lemma col_orth__orth : forall A B C U V W, U <> W ->
Col U V W -> Orth A B C U V -> Orth A B C U W.
Proof.
(* Goal: forall (A B C U V W : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U W)) (_ : @Col Tn U V W) (_ : @Orth Tn A B C U V), @Orth Tn A B C U W *)
intros A B C U V W HUW HCol HOrth.
(* Goal: @Orth Tn A B C U W *)
apply col2_orth__orth with U V; Col.
Qed.
Lemma orth_symmetry : forall A B C U V,
Orth A B C U V -> Orth A B C V U.
Proof.
(* Goal: forall (A B C U V : @Tpoint Tn) (_ : @Orth Tn A B C U V), @Orth Tn A B C V U *)
intros A B C U V [X HX].
(* Goal: @Orth Tn A B C V U *)
exists X.
(* Goal: @Orth_at Tn X A B C V U *)
apply orth_at_symmetry, HX.
Qed.
Lemma orth_distincts : forall A B C U V, Orth A B C U V ->
A <> B /\ B <> C /\ A <> C /\ U <> V.
Proof.
(* Goal: forall (A B C U V : @Tpoint Tn) (_ : @Orth Tn A B C U V), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) A C)) (not (@eq (@Tpoint Tn) U V)))) *)
intros A B C U V [X HX].
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) A C)) (not (@eq (@Tpoint Tn) U V)))) *)
apply orth_at_distincts with X, HX.
Qed.
Lemma col_cop_orth__orth_at : forall A B C U V X,
Orth A B C U V -> Coplanar A B C X -> Col U V X -> Orth_at X A B C U V.
Proof.
(* Goal: forall (A B C U V X : @Tpoint Tn) (_ : @Orth Tn A B C U V) (_ : @Coplanar Tn A B C X) (_ : @Col Tn U V X), @Orth_at Tn X A B C U V *)
intros A B C U V X [Y [HNCol [HUV [HY1 [HY2 HY3]]]]] HX1 HX2.
(* Goal: @Orth_at Tn X A B C U V *)
repeat split; trivial.
(* Goal: forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn U V Q), @Per Tn P X Q *)
replace X with Y; [assumption|].
(* Goal: @eq (@Tpoint Tn) Y X *)
apply eq_sym, l8_8; auto.
Qed.
Lemma l11_60_aux : forall A B C D P Q, ~ Col A B C ->
Cong A P A Q -> Cong B P B Q -> Cong C P C Q -> Coplanar A B C D ->
Cong D P D Q.
Proof.
(* Goal: forall (A B C D P Q : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : @Cong Tn A P A Q) (_ : @Cong Tn B P B Q) (_ : @Cong Tn C P C Q) (_ : @Coplanar Tn A B C D), @Cong Tn D P D Q *)
intros A B C D P Q HNCol HA HB HC HCop.
(* Goal: @Cong Tn D P D Q *)
destruct (midpoint_existence P Q) as [M []].
(* Goal: @Cong Tn D P D Q *)
assert_diffs; destruct HCop as [X [|[|]]]; spliter.
(* Goal: @Cong Tn D P D Q *)
(* Goal: @Cong Tn D P D Q *)
(* Goal: @Cong Tn D P D Q *)
-
(* Goal: @Cong Tn D P D Q *)
apply l4_17 with C X; Col.
(* Goal: @Cong Tn X P X Q *)
(* Goal: not (@eq (@Tpoint Tn) C X) *)
intro; subst; apply HNCol; assumption.
(* Goal: @Cong Tn X P X Q *)
apply l4_17 with A B; auto.
(* BG Goal: @Cong Tn D P D Q *)
(* BG Goal: @Cong Tn D P D Q *)
-
(* Goal: @Cong Tn D P D Q *)
apply l4_17 with B X; Col.
(* Goal: @Cong Tn X P X Q *)
(* Goal: not (@eq (@Tpoint Tn) B X) *)
intro; subst; apply HNCol; Col.
(* Goal: @Cong Tn X P X Q *)
apply l4_17 with A C; auto.
(* BG Goal: @Cong Tn D P D Q *)
-
(* Goal: @Cong Tn D P D Q *)
apply l4_17 with A X; Col.
(* Goal: @Cong Tn X P X Q *)
(* Goal: not (@eq (@Tpoint Tn) A X) *)
intro; subst; apply HNCol; Col.
(* Goal: @Cong Tn X P X Q *)
apply l4_17 with B C; auto.
Qed.
Lemma l11_60 : forall A B C D E P, ~ Col A B C ->
Per A D P -> Per B D P -> Per C D P -> Coplanar A B C E ->
Per E D P.
Proof.
(* Goal: forall (A B C D E P : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : @Per Tn A D P) (_ : @Per Tn B D P) (_ : @Per Tn C D P) (_ : @Coplanar Tn A B C E), @Per Tn E D P *)
intros A B C D E P HNCol HPerA HPerB HPerC HCop.
(* Goal: @Per Tn E D P *)
destruct (eq_dec_points D P).
(* Goal: @Per Tn E D P *)
(* Goal: @Per Tn E D P *)
subst; apply l8_5.
(* Goal: @Per Tn E D P *)
destruct (symmetric_point_construction P D) as [P'].
(* Goal: @Per Tn E D P *)
exists P'; split; auto.
(* Goal: @Cong Tn E P E P' *)
apply (l11_60_aux A B C); [|apply per_double_cong with D..|]; assumption.
Qed.
Lemma l11_60_bis : forall A B C D P, ~ Col A B C -> D <> P ->
Coplanar A B C D -> Per A D P -> Per B D P -> Per C D P ->
Orth_at D A B C D P.
Proof.
(* Goal: forall (A B C D P : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : not (@eq (@Tpoint Tn) D P)) (_ : @Coplanar Tn A B C D) (_ : @Per Tn A D P) (_ : @Per Tn B D P) (_ : @Per Tn C D P), @Orth_at Tn D A B C D P *)
intros A B C D P HNCol HDP HD HA HB HC.
(* Goal: @Orth_at Tn D A B C D P *)
repeat split; Col.
(* Goal: forall (P0 Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P0) (_ : @Col Tn D P Q), @Per Tn P0 D Q *)
intros E Q HE HQ.
(* Goal: @Per Tn E D Q *)
apply per_col with P; auto.
(* Goal: @Per Tn E D P *)
apply (l11_60 A B C); assumption.
Qed.
Lemma l11_61 : forall A B C A' B' C',
A <> A' -> A <> B -> A <> C ->
Coplanar A A' B B' -> Per B A A' -> Per B' A' A ->
Coplanar A A' C C' -> Per C A A' ->
Per B A C -> Per B' A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A A')) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A C)) (_ : @Coplanar Tn A A' B B') (_ : @Per Tn B A A') (_ : @Per Tn B' A' A) (_ : @Coplanar Tn A A' C C') (_ : @Per Tn C A A') (_ : @Per Tn B A C), @Per Tn B' A' C' *)
intros A B C A' B' C'; intros.
(* Goal: @Per Tn B' A' C' *)
assert (~ Col C A A') by (assert_diffs; apply per_not_col; auto).
(* Goal: @Per Tn B' A' C' *)
destruct (l10_15 A A' A' C) as [C'' []]; Col.
(* Goal: @Per Tn B' A' C' *)
assert_diffs.
(* Goal: @Per Tn B' A' C' *)
apply l8_2, (l11_60 A' A C''); [apply one_side_not_col124 with C; Side|Perp..| |apply coplanar_trans_1 with C; Col; Cop].
(* Goal: @Per Tn C'' A' B' *)
apply l8_2.
(* Goal: @Per Tn B' A' C'' *)
revert dependent B'.
(* Goal: forall (B' : @Tpoint Tn) (_ : @Coplanar Tn A A' B B') (_ : @Per Tn B' A' A) (_ : not (@eq (@Tpoint Tn) B' A)), @Per Tn B' A' C'' *)
assert (Haux : forall B', OS A A' B B' -> Per B' A' A -> Per B' A' C'').
(* Goal: forall (B' : @Tpoint Tn) (_ : @Coplanar Tn A A' B B') (_ : @Per Tn B' A' A) (_ : not (@eq (@Tpoint Tn) B' A)), @Per Tn B' A' C'' *)
(* Goal: forall (B' : @Tpoint Tn) (_ : @OS Tn A A' B B') (_ : @Per Tn B' A' A), @Per Tn B' A' C'' *)
{
(* Goal: forall (B' : @Tpoint Tn) (_ : @OS Tn A A' B B') (_ : @Per Tn B' A' A), @Per Tn B' A' C'' *)
intros B' HOS HPer.
(* Goal: @Per Tn B' A' C'' *)
apply (l11_17 B A C); trivial.
(* Goal: @CongA Tn B A C B' A' C'' *)
apply l11_57; Perp.
(* BG Goal: forall (B' : @Tpoint Tn) (_ : @Coplanar Tn A A' B B') (_ : @Per Tn B' A' A) (_ : not (@eq (@Tpoint Tn) B' A)), @Per Tn B' A' C'' *)
}
(* Goal: forall (B' : @Tpoint Tn) (_ : @Coplanar Tn A A' B B') (_ : @Per Tn B' A' A) (_ : not (@eq (@Tpoint Tn) B' A)), @Per Tn B' A' C'' *)
intro B'; intros.
(* Goal: @Per Tn B' A' C'' *)
destruct (eq_dec_points B' A'); [subst; Perp|].
(* Goal: @Per Tn B' A' C'' *)
assert (HNCol : ~ Col B' A' A) by (apply per_not_col; auto).
(* Goal: @Per Tn B' A' C'' *)
destruct (cop__one_or_two_sides A A' B B'); Col.
(* Goal: @Per Tn B' A' C'' *)
(* Goal: not (@Col Tn B A A') *)
apply per_not_col; auto.
(* Goal: @Per Tn B' A' C'' *)
destruct (segment_construction B' A' A' B') as [B'' []].
(* Goal: @Per Tn B' A' C'' *)
assert_diffs.
(* Goal: @Per Tn B' A' C'' *)
apply l8_2, per_col with B''; Col.
(* Goal: @Per Tn C'' A' B'' *)
apply l8_2, Haux; [|apply l8_2, per_col with B'; Perp; Col].
(* Goal: @OS Tn A A' B B'' *)
exists B'; split; trivial.
(* Goal: @TS Tn A A' B'' B' *)
repeat split; Col.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A A') (@Bet Tn B'' T B')) *)
(* Goal: not (@Col Tn B'' A A') *)
intro; apply HNCol; ColR.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A A') (@Bet Tn B'' T B')) *)
exists A'; split; Col; Between.
Qed.
Lemma l11_61_bis : forall A B C D E P Q,
Orth_at D A B C D P -> Perp D E E Q -> Coplanar A B C E -> Coplanar D E P Q ->
Orth_at E A B C E Q.
Proof.
(* Goal: forall (A B C D E P Q : @Tpoint Tn) (_ : @Orth_at Tn D A B C D P) (_ : @Perp Tn D E E Q) (_ : @Coplanar Tn A B C E) (_ : @Coplanar Tn D E P Q), @Orth_at Tn E A B C E Q *)
intros A B C D E P Q [HNCol [HDP [HD [_ HOrth]]]] HPerp HE HCop.
(* Goal: @Orth_at Tn E A B C E Q *)
assert_diffs.
(* Goal: @Orth_at Tn E A B C E Q *)
repeat split; Col.
(* Goal: forall (P Q0 : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn E Q Q0), @Per Tn P E Q0 *)
assert (Haux : forall M, Coplanar A B C M -> Per M E Q).
(* Goal: forall (P Q0 : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn E Q Q0), @Per Tn P E Q0 *)
(* Goal: forall (M : @Tpoint Tn) (_ : @Coplanar Tn A B C M), @Per Tn M E Q *)
{
(* Goal: forall (M : @Tpoint Tn) (_ : @Coplanar Tn A B C M), @Per Tn M E Q *)
intros M HM.
(* Goal: @Per Tn M E Q *)
assert (HD' : exists D', Perp D E D' D /\ Coplanar A B C D').
(* Goal: @Per Tn M E Q *)
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => and (@Perp Tn D E D' D) (@Coplanar Tn A B C D')) *)
{
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => and (@Perp Tn D E D' D) (@Coplanar Tn A B C D')) *)
destruct (ex_ncol_cop A B C D E) as [F []]; auto.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => and (@Perp Tn D E D' D) (@Coplanar Tn A B C D')) *)
destruct (ex_perp_cop D E D F) as [D' []]; auto.
(* Goal: @ex (@Tpoint Tn) (fun D' : @Tpoint Tn => and (@Perp Tn D E D' D) (@Coplanar Tn A B C D')) *)
exists D'; split; auto.
(* Goal: @Coplanar Tn A B C D' *)
apply coplanar_pseudo_trans with D E F; trivial; apply coplanar_pseudo_trans with A B C; Cop.
(* BG Goal: forall (P Q0 : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn E Q Q0), @Per Tn P E Q0 *)
(* BG Goal: @Per Tn M E Q *)
}
(* Goal: @Per Tn M E Q *)
destruct HD' as [D' []].
(* Goal: @Per Tn M E Q *)
assert_diffs.
(* Goal: @Per Tn M E Q *)
apply l8_2, (l11_61 D P D'); auto.
(* Goal: @Per Tn P D D' *)
(* Goal: @Per Tn D' D E *)
(* Goal: @Coplanar Tn D E D' M *)
(* Goal: @Per Tn Q E D *)
(* Goal: @Per Tn P D E *)
apply l8_2; Col.
(* Goal: @Per Tn P D D' *)
(* Goal: @Per Tn D' D E *)
(* Goal: @Coplanar Tn D E D' M *)
(* Goal: @Per Tn Q E D *)
Perp.
(* Goal: @Per Tn P D D' *)
(* Goal: @Per Tn D' D E *)
(* Goal: @Coplanar Tn D E D' M *)
apply coplanar_pseudo_trans with A B C; assumption.
(* Goal: @Per Tn P D D' *)
(* Goal: @Per Tn D' D E *)
Perp.
(* Goal: @Per Tn P D D' *)
apply l8_2; Col.
(* BG Goal: forall (P Q0 : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn E Q Q0), @Per Tn P E Q0 *)
}
(* Goal: forall (P Q0 : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn E Q Q0), @Per Tn P E Q0 *)
intros; apply per_col with Q; Cop.
Qed.
Lemma l11_62_unicity : forall A B C D D' P,
Coplanar A B C D -> Coplanar A B C D' ->
(forall E, Coplanar A B C E -> Per E D P) ->
(forall E, Coplanar A B C E -> Per E D' P) ->
D = D'.
Proof.
(* Goal: forall (A B C D D' P : @Tpoint Tn) (_ : @Coplanar Tn A B C D) (_ : @Coplanar Tn A B C D') (_ : forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P) (_ : forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D' P), @eq (@Tpoint Tn) D D' *)
intros A B C D D' P HCop HCop' HD HD'.
(* Goal: @eq (@Tpoint Tn) D D' *)
apply l8_7 with P; Perp.
Qed.
Lemma l11_62_unicity_bis : forall A B C U X Y,
Orth_at X A B C X U -> Orth_at Y A B C Y U -> X = Y.
Proof.
(* Goal: forall (A B C U X Y : @Tpoint Tn) (_ : @Orth_at Tn X A B C X U) (_ : @Orth_at Tn Y A B C Y U), @eq (@Tpoint Tn) X Y *)
unfold Orth_at.
(* Goal: forall (A B C U X Y : @Tpoint Tn) (_ : and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) X U)) (and (@Coplanar Tn A B C X) (and (@Col Tn X U X) (forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn X U Q), @Per Tn P X Q))))) (_ : and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) Y U)) (and (@Coplanar Tn A B C Y) (and (@Col Tn Y U Y) (forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn Y U Q), @Per Tn P Y Q))))), @eq (@Tpoint Tn) X Y *)
intros A B C U X Y HX HY.
(* Goal: @eq (@Tpoint Tn) X Y *)
spliter.
(* Goal: @eq (@Tpoint Tn) X Y *)
apply l11_62_unicity with A B C U; trivial; intros; Col.
Qed.
Lemma orth_at2__eq : forall A B C U V X Y,
Orth_at X A B C U V -> Orth_at Y A B C U V -> X = Y.
Proof.
(* Goal: forall (A B C U V X Y : @Tpoint Tn) (_ : @Orth_at Tn X A B C U V) (_ : @Orth_at Tn Y A B C U V), @eq (@Tpoint Tn) X Y *)
unfold Orth_at.
(* Goal: forall (A B C U V X Y : @Tpoint Tn) (_ : and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) U V)) (and (@Coplanar Tn A B C X) (and (@Col Tn U V X) (forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn U V Q), @Per Tn P X Q))))) (_ : and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) U V)) (and (@Coplanar Tn A B C Y) (and (@Col Tn U V Y) (forall (P Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P) (_ : @Col Tn U V Q), @Per Tn P Y Q))))), @eq (@Tpoint Tn) X Y *)
intros A B C U V X Y HX HY.
(* Goal: @eq (@Tpoint Tn) X Y *)
spliter.
(* Goal: @eq (@Tpoint Tn) X Y *)
apply l11_62_unicity with A B C U; trivial; intros; Col.
Qed.
Lemma col_cop_orth_at__eq : forall A B C U V X Y,
Orth_at X A B C U V -> Coplanar A B C Y -> Col U V Y -> X = Y.
Proof.
(* Goal: forall (A B C U V X Y : @Tpoint Tn) (_ : @Orth_at Tn X A B C U V) (_ : @Coplanar Tn A B C Y) (_ : @Col Tn U V Y), @eq (@Tpoint Tn) X Y *)
intros A B C U V X Y HOrth HCop HCol.
(* Goal: @eq (@Tpoint Tn) X Y *)
apply (orth_at2__eq A B C U V); [assumption|].
(* Goal: @Orth_at Tn Y A B C U V *)
apply col_cop_orth__orth_at; [exists X|..]; assumption.
Qed.
Lemma orth_at__ncop1 : forall A B C U V X, U <> X ->
Orth_at X A B C U V -> ~ Coplanar A B C U.
Proof.
(* Goal: forall (A B C U V X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U X)) (_ : @Orth_at Tn X A B C U V), not (@Coplanar Tn A B C U) *)
intros A B C U V X HUX HOrth HCop.
(* Goal: False *)
apply HUX, eq_sym, (col_cop_orth_at__eq A B C U V); Col.
Qed.
Lemma orth_at__ncop2 : forall A B C U V X, V <> X ->
Orth_at X A B C U V -> ~ Coplanar A B C V.
Proof.
(* Goal: forall (A B C U V X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) V X)) (_ : @Orth_at Tn X A B C U V), not (@Coplanar Tn A B C V) *)
intros A B C U V X HUX HOrth.
(* Goal: not (@Coplanar Tn A B C V) *)
apply orth_at__ncop1 with U X; [assumption|apply orth_at_symmetry, HOrth].
Qed.
Lemma orth_at__ncop : forall A B C P X,
Orth_at X A B C X P -> ~ Coplanar A B C P.
Proof.
(* Goal: forall (A B C P X : @Tpoint Tn) (_ : @Orth_at Tn X A B C X P), not (@Coplanar Tn A B C P) *)
intros A B C P X HOrth.
(* Goal: not (@Coplanar Tn A B C P) *)
assert (Hd := HOrth); apply orth_at_distincts in Hd; spliter.
(* Goal: not (@Coplanar Tn A B C P) *)
apply orth_at__ncop2 with X X; auto.
Qed.
Lemma l11_62_existence : forall A B C P, exists D,
Coplanar A B C D /\ forall E, Coplanar A B C E -> Per E D P.
Proof.
(* Goal: forall A B C P : @Tpoint Tn, @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
intros A B C P.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
destruct (cop_dec A B C P) as [|HNCop].
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
exists P; split; [assumption|intros; Perp].
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
assert (HNCol : ~ Col A B C) by (apply ncop__ncol with P, HNCop).
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
destruct (l8_18_existence A B P) as [D0 [HCol0 HPerp0]].
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
(* Goal: not (@Col Tn A B P) *)
intro; apply HNCop; exists P; left; split; Col.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
assert (HCop0 : Coplanar A B C D0) by (exists D0; left; split; Col).
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
assert_diffs.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
destruct (ex_perp_cop A B D0 C) as [D1 [HPerp1 HCop1]]; auto.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
destruct (perp_not_col2 A B D1 D0 HPerp1) as [HNCol1|]; [|exfalso; Col].
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
assert (Haux : forall D, Col D0 D1 D -> Coplanar A B C D).
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
(* Goal: forall (D : @Tpoint Tn) (_ : @Col Tn D0 D1 D), @Coplanar Tn A B C D *)
{
(* Goal: forall (D : @Tpoint Tn) (_ : @Col Tn D0 D1 D), @Coplanar Tn A B C D *)
intros D HD.
(* Goal: @Coplanar Tn A B C D *)
apply coplanar_trans_1 with D1; [Col|Cop|].
(* Goal: @Coplanar Tn D1 A B D *)
assert_diffs; apply coplanar_perm_12, col_cop__cop with D0; Col; Cop.
(* BG Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
}
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
destruct (diff_col_ex3 A B D0 HCol0) as [A0].
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
assert (HCopA : Coplanar A B C A0) by (exists A0; left; split; Col).
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
assert (Per P D0 A0) by (destruct (l8_16_1 A B P A0 D0); auto).
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
destruct (per_dec P D0 D1) as [|HNPer].
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
{
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
exists D0.
(* Goal: and (@Coplanar Tn A B C D0) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D0 P) *)
split; Col.
(* Goal: forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D0 P *)
intros E HE.
(* Goal: @Per Tn E D0 P *)
apply l11_60 with A0 D1 D0; Perp.
(* Goal: @Coplanar Tn A0 D1 D0 E *)
(* Goal: not (@Col Tn A0 D1 D0) *)
intro; apply HNCol1; ColR.
(* Goal: @Coplanar Tn A0 D1 D0 E *)
apply coplanar_pseudo_trans with A B C; trivial.
(* BG Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
}
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
destruct (l8_18_existence D0 D1 P) as [D []]; Col.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
(* Goal: not (@Col Tn D0 D1 P) *)
intro Habs; apply HNCop, Haux, Habs.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => and (@Coplanar Tn A B C D) (forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P)) *)
exists D; split; auto.
(* Goal: forall (E : @Tpoint Tn) (_ : @Coplanar Tn A B C E), @Per Tn E D P *)
intros E HE.
(* Goal: @Per Tn E D P *)
assert (D <> D0) by (intro; subst; apply HNPer; Perp).
(* Goal: @Per Tn E D P *)
assert (HPer : Per D0 D P) by (apply perp_per_1, perp_left_comm, perp_col with D1; auto).
(* Goal: @Per Tn E D P *)
assert (HPer1 : Per D D0 A0).
(* Goal: @Per Tn E D P *)
(* Goal: @Per Tn D D0 A0 *)
assert_diffs; apply l8_2, per_col with D1; auto; destruct (l8_16_1 A B D1 A0 D0); Perp.
(* Goal: @Per Tn E D P *)
apply l11_60 with D0 A0 D; Perp; [apply per_not_col in HPer1; Col|..].
(* Goal: @Coplanar Tn D0 A0 D E *)
(* Goal: @Per Tn A0 D P *)
{
(* Goal: @Per Tn A0 D P *)
destruct (symmetric_point_construction A0 D) as [A0'].
(* Goal: @Per Tn A0 D P *)
apply l8_2; exists A0'; split; trivial.
(* Goal: @Cong Tn P A0 P A0' *)
destruct (symmetric_point_construction D0 D) as [D0'].
(* Goal: @Cong Tn P A0 P A0' *)
apply l10_12 with D0 D0'; [..|apply per_double_cong with D|apply cong_symmetry, l7_13 with D]; Perp.
(* Goal: @Per Tn P D0' A0' *)
destruct (symmetric_point_construction P D) as [P'].
(* Goal: @Per Tn P D0' A0' *)
apply midpoint_preserves_per with P' D0 A0 D; Midpoint.
(* Goal: @Per Tn P' D0 A0 *)
apply l11_60 with P D D0; Perp; [|exists P'; left; split; Col].
(* Goal: not (@Col Tn P D D0) *)
intro; apply HNCop, coplanar_trans_1 with D1; Col; [Cop|].
(* Goal: @Coplanar Tn D1 A B P *)
exists D0; right; right; split; ColR.
(* BG Goal: @Coplanar Tn D0 A0 D E *)
}
(* Goal: @Coplanar Tn D0 A0 D E *)
apply coplanar_pseudo_trans with A B C; trivial.
(* Goal: @Coplanar Tn A B C D *)
apply coplanar_trans_1 with D1; Col.
(* Goal: @Coplanar Tn D1 A B D *)
(* Goal: @Coplanar Tn D1 A B C *)
Cop.
(* Goal: @Coplanar Tn D1 A B D *)
exists D0; right; right; split; Col.
Qed.
Lemma l11_62_existence_bis : forall A B C P, ~ Coplanar A B C P ->
exists X, Orth_at X A B C X P.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : not (@Coplanar Tn A B C P)), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Orth_at Tn X A B C X P) *)
intros A B C P HNCop.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Orth_at Tn X A B C X P) *)
destruct (l11_62_existence A B C P) as [X [HCop HX]].
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Orth_at Tn X A B C X P) *)
assert (X <> P) by (intro; subst; apply (HNCop HCop)).
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Orth_at Tn X A B C X P) *)
exists X; repeat split; Col.
(* Goal: forall (P0 Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P0) (_ : @Col Tn X P Q), @Per Tn P0 X Q *)
(* Goal: not (@Col Tn A B C) *)
apply ncop__ncol with P, HNCop.
(* Goal: forall (P0 Q : @Tpoint Tn) (_ : @Coplanar Tn A B C P0) (_ : @Col Tn X P Q), @Per Tn P0 X Q *)
intros D Q HD HQ.
(* Goal: @Per Tn D X Q *)
apply per_col with P; auto.
Qed.
Lemma l11_63_aux : forall A B C D E P,
Coplanar A B C D -> D <> E -> Orth_at E A B C E P ->
exists Q, OS D E P Q /\ Orth A B C D Q.
Proof.
(* Goal: forall (A B C D E P : @Tpoint Tn) (_ : @Coplanar Tn A B C D) (_ : not (@eq (@Tpoint Tn) D E)) (_ : @Orth_at Tn E A B C E P), @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@OS Tn D E P Q) (@Orth Tn A B C D Q)) *)
intros A B C D E P HD HDE HOrth.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@OS Tn D E P Q) (@Orth Tn A B C D Q)) *)
assert (H' := HOrth).
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@OS Tn D E P Q) (@Orth Tn A B C D Q)) *)
destruct H' as [HNCol [HEP [HE1 [_ HE2]]]].
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@OS Tn D E P Q) (@Orth Tn A B C D Q)) *)
assert (HNCop : ~ Coplanar A B C P).
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@OS Tn D E P Q) (@Orth Tn A B C D Q)) *)
(* Goal: not (@Coplanar Tn A B C P) *)
intro; apply HEP, (col_cop_orth_at__eq A B C E P); Col.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@OS Tn D E P Q) (@Orth Tn A B C D Q)) *)
destruct (l10_15 D E D P) as [Q [HQ1 HQ2]]; Col.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@OS Tn D E P Q) (@Orth Tn A B C D Q)) *)
(* Goal: not (@Col Tn D E P) *)
intro; apply HNCop, col_cop2__cop with D E; auto.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => and (@OS Tn D E P Q) (@Orth Tn A B C D Q)) *)
exists Q.
(* Goal: and (@OS Tn D E P Q) (@Orth Tn A B C D Q) *)
split; [assumption|].
(* Goal: @Orth Tn A B C D Q *)
destruct (ex_ncol_cop A B C D E HDE) as [F [HF1 HF2]].
(* Goal: @Orth Tn A B C D Q *)
destruct (ex_perp_cop D E D F) as [D' [HD'1 HD'2]]; auto.
(* Goal: @Orth Tn A B C D Q *)
assert (~ Col D' D E) by (assert_diffs; apply per_not_col; Perp).
(* Goal: @Orth Tn A B C D Q *)
assert (Coplanar D E F A) by (apply coplanar_pseudo_trans with A B C; Cop).
(* Goal: @Orth Tn A B C D Q *)
assert (Coplanar D E F B) by (apply coplanar_pseudo_trans with A B C; Cop).
(* Goal: @Orth Tn A B C D Q *)
assert (Coplanar D E F C) by (apply coplanar_pseudo_trans with A B C; Cop).
(* Goal: @Orth Tn A B C D Q *)
exists D.
(* Goal: @Orth_at Tn D A B C D Q *)
apply (cop3_orth_at__orth_at D' D E); [assumption|apply coplanar_pseudo_trans with D E F; Cop..|].
(* Goal: @Orth_at Tn D D' D E D Q *)
assert_diffs.
(* Goal: @Orth_at Tn D D' D E D Q *)
apply l11_60_bis; Cop; [|Perp..].
(* Goal: @Per Tn D' D Q *)
destruct (ex_perp_cop D E E F) as [E' [HE'1 HE'2]]; auto.
(* Goal: @Per Tn D' D Q *)
assert_diffs.
(* Goal: @Per Tn D' D Q *)
apply (l11_61 E E' P); Perp.
(* Goal: @Per Tn E' E P *)
(* Goal: @Per Tn P E D *)
(* Goal: @Coplanar Tn E D P Q *)
(* Goal: @Coplanar Tn E D E' D' *)
apply coplanar_trans_1 with F; Col; Cop.
(* Goal: @Per Tn E' E P *)
(* Goal: @Per Tn P E D *)
(* Goal: @Coplanar Tn E D P Q *)
apply os__coplanar in HQ2; Cop.
(* Goal: @Per Tn E' E P *)
(* Goal: @Per Tn P E D *)
apply l8_2, HE2; Col.
(* Goal: @Per Tn E' E P *)
apply HE2; Col; apply coplanar_pseudo_trans with D E F; assumption.
Qed.
Lemma l11_63_existence : forall A B C D P,
Coplanar A B C D -> ~ Coplanar A B C P ->
exists Q, Orth A B C D Q.
Proof.
(* Goal: forall (A B C D P : @Tpoint Tn) (_ : @Coplanar Tn A B C D) (_ : not (@Coplanar Tn A B C P)), @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Orth Tn A B C D Q) *)
intros A B C D P HCop HNCop.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Orth Tn A B C D Q) *)
destruct (l11_62_existence_bis A B C P HNCop) as [E HE].
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Orth Tn A B C D Q) *)
destruct (eq_dec_points D E).
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Orth Tn A B C D Q) *)
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Orth Tn A B C D Q) *)
exists P, D; subst; assumption.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Orth Tn A B C D Q) *)
destruct (l11_63_aux A B C D E P) as [Q []]; auto.
(* Goal: @ex (@Tpoint Tn) (fun Q : @Tpoint Tn => @Orth Tn A B C D Q) *)
exists Q; assumption.
Qed.
Lemma l8_21_3 : forall A B C D X, Coplanar A B C D -> ~ Coplanar A B C X ->
exists P T, Orth A B C D P /\ Coplanar A B C T /\ Bet X T P.
Proof.
(* Goal: forall (A B C D X : @Tpoint Tn) (_ : @Coplanar Tn A B C D) (_ : not (@Coplanar Tn A B C X)), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
intros A B C D X HD HX.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
destruct (l11_62_existence_bis A B C X HX) as [E HE].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
destruct (eq_dec_points D E).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
{
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
subst E.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
destruct (segment_construction X D D X) as [Y []].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
exists Y, D; subst; repeat split; trivial.
(* Goal: @Orth Tn A B C D Y *)
assert (D <> X) by (intro; subst; apply (HX HD)); assert_diffs.
(* Goal: @Orth Tn A B C D Y *)
apply col_orth__orth with X; Col.
(* Goal: @Orth Tn A B C D X *)
exists D; assumption.
(* BG Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
}
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
destruct (l11_63_aux A B C D E X) as [P' [HOS HP']]; auto.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
destruct HE as [HNCol [HEX [HE [_ HOrth]]]].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
assert (HOrth' : Orth_at D A B C D P') by (apply col_cop_orth__orth_at; Col).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
assert (HDP' : D <> P') by (apply orth_distincts in HP'; spliter; auto).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
assert (HNCop : ~ Coplanar A B C P').
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
(* Goal: not (@Coplanar Tn A B C P') *)
apply orth_at__ncop2 with D D; auto; apply col_cop_orth__orth_at; Col.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
destruct HOrth' as [_ [_ [_ [_ HOrth']]]].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
destruct (segment_construction P' D D P') as [P []].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
assert (HT : TS D E X P).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
(* Goal: @TS Tn D E X P *)
{
(* Goal: @TS Tn D E X P *)
apply l9_8_2 with P'; [|Side].
(* Goal: @TS Tn D E P' P *)
repeat split; [intro; apply HNCop, col_cop2__cop with D E; ColR..|exists D; split; Col].
(* BG Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
}
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
destruct HT as [_ [_ [T []]]].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Orth Tn A B C D P) (and (@Coplanar Tn A B C T) (@Bet Tn X T P)))) *)
exists P, T; repeat split; [|apply col_cop2__cop with D E; Col|assumption].
(* Goal: @Orth Tn A B C D P *)
assert_diffs.
(* Goal: @Orth Tn A B C D P *)
apply col_orth__orth with P'; Col.
Qed.
Lemma mid2_orth_at2__cong : forall A B C X Y P Q P' Q',
Orth_at X A B C X P -> Orth_at Y A B C Y Q -> Midpoint X P P' -> Midpoint Y Q Q' ->
Cong P Q P' Q'.
Proof.
(* Goal: forall (A B C X Y P Q P' Q' : @Tpoint Tn) (_ : @Orth_at Tn X A B C X P) (_ : @Orth_at Tn Y A B C Y Q) (_ : @Midpoint Tn X P P') (_ : @Midpoint Tn Y Q Q'), @Cong Tn P Q P' Q' *)
intros A B C X Y P Q P' Q' HX1 HY1 HX2 HY2.
(* Goal: @Cong Tn P Q P' Q' *)
assert (HX3 := HX1).
(* Goal: @Cong Tn P Q P' Q' *)
destruct HX3 as [HNCol [HXP [HCop1 [_ HX3]]]].
(* Goal: @Cong Tn P Q P' Q' *)
assert (HY3 := HY1).
(* Goal: @Cong Tn P Q P' Q' *)
destruct HY3 as [_ [HYQ [HCop2 [_ HY3]]]].
(* Goal: @Cong Tn P Q P' Q' *)
destruct (midpoint_existence X Y) as [Z].
(* Goal: @Cong Tn P Q P' Q' *)
destruct (symmetric_point_construction P Z) as [R].
(* Goal: @Cong Tn P Q P' Q' *)
destruct (symmetric_point_construction P' Z) as [R'].
(* Goal: @Cong Tn P Q P' Q' *)
assert (Coplanar A B C Z) by (apply bet_cop2__cop with X Y; Between).
(* Goal: @Cong Tn P Q P' Q' *)
assert (Cong Z P Z P').
(* Goal: @Cong Tn P Q P' Q' *)
(* Goal: @Cong Tn Z P Z P' *)
apply per_double_cong with X; Col.
(* Goal: @Cong Tn P Q P' Q' *)
apply five_segment with R R' Z Z; Between.
(* Goal: not (@eq (@Tpoint Tn) R Z) *)
(* Goal: @Cong Tn Z Q Z Q' *)
(* Goal: @Cong Tn R Q R' Q' *)
(* Goal: @Cong Tn R Z R' Z *)
apply cong_transitivity with P Z; [|apply cong_transitivity with P' Z]; Cong.
(* Goal: not (@eq (@Tpoint Tn) R Z) *)
(* Goal: @Cong Tn Z Q Z Q' *)
(* Goal: @Cong Tn R Q R' Q' *)
apply cong_symmetry, l7_13 with Y; [apply symmetry_preserves_midpoint with P X P' Z|]; assumption.
(* Goal: not (@eq (@Tpoint Tn) R Z) *)
(* Goal: @Cong Tn Z Q Z Q' *)
apply per_double_cong with Y; Col.
(* Goal: not (@eq (@Tpoint Tn) R Z) *)
intro; treat_equalities; auto.
Qed.
Lemma orth_at2_tsp__ts : forall A B C X Y P Q, P <> Q ->
Orth_at P A B C P X -> Orth_at Q A B C Q Y -> TSP A B C X Y -> TS P Q X Y.
Proof.
(* Goal: forall (A B C X Y P Q : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) P Q)) (_ : @Orth_at Tn P A B C P X) (_ : @Orth_at Tn Q A B C Q Y) (_ : @TSP Tn A B C X Y), @TS Tn P Q X Y *)
intros A B C X Y P Q HPQ HP HQ [HX [HY [T [HT HBet]]]].
(* Goal: @TS Tn P Q X Y *)
assert (HP1 := HP).
(* Goal: @TS Tn P Q X Y *)
apply orth_at_chara in HP1; spliter.
(* Goal: @TS Tn P Q X Y *)
assert (HQ1 := HQ).
(* Goal: @TS Tn P Q X Y *)
apply orth_at_chara in HQ1; spliter.
(* Goal: @TS Tn P Q X Y *)
repeat split.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P Q) (@Bet Tn X T Y)) *)
(* Goal: not (@Col Tn Y P Q) *)
(* Goal: not (@Col Tn X P Q) *)
intro; apply HX, col_cop2__cop with P Q; Col.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P Q) (@Bet Tn X T Y)) *)
(* Goal: not (@Col Tn Y P Q) *)
intro; apply HY, col_cop2__cop with P Q; Col.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T P Q) (@Bet Tn X T Y)) *)
exists T; split; [|assumption].
(* Goal: @Col Tn T P Q *)
destruct (symmetric_point_construction X P) as [X'].
(* Goal: @Col Tn T P Q *)
destruct (symmetric_point_construction Y Q) as [Y'].
(* Goal: @Col Tn T P Q *)
assert (Cong T X T X') by (apply per_double_cong with P; auto).
(* Goal: @Col Tn T P Q *)
assert (Cong T Y T Y') by (apply per_double_cong with Q; auto).
(* Goal: @Col Tn T P Q *)
apply col_permutation_4, bet_col, l7_22 with X Y X' Y'; trivial.
(* Goal: @Bet Tn X' T Y' *)
apply (l4_6 X T Y); repeat split; Cong.
(* Goal: @Cong Tn X Y X' Y' *)
assert (~ Col A B C) by (apply ncop__ncol with X, HX).
(* Goal: @Cong Tn X Y X' Y' *)
apply mid2_orth_at2__cong with A B C P Q; auto.
Qed.
Lemma orth_dec : forall A B C U V, Orth A B C U V \/ ~ Orth A B C U V.
Proof.
(* Goal: forall A B C U V : @Tpoint Tn, or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
intros A B C U V.
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
destruct (eq_dec_points U V).
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
unfold Orth, Orth_at; right; intros [X []]; spliter; auto.
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
revert dependent V.
(* Goal: forall (V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)), or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
revert U.
(* Goal: forall (U V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)), or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
assert (Haux : forall U V, U <> V -> ~ Coplanar A B C U -> Orth A B C U V \/ ~ Orth A B C U V).
(* Goal: forall (U V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)), or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
(* Goal: forall (U V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)) (_ : not (@Coplanar Tn A B C U)), or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
{
(* Goal: forall (U V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)) (_ : not (@Coplanar Tn A B C U)), or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
intros U V HUV HU.
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
destruct (l11_62_existence_bis A B C U HU) as [X HX].
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
destruct (col_dec U V X).
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
left; apply col_orth__orth with X; Col; apply orth_symmetry; exists X; apply HX.
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
right; intros [Y HY].
(* Goal: False *)
assert (X = Y).
(* Goal: False *)
(* Goal: @eq (@Tpoint Tn) X Y *)
{
(* Goal: @eq (@Tpoint Tn) X Y *)
apply l11_62_unicity_bis with A B C U; [assumption|].
(* Goal: @Orth_at Tn Y A B C Y U *)
apply orth_at_symmetry, col_orth_at__orth_at with V; [destruct HY; spliter..|]; trivial.
(* Goal: not (@eq (@Tpoint Tn) U Y) *)
intro; subst Y; absurd (Coplanar A B C U); [|assumption].
(* Goal: not (@Coplanar Tn A B C U) *)
assert_diffs; apply orth_at__ncop2 with X X; auto.
(* BG Goal: forall (U V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)), or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
(* BG Goal: False *)
}
(* Goal: False *)
subst; destruct HY; spliter; Col.
(* BG Goal: forall (U V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)), or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
}
(* Goal: forall (U V : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) U V)), or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
intros U V HUV.
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
destruct (col_dec A B C).
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
unfold Orth, Orth_at; right; intros [X []]; spliter; auto.
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
destruct (cop_dec A B C U); [|auto].
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
destruct (cop_dec A B C V).
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
-
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
right; intro.
(* Goal: False *)
apply HUV, (orth_at2__eq A B C U V); apply col_cop_orth__orth_at; Col.
(* BG Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
-
(* Goal: or (@Orth Tn A B C U V) (not (@Orth Tn A B C U V)) *)
destruct (Haux V U) as [HOrth|HNOrth]; auto; [left|right; intro HOrth; apply HNOrth]; apply orth_symmetry, HOrth.
Qed.
Lemma orth_at_dec : forall A B C U V X, Orth_at X A B C U V \/ ~ Orth_at X A B C U V.
Proof.
(* Goal: forall A B C U V X : @Tpoint Tn, or (@Orth_at Tn X A B C U V) (not (@Orth_at Tn X A B C U V)) *)
intros A B C U V X.
(* Goal: or (@Orth_at Tn X A B C U V) (not (@Orth_at Tn X A B C U V)) *)
destruct (orth_dec A B C U V) as [|HNOrth]; [|right; intro HX; apply HNOrth; exists X; apply HX].
(* Goal: or (@Orth_at Tn X A B C U V) (not (@Orth_at Tn X A B C U V)) *)
destruct (cop_dec A B C X); [|unfold Orth_at; right; intro; spliter; auto].
(* Goal: or (@Orth_at Tn X A B C U V) (not (@Orth_at Tn X A B C U V)) *)
destruct (col_dec U V X) as [HCol|]; [|unfold Orth_at; right; intro; spliter; auto].
(* Goal: or (@Orth_at Tn X A B C U V) (not (@Orth_at Tn X A B C U V)) *)
left; apply col_cop_orth__orth_at; assumption.
Qed.
Lemma tsp_dec : forall A B C X Y, TSP A B C X Y \/ ~ TSP A B C X Y.
Proof.
(* Goal: forall A B C X Y : @Tpoint Tn, or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
intros A B C X Y.
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
destruct (cop_dec A B C X) as [|HX].
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
right; intros [Ha]; apply Ha; assumption.
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
destruct (cop_dec A B C Y) as [|HY].
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
right; intros [_ [Ha]]; apply Ha; assumption.
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
destruct (l11_62_existence_bis A B C X HX) as [P HP].
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
destruct (l11_62_existence_bis A B C Y HY) as [Q HQ].
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
assert (HP1 := HP).
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
apply orth_at_chara in HP1; spliter.
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
assert (HQ1 := HQ).
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
apply orth_at_chara in HQ1; spliter.
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
destruct (eq_dec_points P Q).
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
{
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
subst Q; clear HQ; destruct (bet_dec X P Y) as [|HNBet].
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
left; repeat split; trivial; exists P; split; trivial.
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
right; intro HQ; apply HNBet.
(* Goal: @Bet Tn X P Y *)
destruct HQ as [_ [_ [Q [HQ HBet]]]].
(* Goal: @Bet Tn X P Y *)
replace P with Q; [assumption|].
(* Goal: @eq (@Tpoint Tn) Q P *)
apply l8_8, (col_per2__per X Y); try (apply l8_2); Col.
(* Goal: not (@eq (@Tpoint Tn) X Y) *)
intro; treat_equalities; auto.
(* BG Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
}
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
destruct (two_sides_dec P Q X Y) as [HT|HNTS].
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
left; apply cop2_ts__tsp with P Q; assumption.
(* Goal: or (@TSP Tn A B C X Y) (not (@TSP Tn A B C X Y)) *)
right; intro; apply HNTS, (orth_at2_tsp__ts A B C); assumption.
Qed.
Lemma osp_dec : forall A B C X Y, OSP A B C X Y \/ ~ OSP A B C X Y.
Proof.
(* Goal: forall A B C X Y : @Tpoint Tn, or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
intros A B C X Y.
(* Goal: or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
destruct (cop_dec A B C X) as [|HX].
(* Goal: or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
(* Goal: or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
right; intros [X' [[Ha _] _]]; apply Ha; assumption.
(* Goal: or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
destruct (tsp_exists A B C X HX) as [X'].
(* Goal: or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
destruct (tsp_dec A B C Y X') as [|HNTS].
(* Goal: or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
(* Goal: or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
left; exists X'; split; assumption.
(* Goal: or (@OSP Tn A B C X Y) (not (@OSP Tn A B C X Y)) *)
right; intro; apply HNTS; apply l9_41_2 with X; assumption.
Qed.
Lemma os_ts__inangle : forall A B C P, TS B P A C -> OS B A C P -> InAngle P A B C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : @TS Tn B P A C) (_ : @OS Tn B A C P), @InAngle Tn P A B C *)
intros A B C P Hts Hos.
(* Goal: @InAngle Tn P A B C *)
assert(HNCol : ~ Col A B P) by (destruct Hts as []; Col).
(* Goal: @InAngle Tn P A B C *)
assert(~ Col B A C) by (apply (one_side_not_col123 _ _ _ P); auto).
(* Goal: @InAngle Tn P A B C *)
assert (HP' := symmetric_point_construction P B).
(* Goal: @InAngle Tn P A B C *)
destruct HP' as [P'].
(* Goal: @InAngle Tn P A B C *)
assert_diffs.
(* Goal: @InAngle Tn P A B C *)
assert(~ Col B A P') by (intro; apply HNCol; ColR).
(* Goal: @InAngle Tn P A B C *)
assert(HUn := two_sides_in_angle A B C P P').
(* Goal: @InAngle Tn P A B C *)
destruct HUn as [|Habs]; Between.
(* Goal: @InAngle Tn P A B C *)
exfalso.
(* Goal: False *)
apply in_angle_one_side in Habs; Col.
(* Goal: False *)
apply l9_9_bis in Habs.
(* Goal: False *)
apply Habs.
(* Goal: @TS Tn A B P' C *)
apply invert_two_sides; apply l9_2.
(* Goal: @TS Tn B A C P' *)
apply (l9_8_2 _ _ P); Side.
(* Goal: @TS Tn B A P P' *)
repeat split; Col; exists B; split; Col; Between.
Qed.
Lemma os2__inangle : forall A B C P, OS B A C P -> OS B C A P -> InAngle P A B C.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : @OS Tn B A C P) (_ : @OS Tn B C A P), @InAngle Tn P A B C *)
intros A B C P Hos1 Hos2.
(* Goal: @InAngle Tn P A B C *)
apply os_ts__inangle; auto.
(* Goal: @TS Tn B P A C *)
apply l9_31; Side.
Qed.
Lemma acute_conga__acute : forall A B C D E F, Acute A B C -> CongA A B C D E F -> Acute D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Acute Tn A B C) (_ : @CongA Tn A B C D E F), @Acute Tn D E F *)
intros A B C D E F Hacute HConga.
(* Goal: @Acute Tn D E F *)
apply (acute_lea_acute _ _ _ A B C); auto.
(* Goal: @LeA Tn D E F A B C *)
apply conga__lea.
(* Goal: @CongA Tn D E F A B C *)
apply conga_sym; assumption.
Qed.
Lemma acute_out2__acute : forall A B C A' C', Out B A' A -> Out B C' C -> Acute A B C ->
Acute A' B C'.
Proof.
(* Goal: forall (A B C A' C' : @Tpoint Tn) (_ : @Out Tn B A' A) (_ : @Out Tn B C' C) (_ : @Acute Tn A B C), @Acute Tn A' B C' *)
intros A B C A' C' HA HC HB.
(* Goal: @Acute Tn A' B C' *)
apply (acute_conga__acute A B C).
(* Goal: @CongA Tn A B C A' B C' *)
(* Goal: @Acute Tn A B C *)
assumption.
(* Goal: @CongA Tn A B C A' B C' *)
apply out2__conga; assumption.
Qed.
Lemma conga_obtuse__obtuse : forall A B C D E F, Obtuse A B C -> CongA A B C D E F -> Obtuse D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Obtuse Tn A B C) (_ : @CongA Tn A B C D E F), @Obtuse Tn D E F *)
intros A B C D E F Hobtuse HConga.
(* Goal: @Obtuse Tn D E F *)
apply (obtuse_gea_obtuse _ _ _ A B C); auto.
(* Goal: @GeA Tn D E F A B C *)
apply conga__lea; assumption.
Qed.
Lemma obtuse_out2__obtuse : forall A B C A' C', Out B A' A -> Out B C' C -> Obtuse A B C ->
Obtuse A' B C'.
Proof.
(* Goal: forall (A B C A' C' : @Tpoint Tn) (_ : @Out Tn B A' A) (_ : @Out Tn B C' C) (_ : @Obtuse Tn A B C), @Obtuse Tn A' B C' *)
intros A B C A' C' HA HC HB.
(* Goal: @Obtuse Tn A' B C' *)
apply (conga_obtuse__obtuse A B C).
(* Goal: @CongA Tn A B C A' B C' *)
(* Goal: @Obtuse Tn A B C *)
assumption.
(* Goal: @CongA Tn A B C A' B C' *)
apply out2__conga; assumption.
Qed.
Lemma bet_lea__bet : forall A B C D E F, Bet A B C -> LeA A B C D E F -> Bet D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @LeA Tn A B C D E F), @Bet Tn D E F *)
intros A B C D E F HBet Hlea.
(* Goal: @Bet Tn D E F *)
apply (bet_conga__bet A B C); auto.
(* Goal: @CongA Tn A B C D E F *)
apply lea_asym; auto.
(* Goal: @LeA Tn D E F A B C *)
apply lea_distincts in Hlea.
(* Goal: @LeA Tn D E F A B C *)
spliter.
(* Goal: @LeA Tn D E F A B C *)
apply l11_31_2; auto.
Qed.
Lemma out_lea__out : forall A B C D E F, Out E D F -> LeA A B C D E F -> Out B A C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Out Tn E D F) (_ : @LeA Tn A B C D E F), @Out Tn B A C *)
intros A B C D E F Hout Hlea.
(* Goal: @Out Tn B A C *)
apply (l11_21_a D E F); auto.
(* Goal: @CongA Tn D E F A B C *)
apply lea_asym; auto.
(* Goal: @LeA Tn D E F A B C *)
apply lea_distincts in Hlea.
(* Goal: @LeA Tn D E F A B C *)
spliter.
(* Goal: @LeA Tn D E F A B C *)
apply l11_31_1; auto.
Qed.
Lemma bet2_lta__lta : forall A B C D E F A' D',
LtA A B C D E F -> Bet A B A' -> A' <> B -> Bet D E D' -> D' <> E ->
LtA D' E F A' B C.
Proof.
(* Goal: forall (A B C D E F A' D' : @Tpoint Tn) (_ : @LtA Tn A B C D E F) (_ : @Bet Tn A B A') (_ : not (@eq (@Tpoint Tn) A' B)) (_ : @Bet Tn D E D') (_ : not (@eq (@Tpoint Tn) D' E)), @LtA Tn D' E F A' B C *)
intros A B C D E F A' D' Hlta.
(* Goal: forall (_ : @Bet Tn A B A') (_ : not (@eq (@Tpoint Tn) A' B)) (_ : @Bet Tn D E D') (_ : not (@eq (@Tpoint Tn) D' E)), @LtA Tn D' E F A' B C *)
intros.
(* Goal: @LtA Tn D' E F A' B C *)
assert (Hd := Hlta).
(* Goal: @LtA Tn D' E F A' B C *)
apply lta_distincts in Hd.
(* Goal: @LtA Tn D' E F A' B C *)
unfold LtA in *.
(* Goal: and (@LeA Tn D' E F A' B C) (not (@CongA Tn D' E F A' B C)) *)
spliter.
(* Goal: and (@LeA Tn D' E F A' B C) (not (@CongA Tn D' E F A' B C)) *)
split.
(* Goal: not (@CongA Tn D' E F A' B C) *)
(* Goal: @LeA Tn D' E F A' B C *)
apply (l11_36 A _ _ D); auto.
(* Goal: not (@CongA Tn D' E F A' B C) *)
intro.
(* Goal: False *)
assert(CongA A B C D E F); auto.
(* Goal: @CongA Tn A B C D E F *)
apply (l11_13 A' _ _ D'); try (apply conga_sym); Between.
Qed.
Lemma lta__lea : forall A B C D E F, LtA A B C D E F -> LeA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LtA 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 *)
destruct H.
(* Goal: @LeA Tn A B C D E F *)
assumption.
Qed.
Lemma lea123456_lta__lta : forall A B C D E F G H I, LeA A B C D E F -> LtA D E F G H I ->
LtA A B C G H I.
Proof.
(* Goal: forall (A B C D E F G H I : @Tpoint Tn) (_ : @LeA Tn A B C D E F) (_ : @LtA Tn D E F G H I), @LtA Tn A B C G H I *)
intros A B C D E F G H I Hlea Hlta.
(* Goal: @LtA Tn A B C G H I *)
split.
(* Goal: not (@CongA Tn A B C G H I) *)
(* Goal: @LeA Tn A B C G H I *)
-
(* Goal: @LeA Tn A B C G H I *)
apply (lea_trans _ _ _ D E F).
(* Goal: @LeA Tn D E F G H I *)
(* Goal: @LeA Tn A B C D E F *)
assumption.
(* Goal: @LeA Tn D E F G H I *)
apply lta__lea; assumption.
(* BG Goal: not (@CongA Tn A B C G H I) *)
-
(* Goal: not (@CongA Tn A B C G H I) *)
intro.
(* Goal: False *)
destruct Hlta as [Hlea' HNConga].
(* Goal: False *)
apply HNConga.
(* Goal: @CongA Tn D E F G H I *)
apply lea_asym.
(* Goal: @LeA Tn G H I D E F *)
(* Goal: @LeA Tn D E F G H I *)
assumption.
(* Goal: @LeA Tn G H I D E F *)
apply (l11_30 A B C D E F); auto.
(* Goal: @CongA Tn D E F D E F *)
apply lea_distincts in Hlea.
(* Goal: @CongA Tn D E F D E F *)
spliter.
(* Goal: @CongA Tn D E F D E F *)
apply conga_refl; assumption.
Qed.
Lemma lea456789_lta__lta : forall A B C D E F G H I, LtA A B C D E F -> LeA D E F G H I ->
LtA A B C G H I.
Lemma acute_per__lta : forall A B C D E F, Acute A B C -> D <> E -> E <> F -> Per D E F ->
LtA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Acute Tn A B C) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)) (_ : @Per Tn D E F), @LtA Tn A B C D E F *)
intros A B C D E F Hacute HDE HEF HPer.
(* Goal: @LtA Tn A B C D E F *)
intros.
(* Goal: @LtA Tn A B C D E F *)
destruct Hacute as [G [H [I [HPer2 Hlta]]]].
(* Goal: @LtA Tn A B C D E F *)
assert(Hdiff := lta_distincts A B C G H I Hlta).
(* Goal: @LtA Tn A B C D E F *)
spliter.
(* Goal: @LtA Tn A B C D E F *)
apply (conga_preserves_lta A B C G H I); try (apply conga_refl); auto.
(* Goal: @CongA Tn G H I D E F *)
apply l11_16; auto.
Qed.
Lemma obtuse_per__lta : forall A B C D E F, Obtuse A B C -> D <> E -> E <> F -> Per D E F ->
LtA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Obtuse Tn A B C) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)) (_ : @Per Tn D E F), @LtA Tn D E F A B C *)
intros A B C D E F Hobtuse HDE HEF HPer.
(* Goal: @LtA Tn D E F A B C *)
intros.
(* Goal: @LtA Tn D E F A B C *)
destruct Hobtuse as [G [H [I [HPer2 Hgta]]]].
(* Goal: @LtA Tn D E F A B C *)
assert(Hdiff := gta_distincts A B C G H I Hgta).
(* Goal: @LtA Tn D E F A B C *)
spliter.
(* Goal: @LtA Tn D E F A B C *)
apply (conga_preserves_lta G H I A B C); try (apply conga_refl); auto.
(* Goal: @CongA Tn G H I D E F *)
apply l11_16; auto.
Qed.
Lemma acute_obtuse__lta : forall A B C D E F, Acute A B C -> Obtuse D E F -> LtA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Acute Tn A B C) (_ : @Obtuse Tn D E F), @LtA Tn A B C D E F *)
intros A B C D E F Hacute Hobtuse.
(* Goal: @LtA Tn A B C D E F *)
destruct Hacute as [G [H [I [HPer Hlta]]]].
(* Goal: @LtA Tn A B C D E F *)
apply (lta_trans _ _ _ G H I); auto.
(* Goal: @LtA Tn G H I D E F *)
apply lta_distincts in Hlta.
(* Goal: @LtA Tn G H I D E F *)
spliter.
(* Goal: @LtA Tn G H I D E F *)
apply obtuse_per__lta; auto.
Qed.
Lemma lea_in_angle : forall A B C P, LeA A B P A B C -> OS A B C P ->
InAngle P A B C.
Lemma acute_bet__obtuse : forall A B C A', Bet A B A' -> A' <> B -> Acute A B C -> Obtuse A' B C.
Lemma bet_obtuse__acute : forall A B C A', Bet A B A' -> A' <> B -> Obtuse A B C -> Acute A' B C.
Lemma inangle_dec : forall A B C P, InAngle P A B C \/ ~ InAngle P A B C.
Proof.
(* Goal: forall A B C P : @Tpoint Tn, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intros A B C P.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(cop_dec A B C P).
(* Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @Coplanar Tn A B C P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @Coplanar Tn A B C P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro HCop.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(eq_dec_points A B).
(* Goal: forall _ : not (@eq (@Tpoint Tn) A B), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @eq (@Tpoint Tn) A B, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro; subst; right; unfold InAngle; intro; spliter; auto.
(* Goal: forall _ : not (@eq (@Tpoint Tn) A B), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(eq_dec_points C B).
(* Goal: forall _ : not (@eq (@Tpoint Tn) C B), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @eq (@Tpoint Tn) C B, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro; subst; right; unfold InAngle; intro; spliter; auto.
(* Goal: forall _ : not (@eq (@Tpoint Tn) C B), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(eq_dec_points P B).
(* Goal: forall _ : not (@eq (@Tpoint Tn) P B), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @eq (@Tpoint Tn) P B, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro; subst; right; unfold InAngle; intro; spliter; auto.
(* Goal: forall _ : not (@eq (@Tpoint Tn) P B), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(col_dec A B C).
(* Goal: forall _ : not (@Col Tn A B C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @Col Tn A B C, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @Col Tn A B C, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro HColB.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(bet_dec A B C).
(* Goal: forall _ : not (@Bet Tn A B C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @Bet Tn A B C, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @Bet Tn A B C, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro HBBet.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
left.
(* Goal: @InAngle Tn P A B C *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists B.
(* Goal: and (@Bet Tn A B C) (or (@eq (@Tpoint Tn) B B) (@Out Tn B B P)) *)
split; auto.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Col Tn A B C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Bet Tn A B C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@Bet Tn A B C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro HBNBet.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(out_dec B A P).
(* Goal: forall _ : not (@Out Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @Out Tn B A P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @Out Tn B A P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
left.
(* Goal: @InAngle Tn P A B C *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists A; Between.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Col Tn A B C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Out Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@Out Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
right.
(* Goal: not (@InAngle Tn P A B C) *)
intro Habs.
(* Goal: False *)
destruct Habs as [_ [_ [_ [X [HXBet HUn]]]]].
(* Goal: False *)
destruct HUn as [|HoutBXP].
(* Goal: False *)
(* Goal: False *)
subst; auto.
(* Goal: False *)
assert(HInter := out2_bet_out A B C X P); auto.
(* Goal: False *)
destruct HInter; auto.
(* Goal: @Out Tn B A C *)
apply not_bet_out; auto.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Col Tn A B C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@Col Tn A B C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro HNColB.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
assert(HP' := symmetric_point_construction P B).
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
destruct HP' as [P'].
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
assert_diffs.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(two_sides_dec B P A C).
(* Goal: forall _ : not (@TS Tn B P A C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @TS Tn B P A C, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @TS Tn B P A C, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
assert(HUn := two_sides_in_angle A B C P P').
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
destruct HUn as [HInAngle|HInAngle]; Between.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
-
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
destruct HInAngle as [_ [_ [_ [X [HXBet HUn]]]]].
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
destruct HUn as [HXB|HBout].
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
left; repeat split; auto; exists X; split; auto.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
right.
(* Goal: not (@InAngle Tn P A B C) *)
intro Habs.
(* Goal: False *)
destruct Habs as [_ [_ [_ [X' [HX'Bet HUn]]]]].
(* Goal: False *)
assert(Col B X' P) by (destruct HUn; subst; assert_cols; Col).
(* Goal: False *)
assert(X = X') by (apply (l6_21 A C B P); Col; ColR).
(* Goal: False *)
subst X'.
(* Goal: False *)
assert_diffs.
(* Goal: False *)
destruct HUn as [|HBout']; auto.
(* Goal: False *)
assert(Col P B P' /\ ~ Bet P B P'); spliter; Between.
(* Goal: and (@Col Tn P B P') (not (@Bet Tn P B P')) *)
apply l6_4_1.
(* Goal: @Out Tn B P P' *)
apply (l6_7 _ _ X); auto.
(* Goal: @Out Tn B P X *)
apply l6_6; auto.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@TS Tn B P A C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@TS Tn B P A C), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro HNts.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(col_dec B A P).
(* Goal: forall _ : not (@Col Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @Col Tn B A P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @Col Tn B A P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(out_dec B A P).
(* Goal: forall _ : not (@Out Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @Out Tn B A P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @Out Tn B A P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
left.
(* Goal: @InAngle Tn P A B C *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists A; Between.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Col Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Out Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@Out Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
right.
(* Goal: not (@InAngle Tn P A B C) *)
intro Habs.
(* Goal: False *)
destruct Habs as [_ [_ [_ [X [HXBet HUn]]]]].
(* Goal: False *)
assert(Col B X P) by (destruct HUn; subst; assert_cols; Col).
(* Goal: False *)
assert(X = A) by (apply (l6_21 A C B P); Col; ColR).
(* Goal: False *)
subst X.
(* Goal: False *)
destruct HUn; auto.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Col Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@Col Tn B A P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(col_dec B C P).
(* Goal: forall _ : not (@Col Tn B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @Col Tn B C P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @Col Tn B C P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
elim(out_dec B C P).
(* Goal: forall _ : not (@Out Tn B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* Goal: forall _ : @Out Tn B C P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
{
(* Goal: forall _ : @Out Tn B C P, or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
left.
(* Goal: @InAngle Tn P A B C *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists C; Between.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Col Tn B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Out Tn B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@Out Tn B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
right.
(* Goal: not (@InAngle Tn P A B C) *)
intro Habs.
(* Goal: False *)
destruct Habs as [_ [_ [_ [X [HXBet HUn]]]]].
(* Goal: False *)
assert(Col B X P) by (destruct HUn; subst; assert_cols; Col).
(* Goal: False *)
assert(X = C) by (apply (l6_21 A C B P); Col; ColR).
(* Goal: False *)
subst X.
(* Goal: False *)
destruct HUn; auto.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
(* BG Goal: forall _ : not (@Col Tn B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@Col Tn B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
right.
(* Goal: not (@InAngle Tn P A B C) *)
intro.
(* Goal: False *)
apply HNts.
(* Goal: @TS Tn B P A C *)
apply invert_two_sides.
(* Goal: @TS Tn P B A C *)
apply in_angle_two_sides; auto.
(* BG Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
}
(* Goal: forall _ : not (@Coplanar Tn A B C P), or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
intro HNCop.
(* Goal: or (@InAngle Tn P A B C) (not (@InAngle Tn P A B C)) *)
right.
(* Goal: not (@InAngle Tn P A B C) *)
intro.
(* Goal: False *)
apply HNCop; Cop.
Qed.
Lemma lea_dec : forall A B C D E F, LeA A B C D E F \/ ~ LeA A B C D E F.
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intros A B C D E F.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(eq_dec_points A B).
(* Goal: forall _ : not (@eq (@Tpoint Tn) A B), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @eq (@Tpoint Tn) A B, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro; right; intro Hlea; apply lea_distincts in Hlea; spliter; auto.
(* Goal: forall _ : not (@eq (@Tpoint Tn) A B), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(eq_dec_points B C).
(* Goal: forall _ : not (@eq (@Tpoint Tn) B C), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @eq (@Tpoint Tn) B C, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro; right; intro Hlea; apply lea_distincts in Hlea; spliter; auto.
(* Goal: forall _ : not (@eq (@Tpoint Tn) B C), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(eq_dec_points D E).
(* Goal: forall _ : not (@eq (@Tpoint Tn) D E), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @eq (@Tpoint Tn) D E, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro; right; intro Hlea; apply lea_distincts in Hlea; spliter; auto.
(* Goal: forall _ : not (@eq (@Tpoint Tn) D E), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(eq_dec_points E F).
(* Goal: forall _ : not (@eq (@Tpoint Tn) E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @eq (@Tpoint Tn) E F, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro; right; intro Hlea; apply lea_distincts in Hlea; spliter; auto.
(* Goal: forall _ : not (@eq (@Tpoint Tn) E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(col_dec A B C).
(* Goal: forall _ : not (@Col Tn A B C), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @Col Tn A B C, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
{
(* Goal: forall _ : @Col Tn A B C, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(out_dec B A C).
(* Goal: forall _ : not (@Out Tn B A C), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @Out Tn B A C, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro; left; apply l11_31_1; auto.
(* Goal: forall _ : not (@Out Tn B A C), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(bet_dec D E F).
(* Goal: forall _ : not (@Bet Tn D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @Bet Tn D E F, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro; left; apply l11_31_2; auto.
(* Goal: forall _ : not (@Bet Tn D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro HENBet.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
right.
(* Goal: not (@LeA Tn A B C D E F) *)
intro.
(* Goal: False *)
apply HENBet.
(* Goal: @Bet Tn D E F *)
apply (bet_lea__bet A B C); auto.
(* Goal: @Bet Tn A B C *)
apply not_out_bet; auto.
(* BG Goal: forall _ : not (@Col Tn A B C), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
}
(* Goal: forall _ : not (@Col Tn A B C), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro HNColB.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(col_dec D E F).
(* Goal: forall _ : not (@Col Tn D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @Col Tn D E F, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
{
(* Goal: forall _ : @Col Tn D E F, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(bet_dec D E F).
(* Goal: forall _ : not (@Bet Tn D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @Bet Tn D E F, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro; left; apply l11_31_2; auto.
(* Goal: forall _ : not (@Bet Tn D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
right.
(* Goal: not (@LeA Tn A B C D E F) *)
intro.
(* Goal: False *)
apply HNColB.
(* Goal: @Col Tn A B C *)
apply col_permutation_4.
(* Goal: @Col Tn B A C *)
apply out_col.
(* Goal: @Out Tn B A C *)
apply (out_lea__out _ _ _ D E F); auto.
(* Goal: @Out Tn E D F *)
apply not_bet_out; auto.
(* BG Goal: forall _ : not (@Col Tn D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
}
(* Goal: forall _ : not (@Col Tn D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
assert(HP := angle_construction_1 A B C D E F).
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
destruct HP as [P []]; Col.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
elim(inangle_dec D E F P).
(* Goal: forall _ : not (@InAngle Tn P D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
(* Goal: forall _ : @InAngle Tn P D E F, or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro; left; exists P; auto.
(* Goal: forall _ : not (@InAngle Tn P D E F), or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
intro HNInAngle.
(* Goal: or (@LeA Tn A B C D E F) (not (@LeA Tn A B C D E F)) *)
right.
(* Goal: not (@LeA Tn A B C D E F) *)
intro.
(* Goal: False *)
apply HNInAngle.
(* Goal: @InAngle Tn P D E F *)
apply lea_in_angle; try (apply conga_sym); Side.
(* Goal: @LeA Tn D E P D E F *)
apply (l11_30 A B C D E F); auto; apply conga_refl; auto.
Qed.
Lemma gea_dec : forall A B C D E F, GeA A B C D E F \/ ~ GeA A B C D E F.
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, or (@GeA Tn A B C D E F) (not (@GeA Tn A B C D E F)) *)
intros A B C D E F.
(* Goal: or (@GeA Tn A B C D E F) (not (@GeA Tn A B C D E F)) *)
unfold GeA.
(* Goal: or (@LeA Tn D E F A B C) (not (@LeA Tn D E F A B C)) *)
elim(lea_dec D E F A B C); auto.
Qed.
Lemma lta_dec : forall A B C D E F, LtA A B C D E F \/ ~ LtA A B C D E F.
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
intros A B C D E F.
(* Goal: or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
elim(conga_dec A B C D E F).
(* Goal: forall _ : not (@CongA Tn A B C D E F), or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
(* Goal: forall _ : @CongA Tn A B C D E F, or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
{
(* Goal: forall _ : @CongA Tn A B C D E F, or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
intro.
(* Goal: or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
right.
(* Goal: not (@LtA Tn A B C D E F) *)
unfold LtA.
(* Goal: not (and (@LeA Tn A B C D E F) (not (@CongA Tn A B C D E F))) *)
intro.
(* Goal: False *)
spliter.
(* Goal: False *)
auto.
(* BG Goal: forall _ : not (@CongA Tn A B C D E F), or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
}
(* Goal: forall _ : not (@CongA Tn A B C D E F), or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
intro.
(* Goal: or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
elim(lea_dec A B C D E F).
(* Goal: forall _ : not (@LeA Tn A B C D E F), or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
(* Goal: forall _ : @LeA Tn A B C D E F, or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
{
(* Goal: forall _ : @LeA Tn A B C D E F, or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
intro.
(* Goal: or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
left.
(* Goal: @LtA Tn A B C D E F *)
split; auto.
(* BG Goal: forall _ : not (@LeA Tn A B C D E F), or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
}
(* Goal: forall _ : not (@LeA Tn A B C D E F), or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
intro.
(* Goal: or (@LtA Tn A B C D E F) (not (@LtA Tn A B C D E F)) *)
right.
(* Goal: not (@LtA Tn A B C D E F) *)
unfold LtA.
(* Goal: not (and (@LeA Tn A B C D E F) (not (@CongA Tn A B C D E F))) *)
intro.
(* Goal: False *)
spliter.
(* Goal: False *)
auto.
Qed.
Lemma gta_dec : forall A B C D E F, GtA A B C D E F \/ ~ GtA A B C D E F.
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, or (@GtA Tn A B C D E F) (not (@GtA Tn A B C D E F)) *)
intros A B C D E F.
(* Goal: or (@GtA Tn A B C D E F) (not (@GtA Tn A B C D E F)) *)
unfold GtA.
(* Goal: or (@LtA Tn D E F A B C) (not (@LtA Tn D E F A B C)) *)
elim(lta_dec D E F A B C); auto.
Qed.
Lemma lea_total : forall A B C D E F, A <> B -> B <> C -> D <> E -> E <> F ->
LeA A B C D E F \/ LeA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intros A B C D E F HAB HBC HDE HEF.
(* Goal: or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
elim(col_dec A B C).
(* Goal: forall _ : not (@Col Tn A B C), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
(* Goal: forall _ : @Col Tn A B C, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
{
(* Goal: forall _ : @Col Tn A B C, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
elim(out_dec B A C).
(* Goal: forall _ : not (@Out Tn B A C), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
(* Goal: forall _ : @Out Tn B A C, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
-
(* Goal: forall _ : @Out Tn B A C, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro; left; apply l11_31_1; auto.
(* BG Goal: forall _ : not (@Col Tn A B C), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
(* BG Goal: forall _ : not (@Out Tn B A C), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
-
(* Goal: forall _ : not (@Out Tn B A C), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro; right; apply l11_31_2; auto; apply not_out_bet; auto.
(* BG Goal: forall _ : not (@Col Tn A B C), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
}
(* Goal: forall _ : not (@Col Tn A B C), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
elim(col_dec D E F).
(* Goal: forall _ : not (@Col Tn D E F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
(* Goal: forall _ : @Col Tn D E F, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
{
(* Goal: forall _ : @Col Tn D E F, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
elim(out_dec E D F).
(* Goal: forall _ : not (@Out Tn E D F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
(* Goal: forall _ : @Out Tn E D F, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
-
(* Goal: forall _ : @Out Tn E D F, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro; right; apply l11_31_1; auto.
(* BG Goal: forall _ : not (@Col Tn D E F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
(* BG Goal: forall _ : not (@Out Tn E D F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
-
(* Goal: forall _ : not (@Out Tn E D F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro; left; apply l11_31_2; auto; apply not_out_bet; auto.
(* BG Goal: forall _ : not (@Col Tn D E F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
}
(* Goal: forall _ : not (@Col Tn D E F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro.
(* Goal: or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
elim(lea_dec A B C D E F).
(* Goal: forall _ : not (@LeA Tn A B C D E F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
(* Goal: forall _ : @LeA Tn A B C D E F, or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro; left; auto.
(* Goal: forall _ : not (@LeA Tn A B C D E F), or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
intro HNlea.
(* Goal: or (@LeA Tn A B C D E F) (@LeA Tn D E F A B C) *)
right.
(* Goal: @LeA Tn D E F A B C *)
assert(HP := angle_construction_1 D E F A B C).
(* Goal: @LeA Tn D E F A B C *)
destruct HP as [P []]; Col.
(* Goal: @LeA Tn D E F A B C *)
exists P.
(* Goal: and (@InAngle Tn P A B C) (@CongA Tn D E F A B P) *)
split; auto.
(* Goal: @InAngle Tn P A B C *)
apply os2__inangle; Side.
(* Goal: @OS Tn B C A P *)
apply cop__not_two_sides_one_side; Col; Cop.
(* Goal: not (@TS Tn B C A P) *)
(* Goal: not (@Col Tn P B C) *)
-
(* Goal: not (@Col Tn P B C) *)
intro.
(* Goal: False *)
apply HNlea.
(* Goal: @LeA Tn A B C D E F *)
apply conga__lea.
(* Goal: @CongA Tn A B C D E F *)
apply (out_conga A B P D E F); try (apply out_trivial); try (apply conga_sym); auto.
(* Goal: @Out Tn B P C *)
apply (col_one_side_out _ A); Col; Side.
(* BG Goal: not (@TS Tn B C A P) *)
-
(* Goal: not (@TS Tn B C A P) *)
intro.
(* Goal: False *)
apply HNlea.
(* Goal: @LeA Tn A B C D E F *)
apply (l11_30 A B C A B P); try (apply conga_refl); try (apply conga_sym); auto.
(* Goal: @LeA Tn A B C A B P *)
exists C.
(* Goal: and (@InAngle Tn C A B P) (@CongA Tn A B C A B C) *)
split; try (apply conga_refl); auto.
(* Goal: @InAngle Tn C A B P *)
apply os_ts__inangle; Side.
Qed.
Lemma gea_total : forall A B C D E F, A <> B -> B <> C -> D <> E -> E <> F ->
GeA A B C D E F \/ GeA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)), or (@GeA Tn A B C D E F) (@GeA Tn D E F A B C) *)
intros A B C D E F HAB HBC HDE HEF.
(* Goal: or (@GeA Tn A B C D E F) (@GeA Tn D E F A B C) *)
elim(lea_total A B C D E F); auto.
Qed.
Lemma or_lta_conga_gta : forall A B C D E F,
A <> B -> C <> B -> D <> E -> F <> E ->
LtA A B C D E F \/ GtA A B C D E F \/ CongA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) F E)), or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
intros.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
assert(HH:=lea_total A B C D E F).
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
induction HH; auto.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
induction(conga_dec A B C D E F).
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
right; right.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: @CongA Tn A B C D E F *)
assumption.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
left.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: @LtA Tn A B C D E F *)
unfold LtA.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: and (@LeA Tn A B C D E F) (not (@CongA Tn A B C D E F)) *)
split; assumption.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
induction(conga_dec A B C D E F).
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
right; right.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
(* Goal: @CongA Tn A B C D E F *)
assumption.
(* Goal: or (@LtA Tn A B C D E F) (or (@GtA Tn A B C D E F) (@CongA Tn A B C D E F)) *)
right; left.
(* Goal: @GtA Tn A B C D E F *)
unfold GtA.
(* Goal: @LtA Tn D E F A B C *)
unfold LtA.
(* Goal: and (@LeA Tn D E F A B C) (not (@CongA Tn D E F A B C)) *)
split.
(* Goal: not (@CongA Tn D E F A B C) *)
(* Goal: @LeA Tn D E F A B C *)
assumption.
(* Goal: not (@CongA Tn D E F A B C) *)
intro.
(* Goal: False *)
apply H4.
(* Goal: @CongA Tn A B C D E F *)
apply conga_sym.
(* Goal: @CongA Tn D E F A B C *)
assumption.
Qed.
Lemma angle_partition : forall A B C, A <> B -> B <> C ->
Acute A B C \/ Per A B C \/ Obtuse A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)), or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
intros A B C HAB HBC.
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
assert(Hl := lower_dim_ex).
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
destruct Hl as [A' [B' [D']]].
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
assert(~ Col A' B' D') by (unfold Col; auto).
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
assert(HC' := l10_15 A' B' B' D').
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
destruct HC' as [C' [HC'Right _]]; Col.
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
assert_diffs.
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
destruct (or_lta_conga_gta A B C A' B' C') as [|[|]]; auto.
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
-
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
left.
(* Goal: @Acute Tn A B C *)
exists A', B', C'.
(* Goal: and (@Per Tn A' B' C') (@LtA Tn A B C A' B' C') *)
repeat (split; Perp).
(* BG Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
(* BG Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
-
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
right; right.
(* Goal: @Obtuse Tn A B C *)
exists A', B', C'.
(* Goal: and (@Per Tn A' B' C') (@GtA Tn A B C A' B' C') *)
repeat (split; Perp).
(* BG Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
-
(* Goal: or (@Acute Tn A B C) (or (@Per Tn A B C) (@Obtuse Tn A B C)) *)
right; left.
(* Goal: @Per Tn A B C *)
apply (l11_17 A' B' C'); try (apply conga_sym); Perp.
Qed.
Lemma acute_chara : forall A B C A', Bet A B A' -> B <> A' -> (Acute A B C <-> LtA A B C A' B C).
Proof.
(* Goal: forall (A B C A' : @Tpoint Tn) (_ : @Bet Tn A B A') (_ : not (@eq (@Tpoint Tn) B A')), iff (@Acute Tn A B C) (@LtA Tn A B C A' B C) *)
intros A B C A' HBet HBA'.
(* Goal: iff (@Acute Tn A B C) (@LtA Tn A B C A' B C) *)
split.
(* Goal: forall _ : @LtA Tn A B C A' B C, @Acute Tn A B C *)
(* Goal: forall _ : @Acute Tn A B C, @LtA Tn A B C A' B C *)
-
(* Goal: forall _ : @Acute Tn A B C, @LtA Tn A B C A' B C *)
intro Hacute.
(* Goal: @LtA Tn A B C A' B C *)
assert(Hdiff := acute_distincts A B C Hacute).
(* Goal: @LtA Tn A B C A' B C *)
spliter.
(* Goal: @LtA Tn A B C A' B C *)
apply acute_obtuse__lta; auto.
(* Goal: @Obtuse Tn A' B C *)
apply (acute_bet__obtuse A); auto.
(* BG Goal: forall _ : @LtA Tn A B C A' B C, @Acute Tn A B C *)
-
(* Goal: forall _ : @LtA Tn A B C A' B C, @Acute Tn A B C *)
intro Hlta.
(* Goal: @Acute Tn A B C *)
assert (Hd := Hlta).
(* Goal: @Acute Tn A B C *)
apply lta_distincts in Hd.
(* Goal: @Acute Tn A B C *)
spliter.
(* Goal: @Acute Tn A B C *)
elim(angle_partition A B C); auto.
(* Goal: forall _ : or (@Per Tn A B C) (@Obtuse Tn A B C), @Acute Tn A B C *)
intro Habs.
(* Goal: @Acute Tn A B C *)
exfalso.
(* Goal: False *)
assert(Hlta1 : LtA A B C A B C); [|destruct Hlta1 as [_ HNConga]; apply HNConga; apply conga_refl; auto].
(* Goal: @LtA Tn A B C A B C *)
destruct Habs.
(* Goal: @LtA Tn A B C A B C *)
(* Goal: @LtA Tn A B C A B C *)
{
(* Goal: @LtA Tn A B C A B C *)
apply (conga_preserves_lta A B C A' B C); try (apply conga_refl); auto.
(* Goal: @CongA Tn A' B C A B C *)
apply conga_sym.
(* Goal: @CongA Tn A B C A' B C *)
apply conga_comm.
(* Goal: @CongA Tn C B A C B A' *)
apply l11_18_1; Perp.
(* BG Goal: @LtA Tn A B C A B C *)
}
(* Goal: @LtA Tn A B C A B C *)
apply (lta_trans _ _ _ A' B C); auto.
(* Goal: @LtA Tn A' B C A B C *)
apply acute_obtuse__lta; auto.
(* Goal: @Acute Tn A' B C *)
apply (bet_obtuse__acute A); auto.
Qed.
Lemma obtuse_chara : forall A B C A', Bet A B A' -> B <> A' -> (Obtuse A B C <-> LtA A' B C A B C).
Proof.
(* Goal: forall (A B C A' : @Tpoint Tn) (_ : @Bet Tn A B A') (_ : not (@eq (@Tpoint Tn) B A')), iff (@Obtuse Tn A B C) (@LtA Tn A' B C A B C) *)
intros A B C A' HBet HBA'.
(* Goal: iff (@Obtuse Tn A B C) (@LtA Tn A' B C A B C) *)
split.
(* Goal: forall _ : @LtA Tn A' B C A B C, @Obtuse Tn A B C *)
(* Goal: forall _ : @Obtuse Tn A B C, @LtA Tn A' B C A B C *)
-
(* Goal: forall _ : @Obtuse Tn A B C, @LtA Tn A' B C A B C *)
intro Hobtuse.
(* Goal: @LtA Tn A' B C A B C *)
assert(Hdiff := obtuse_distincts A B C Hobtuse).
(* Goal: @LtA Tn A' B C A B C *)
spliter.
(* Goal: @LtA Tn A' B C A B C *)
apply acute_obtuse__lta; auto.
(* Goal: @Acute Tn A' B C *)
apply (bet_obtuse__acute A); auto.
(* BG Goal: forall _ : @LtA Tn A' B C A B C, @Obtuse Tn A B C *)
-
(* Goal: forall _ : @LtA Tn A' B C A B C, @Obtuse Tn A B C *)
intro Hlta.
(* Goal: @Obtuse Tn A B C *)
assert (Hd := Hlta).
(* Goal: @Obtuse Tn A B C *)
apply lta_distincts in Hd.
(* Goal: @Obtuse Tn A B C *)
spliter.
(* Goal: @Obtuse Tn A B C *)
elim(angle_partition A B C); auto.
(* Goal: forall _ : or (@Per Tn A B C) (@Obtuse Tn A B C), @Obtuse Tn A B C *)
(* Goal: forall _ : @Acute Tn A B C, @Obtuse Tn A B C *)
{
(* Goal: forall _ : @Acute Tn A B C, @Obtuse Tn A B C *)
intro.
(* Goal: @Obtuse Tn A B C *)
exfalso.
(* Goal: False *)
assert(Hlta1 : LtA A B C A B C); [|destruct Hlta1 as [_ HNConga]; apply HNConga; apply conga_refl; auto].
(* Goal: @LtA Tn A B C A B C *)
apply (lta_trans _ _ _ A' B C); auto.
(* Goal: @LtA Tn A B C A' B C *)
apply acute_obtuse__lta; auto.
(* Goal: @Obtuse Tn A' B C *)
apply (acute_bet__obtuse A); auto.
(* BG Goal: forall _ : or (@Per Tn A B C) (@Obtuse Tn A B C), @Obtuse Tn A B C *)
}
(* Goal: forall _ : or (@Per Tn A B C) (@Obtuse Tn A B C), @Obtuse Tn A B C *)
intro HUn.
(* Goal: @Obtuse Tn A B C *)
destruct HUn; auto.
(* Goal: @Obtuse Tn A B C *)
exfalso.
(* Goal: False *)
assert(Hlta1 : LtA A B C A B C); [|destruct Hlta1 as [_ HNConga]; apply HNConga; apply conga_refl; auto].
(* Goal: @LtA Tn A B C A B C *)
apply (conga_preserves_lta A' B C A B C); try (apply conga_refl); auto.
(* Goal: @CongA Tn A' B C A B C *)
apply conga_sym.
(* Goal: @CongA Tn A B C A' B C *)
apply conga_comm.
(* Goal: @CongA Tn C B A C B A' *)
apply l11_18_1; Between; Perp.
Qed.
Lemma conga__acute : forall A B C, CongA A B C A C B -> Acute A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @CongA Tn A B C A C B), @Acute Tn A B C *)
intros A B C HCongA.
(* Goal: @Acute Tn A B C *)
destruct (col_dec A B C).
(* Goal: @Acute Tn A B C *)
(* Goal: @Acute Tn A B C *)
{
(* Goal: @Acute Tn A B C *)
apply out__acute, not_bet_out; trivial.
(* Goal: not (@Bet Tn A B C) *)
intro.
(* Goal: False *)
absurd (B = C).
(* Goal: @eq (@Tpoint Tn) B C *)
(* Goal: not (@eq (@Tpoint Tn) B C) *)
apply conga_distinct in HCongA; spliter; auto.
(* Goal: @eq (@Tpoint Tn) B C *)
apply between_equality with A; apply between_symmetry; trivial.
(* Goal: @Bet Tn A C B *)
apply (bet_conga__bet A B C); assumption.
(* BG Goal: @Acute Tn A B C *)
}
(* Goal: @Acute Tn A B C *)
destruct (segment_construction C B C B) as [C' []].
(* Goal: @Acute Tn A B C *)
apply conga_distinct in HCongA; spliter.
(* Goal: @Acute Tn A B C *)
assert_diffs.
(* Goal: @Acute Tn A B C *)
apply acute_sym, acute_chara with C'; auto.
(* Goal: @LtA Tn C B A C' B A *)
destruct (l11_41 B C A C'); Col.
(* Goal: @LtA Tn C B A C' B A *)
apply (conga_preserves_lta B C A A B C'); trivial.
(* Goal: @CongA Tn A B C' C' B A *)
(* Goal: @CongA Tn B C A C B A *)
apply conga_comm, conga_sym; assumption.
(* Goal: @CongA Tn A B C' C' B A *)
apply conga_pseudo_refl; auto.
Qed.
Lemma cong__acute : forall A B C, A <> B -> B <> C -> Cong A B A C -> Acute A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Cong Tn A B A C), @Acute Tn A B C *)
intros A B C HAB HBC HCong.
(* Goal: @Acute Tn A B C *)
apply conga__acute.
(* Goal: @CongA Tn A B C A C B *)
assert_diffs.
(* Goal: @CongA Tn A B C A C B *)
destruct (l11_51 A B C A C B) as [_ []]; Cong.
Qed.
Lemma nlta : forall A B C, ~ LtA A B C A B C.
Proof.
(* Goal: forall A B C : @Tpoint Tn, not (@LtA Tn A B C A B C) *)
intros A B C.
(* Goal: not (@LtA Tn A B C A B C) *)
intro.
(* Goal: False *)
apply (not_and_lta A B C A B C).
(* Goal: and (@LtA Tn A B C A B C) (@LtA Tn A B C A B C) *)
split; assumption.
Qed.
Lemma lea__nlta : forall A B C D E F, LeA A B C D E F -> ~ LtA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LeA Tn A B C D E F), not (@LtA Tn D E F A B C) *)
intros.
(* Goal: not (@LtA Tn D E F A B C) *)
intro Hlta.
(* Goal: False *)
destruct Hlta as [Hlea HNConga].
(* Goal: False *)
apply HNConga.
(* Goal: @CongA Tn D E F A B C *)
apply lea_asym; assumption.
Qed.
Lemma lta__nlea : forall A B C D E F, LtA A B C D E F -> ~ LeA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @LtA Tn A B C D E F), not (@LeA Tn D E F A B C) *)
intros A B C D E F Hlta.
(* Goal: not (@LeA Tn D E F A B C) *)
destruct Hlta as [Hlea HNConga].
(* Goal: not (@LeA Tn D E F A B C) *)
intro.
(* Goal: False *)
apply HNConga.
(* Goal: @CongA Tn A B C D E F *)
apply lea_asym; assumption.
Qed.
Lemma nlta__lea : forall A B C D E F, ~ LtA A B C D E F -> A <> B -> B <> C -> D <> E -> E <> F ->
LeA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@LtA Tn A B C D E F)) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)), @LeA Tn D E F A B C *)
intros A B C D E F HNlta.
(* Goal: forall (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)), @LeA Tn D E F A B C *)
intros.
(* Goal: @LeA Tn D E F A B C *)
elim(conga_dec D E F A B C).
(* Goal: forall _ : not (@CongA Tn D E F A B C), @LeA Tn D E F A B C *)
(* Goal: forall _ : @CongA Tn D E F A B C, @LeA Tn D E F A B C *)
apply conga__lea.
(* Goal: forall _ : not (@CongA Tn D E F A B C), @LeA Tn D E F A B C *)
intro.
(* Goal: @LeA Tn D E F A B C *)
elim(lea_total D E F A B C); auto.
(* Goal: forall _ : @LeA Tn A B C D E F, @LeA Tn D E F A B C *)
intro.
(* Goal: @LeA Tn D E F A B C *)
exfalso.
(* Goal: False *)
apply HNlta.
(* Goal: @LtA Tn A B C D E F *)
split; auto.
(* Goal: not (@CongA Tn A B C D E F) *)
apply not_conga_sym; assumption.
Qed.
Lemma nlea__lta : forall A B C D E F, ~ LeA A B C D E F -> A <> B -> B <> C -> D <> E -> E <> F ->
LtA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@LeA Tn A B C D E F)) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)), @LtA Tn D E F A B C *)
intros A B C D E F HNlea.
(* Goal: forall (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)), @LtA Tn D E F A B C *)
intros.
(* Goal: @LtA Tn D E F A B C *)
split.
(* Goal: not (@CongA Tn D E F A B C) *)
(* Goal: @LeA Tn D E F A B C *)
-
(* Goal: @LeA Tn D E F A B C *)
elim(lea_total D E F A B C); auto.
(* Goal: forall _ : @LeA Tn A B C D E F, @LeA Tn D E F A B C *)
intro; exfalso; auto.
(* BG Goal: not (@CongA Tn D E F A B C) *)
-
(* Goal: not (@CongA Tn D E F A B C) *)
intro.
(* Goal: False *)
apply HNlea.
(* Goal: @LeA Tn A B C D E F *)
apply conga__lea.
(* Goal: @CongA Tn A B C D E F *)
apply conga_sym; assumption.
Qed.
Lemma triangle_strict_inequality : forall A B C D, Bet A B D -> Cong B C B D -> ~ Bet A B C ->
Lt A C A D.
Lemma triangle_inequality : forall A B C D, Bet A B D -> Cong B C B D -> Le A C A D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Bet Tn A B D) (_ : @Cong Tn B C B D), @Le Tn A C A D *)
intros A B C D HCong HBet.
(* Goal: @Le Tn A C A D *)
elim(bet_dec A B C).
(* Goal: forall _ : not (@Bet Tn A B C), @Le Tn A C A D *)
(* Goal: forall _ : @Bet Tn A B C, @Le Tn A C A D *)
-
(* Goal: forall _ : @Bet Tn A B C, @Le Tn A C A D *)
intro.
(* Goal: @Le Tn A C A D *)
elim(eq_dec_points A B).
(* Goal: forall _ : not (@eq (@Tpoint Tn) A B), @Le Tn A C A D *)
(* Goal: forall _ : @eq (@Tpoint Tn) A B, @Le Tn A C A D *)
intro; subst; Le.
(* Goal: forall _ : not (@eq (@Tpoint Tn) A B), @Le Tn A C A D *)
intro.
(* Goal: @Le Tn A C A D *)
assert(C = D).
(* Goal: @Le Tn A C A D *)
(* Goal: @eq (@Tpoint Tn) C D *)
apply (construction_uniqueness A B B D); Cong.
(* Goal: @Le Tn A C A D *)
subst; Le.
(* BG Goal: forall _ : not (@Bet Tn A B C), @Le Tn A C A D *)
-
(* Goal: forall _ : not (@Bet Tn A B C), @Le Tn A C A D *)
intro.
(* Goal: @Le Tn A C A D *)
assert(Hlt := triangle_strict_inequality A B C D).
(* Goal: @Le Tn A C A D *)
destruct Hlt; auto.
Qed.
Lemma triangle_strict_inequality_2 : forall A B C A' B' C',
Bet A' B' C' -> Cong A B A' B' -> Cong B C B' C' -> ~ Bet A B C ->
Lt A C A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Bet Tn A' B' C') (_ : @Cong Tn A B A' B') (_ : @Cong Tn B C B' C') (_ : not (@Bet Tn A B C)), @Lt Tn A C A' C' *)
intros A B C A' B' C' HBet HCongA HCongB HNBet.
(* Goal: @Lt Tn A C A' C' *)
destruct (segment_construction A B B C) as [D [HBetD HCongD]].
(* Goal: @Lt Tn A C A' C' *)
apply (cong2_lt__lt A C A D); Cong.
(* Goal: @Cong Tn A D A' C' *)
(* Goal: @Lt Tn A C A D *)
apply (triangle_strict_inequality _ B); Cong.
(* Goal: @Cong Tn A D A' C' *)
apply (l2_11 _ B _ _ B'); Cong.
(* Goal: @Cong Tn B D B' C' *)
apply cong_transitivity with B C; trivial.
Qed.
Lemma triangle_inequality_2 : forall A B C A' B' C',
Bet A' B' C' -> Cong A B A' B' -> Cong B C B' C' ->
Le A C A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Bet Tn A' B' C') (_ : @Cong Tn A B A' B') (_ : @Cong Tn B C B' C'), @Le Tn A C A' C' *)
intros A B C A' B' C' HBet HCongA HCongB.
(* Goal: @Le Tn A C A' C' *)
destruct (segment_construction A B B C) as [D [HBetD HCongD]].
(* Goal: @Le Tn A C A' C' *)
apply (l5_6 A C A D); Cong.
(* Goal: @Cong Tn A D A' C' *)
(* Goal: @Le Tn A C A D *)
apply (triangle_inequality _ B); Cong.
(* Goal: @Cong Tn A D A' C' *)
apply (l2_11 _ B _ _ B'); Cong.
(* Goal: @Cong Tn B D B' C' *)
apply cong_transitivity with B C; trivial.
Qed.
Lemma triangle_strict_reverse_inequality : forall A B C D,
Out A B D -> Cong A C A D -> ~ Out A B C -> Lt B D B C.
Lemma triangle_reverse_inequality : forall A B C D, Out A B D -> Cong A C A D -> Le B D B C.
Lemma os3__lta : forall A B C D, OS A B C D -> OS B C A D -> OS A C B D ->
LtA B A C B D C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @OS Tn A B C D) (_ : @OS Tn B C A D) (_ : @OS Tn A C B D), @LtA Tn B A C B D C *)
intros A B C D HosC HosA HosB.
(* Goal: @LtA Tn B A C B D C *)
assert(HE : InAngle D A B C) by (apply os2__inangle; Side).
(* Goal: @LtA Tn B A C B D C *)
destruct HE as [_ [_ [_ [E [HEBet HUn]]]]].
(* Goal: @LtA Tn B A C B D C *)
assert(HNCol : ~ Col A B C) by (apply (one_side_not_col123 _ _ _ D); auto).
(* Goal: @LtA Tn B A C B D C *)
assert_ncols.
(* Goal: @LtA Tn B A C B D C *)
destruct HUn as [|HBout].
(* Goal: @LtA Tn B A C B D C *)
(* Goal: @LtA Tn B A C B D C *)
exfalso; subst; Col.
(* Goal: @LtA Tn B A C B D C *)
assert(A <> E) by (intro; subst; assert_cols; Col).
(* Goal: @LtA Tn B A C B D C *)
assert(C <> E) by (intro; subst; assert_cols; Col).
(* Goal: @LtA Tn B A C B D C *)
assert_diffs.
(* Goal: @LtA Tn B A C B D C *)
apply (lta_trans _ _ _ B E C).
(* Goal: @LtA Tn B E C B D C *)
(* Goal: @LtA Tn B A C B E C *)
-
(* Goal: @LtA Tn B A C B E C *)
destruct (l11_41 E A B C); auto.
(* Goal: @LtA Tn B A C B E C *)
(* Goal: not (@Col Tn E A B) *)
intro; apply HNCol; ColR.
(* Goal: @LtA Tn B A C B E C *)
apply (conga_preserves_lta E A B B E C); try (apply conga_refl); auto.
(* Goal: @CongA Tn E A B B A C *)
apply (out_conga E A B B A E); try (apply out_trivial); try (apply conga_pseudo_refl); auto.
(* Goal: @Out Tn A E C *)
apply bet_out; auto.
(* BG Goal: @LtA Tn B E C B D C *)
-
(* Goal: @LtA Tn B E C B D C *)
assert(Out E D B).
(* Goal: @LtA Tn B E C B D C *)
(* Goal: @Out Tn E D B *)
apply (col_one_side_out _ A); Col; apply invert_one_side; apply (col_one_side _ C); Col; Side.
(* Goal: @LtA Tn B E C B D C *)
assert_diffs.
(* Goal: @LtA Tn B E C B D C *)
destruct (l11_41 D E C B); auto.
(* Goal: @LtA Tn B E C B D C *)
(* Goal: @Bet Tn E D B *)
(* Goal: not (@Col Tn D E C) *)
intro; apply HNCol; ColR.
(* Goal: @LtA Tn B E C B D C *)
(* Goal: @Bet Tn E D B *)
apply out2__bet; auto.
(* Goal: @LtA Tn B E C B D C *)
apply (conga_preserves_lta D E C C D B); try (apply conga_pseudo_refl); auto.
(* Goal: @CongA Tn D E C B E C *)
apply (out_conga D E C D E C); try (apply out_trivial); try (apply conga_refl); auto.
Qed.
Lemma bet_le__lt : forall A B C D, Bet A D B -> A <> D -> D <> B -> Le A C B C -> Lt D C B C.
Lemma t18_18_aux : forall A B C D E F,
Cong A B D E -> Cong A C D F -> LtA F D E C A B -> ~ Col A B C -> ~ Col D E F -> Le D F D E ->
Lt 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) (_ : @LtA Tn F D E C A B) (_ : not (@Col Tn A B C)) (_ : not (@Col Tn D E F)) (_ : @Le Tn D F D E), @Lt Tn E F B C *)
intros A B C D E F HCongAB HCongAC Hlta HNCol1 HNCol2 Hle.
(* Goal: @Lt Tn E F B C *)
assert (Hd := Hlta).
(* Goal: @Lt Tn E F B C *)
apply lta_distincts in Hd.
(* Goal: @Lt Tn E F B C *)
spliter.
(* Goal: @Lt Tn E F B C *)
assert(HG0 := angle_construction_1 C A B F D E).
(* Goal: @Lt Tn E F B C *)
destruct HG0 as [G0 []]; Col.
(* Goal: @Lt Tn E F B C *)
assert(~ Col F D G0) by (apply (one_side_not_col123 _ _ _ E); auto).
(* Goal: @Lt Tn E F B C *)
assert_diffs.
(* Goal: @Lt Tn E F B C *)
assert(HG := segment_construction_3 D G0 A B).
(* Goal: @Lt Tn E F B C *)
destruct HG as [G []]; auto.
(* Goal: @Lt Tn E F B C *)
assert(CongA C A B F D G) by (apply (out_conga C A B F D G0); try (apply out_trivial); auto).
(* Goal: @Lt Tn E F B C *)
assert(OS F D G E).
(* Goal: @Lt Tn E F B C *)
(* Goal: @OS Tn F D G E *)
{
(* Goal: @OS Tn F D G E *)
apply (one_side_transitivity _ _ _ G0); auto.
(* Goal: @OS Tn F D G G0 *)
apply invert_one_side.
(* Goal: @OS Tn D F G G0 *)
apply out_one_side; Col.
(* Goal: @Out Tn D G G0 *)
apply l6_6; auto.
(* BG Goal: @Lt Tn E F B C *)
}
(* Goal: @Lt Tn E F B C *)
assert(HNCol3 : ~ Col F D G) by (apply (one_side_not_col123 _ _ _ E); auto).
(* Goal: @Lt Tn E F B C *)
clear dependent G0.
(* Goal: @Lt Tn E F B C *)
assert_diffs.
(* Goal: @Lt Tn E F B C *)
assert(HSAS := l11_49 C A B F D G).
(* Goal: @Lt Tn E F B C *)
destruct HSAS as [HCongBC _]; Cong.
(* Goal: @Lt Tn E F B C *)
apply (cong2_lt__lt F E F G); Cong.
(* Goal: @Lt Tn F E F G *)
apply (conga_preserves_lta _ _ _ _ _ _ F D E F D G) in Hlta; try (apply conga_refl); auto.
(* Goal: @Lt Tn F E F G *)
assert(Cong D G D E) by (apply (cong_transitivity _ _ A B); auto).
(* Goal: @Lt Tn F E F G *)
clear dependent A.
(* Goal: @Lt Tn F E F G *)
clear dependent B.
(* Goal: @Lt Tn F E F G *)
assert(~ Col E F G).
(* Goal: @Lt Tn F E F G *)
(* Goal: not (@Col Tn E F G) *)
{
(* Goal: not (@Col Tn E F G) *)
intro.
(* Goal: False *)
destruct Hlta as [Hlea HNConga].
(* Goal: False *)
apply HNConga.
(* Goal: @CongA Tn F D E F D G *)
assert (HSSA := l11_52 E F D G F D).
(* Goal: @CongA Tn F D E F D G *)
destruct HSSA as [_[]]; Cong; Le.
(* Goal: @CongA Tn E F D G F D *)
apply (out_conga G F D G F D); try (apply out_trivial); try (apply conga_refl); auto.
(* Goal: @Out Tn F G E *)
apply (col_one_side_out _ D); Col.
(* BG Goal: @Lt Tn F E F G *)
}
(* Goal: @Lt Tn F E F G *)
assert(~ Col D E G).
(* Goal: @Lt Tn F E F G *)
(* Goal: not (@Col Tn D E G) *)
{
(* Goal: not (@Col Tn D E G) *)
intro.
(* Goal: False *)
destruct Hlta as [Hlea HNConga].
(* Goal: False *)
apply HNConga.
(* Goal: @CongA Tn F D E F D G *)
apply (out_conga F D G F D G); try (apply out_trivial); try (apply conga_refl); auto.
(* Goal: @Out Tn D G E *)
apply (col_one_side_out _ F); Col; Side.
(* BG Goal: @Lt Tn F E F G *)
}
(* Goal: @Lt Tn F E F G *)
apply l11_44_2; Col.
(* Goal: @LtA Tn F G E F E G *)
assert(HInAngle : InAngle E F D G) by (apply lea_in_angle; destruct Hlta; auto).
(* Goal: @LtA Tn F G E F E G *)
rename H into HFD.
(* Goal: @LtA Tn F G E F E G *)
destruct HInAngle as [_ [_ [_ [H [HH HUn]]]]].
(* Goal: @LtA Tn F G E F E G *)
destruct HUn.
(* Goal: @LtA Tn F G E F E G *)
(* Goal: @LtA Tn F G E F E G *)
exfalso; subst; Col.
(* Goal: @LtA Tn F G E F E G *)
assert(H <> F) by (intro; subst; assert_cols; Col).
(* Goal: @LtA Tn F G E F E G *)
assert(H <> G) by (intro; subst; assert_cols; Col).
(* Goal: @LtA Tn F G E F E G *)
assert(Hlt : Lt D H D E).
(* Goal: @LtA Tn F G E F E G *)
(* Goal: @Lt Tn D H D E *)
{
(* Goal: @Lt Tn D H D E *)
apply (cong2_lt__lt H D G D); Cong.
(* Goal: @Lt Tn H D G D *)
apply (bet_le__lt F); auto.
(* Goal: @Le Tn F D G D *)
apply (l5_6 D F D E); Cong.
(* BG Goal: @LtA Tn F G E F E G *)
}
(* Goal: @LtA Tn F G E F E G *)
destruct Hlt.
(* Goal: @LtA Tn F G E F E G *)
assert(H <> E) by (intro; subst; Cong).
(* Goal: @LtA Tn F G E F E G *)
assert(Bet D H E) by (apply l6_13_1; Le).
(* Goal: @LtA Tn F G E F E G *)
assert_diffs.
(* Goal: @LtA Tn F G E F E G *)
assert(~ TS E G F D).
(* Goal: @LtA Tn F G E F E G *)
(* Goal: not (@TS Tn E G F D) *)
{
(* Goal: not (@TS Tn E G F D) *)
apply l9_9_bis.
(* Goal: @OS Tn E G F D *)
apply (one_side_transitivity _ _ _ H); [apply invert_one_side; apply one_side_symmetry|]; apply out_one_side; Col; apply bet_out; Between.
(* BG Goal: @LtA Tn F G E F E G *)
}
(* Goal: @LtA Tn F G E F E G *)
apply (lta_trans _ _ _ D E G).
(* Goal: @LtA Tn D E G F E G *)
(* Goal: @LtA Tn F G E D E G *)
-
(* Goal: @LtA Tn F G E D E G *)
apply(conga_preserves_lta F G E D G E); try (apply conga_refl); auto.
(* Goal: @LtA Tn F G E D G E *)
(* Goal: @CongA Tn D G E D E G *)
apply l11_44_1; Col.
(* Goal: @LtA Tn F G E D G E *)
split.
(* Goal: not (@CongA Tn F G E D G E) *)
(* Goal: @LeA Tn F G E D G E *)
{
(* Goal: @LeA Tn F G E D G E *)
apply lea_comm.
(* Goal: @LeA Tn E G F E G D *)
exists F.
(* Goal: and (@InAngle Tn F E G D) (@CongA Tn E G F E G F) *)
split; try (apply conga_refl); auto.
(* Goal: @InAngle Tn F E G D *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn E X D) (or (@eq (@Tpoint Tn) X G) (@Out Tn G X F))) *)
exists H.
(* Goal: and (@Bet Tn E H D) (or (@eq (@Tpoint Tn) H G) (@Out Tn G H F)) *)
split; Between.
(* Goal: or (@eq (@Tpoint Tn) H G) (@Out Tn G H F) *)
right; apply bet_out; Between.
(* BG Goal: @LtA Tn D E G F E G *)
(* BG Goal: not (@CongA Tn F G E D G E) *)
}
(* Goal: not (@CongA Tn F G E D G E) *)
intro HConga.
(* Goal: False *)
apply conga_comm in HConga.
(* Goal: False *)
assert (HCop : Coplanar E G F D) by Cop.
(* Goal: False *)
assert(Habs := conga_cop__or_out_ts E G F D HCop HConga).
(* Goal: False *)
destruct Habs as [Hout|Hts]; assert_cols; Col.
(* BG Goal: @LtA Tn D E G F E G *)
-
(* Goal: @LtA Tn D E G F E G *)
apply lta_comm.
(* Goal: @LtA Tn G E D G E F *)
split.
(* Goal: not (@CongA Tn G E D G E F) *)
(* Goal: @LeA Tn G E D G E F *)
{
(* Goal: @LeA Tn G E D G E F *)
exists D.
(* Goal: and (@InAngle Tn D G E F) (@CongA Tn G E D G E D) *)
split; try (apply conga_refl); auto.
(* Goal: @InAngle Tn D G E F *)
repeat split; auto.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn G X F) (or (@eq (@Tpoint Tn) X E) (@Out Tn E X D))) *)
exists H.
(* Goal: and (@Bet Tn G H F) (or (@eq (@Tpoint Tn) H E) (@Out Tn E H D)) *)
split; Between.
(* Goal: or (@eq (@Tpoint Tn) H E) (@Out Tn E H D) *)
right; apply bet_out; Between.
(* BG Goal: not (@CongA Tn G E D G E F) *)
}
(* Goal: not (@CongA Tn G E D G E F) *)
intro HConga.
(* Goal: False *)
assert (HCop : Coplanar G E D F) by Cop.
(* Goal: False *)
assert(Habs := conga_cop__or_out_ts G E D F HCop HConga).
(* Goal: False *)
destruct Habs as [Hout|Hts]; assert_cols; Col; Side.
Qed.
Lemma t18_18 : forall A B C D E F, Cong A B D E -> Cong A C D F -> LtA F D E C A B -> Lt E F B C.
Lemma t18_19 : forall A B C D E F, A <> B -> A <> C -> Cong A B D E -> Cong A C D F -> Lt E F B C ->
LtA F D E C A B.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A C)) (_ : @Cong Tn A B D E) (_ : @Cong Tn A C D F) (_ : @Lt Tn E F B C), @LtA Tn F D E C A B *)
intros A B C D E F HAB HAC HCongAB HCongAC Hlt.
(* Goal: @LtA Tn F D E C A B *)
assert_diffs.
(* Goal: @LtA Tn F D E C A B *)
apply nlea__lta; auto.
(* Goal: not (@LeA Tn C A B F D E) *)
intro Hlea.
(* Goal: False *)
elim(conga_dec C A B F D E).
(* Goal: forall _ : not (@CongA Tn C A B F D E), False *)
(* Goal: forall _ : @CongA Tn C A B F D E, False *)
-
(* Goal: forall _ : @CongA Tn C A B F D E, False *)
intro.
(* Goal: False *)
exfalso.
(* Goal: False *)
destruct Hlt as [Hle HNCong].
(* Goal: False *)
apply HNCong.
(* Goal: @Cong Tn E F B C *)
assert(HSAS := l11_49 C A B F D E).
(* Goal: @Cong Tn E F B C *)
destruct HSAS; Cong.
(* BG Goal: forall _ : not (@CongA Tn C A B F D E), False *)
-
(* Goal: forall _ : not (@CongA Tn C A B F D E), False *)
intro.
(* Goal: False *)
apply (not_and_lt E F B C).
(* Goal: and (@Lt Tn E F B C) (@Lt Tn B C E F) *)
split; auto.
(* Goal: @Lt Tn B C E F *)
apply (t18_18 D _ _ A); Cong.
(* Goal: @LtA Tn C A B F D E *)
split; auto.
Qed.
Lemma acute_trivial : forall A B, A <> B -> Acute A B A.
Proof.
(* Goal: forall (A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)), @Acute Tn A B A *)
intros.
(* Goal: @Acute Tn A B A *)
assert(HH:= not_col_exists A B H).
(* Goal: @Acute Tn A B A *)
ex_and HH P.
(* Goal: @Acute Tn A B A *)
assert(exists C : Tpoint, Per C B A /\ Cong C B A B /\ OS A B C P).
(* Goal: @Acute Tn A B A *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn C B A) (and (@Cong Tn C B A B) (@OS Tn A B C P))) *)
apply(ex_per_cong A B B P A B H H); Col; exists A.
(* Goal: @Acute Tn A B A *)
ex_and H1 C.
(* Goal: @Acute Tn A B A *)
assert_diffs.
(* Goal: @Acute Tn A B A *)
unfold Acute.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A' B' C') (@LtA Tn A B A A' B' C')))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B' : @Tpoint Tn => @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A B' C') (@LtA Tn A B A A B' C'))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => and (@Per Tn A B C') (@LtA Tn A B A A B C')) *)
exists C.
(* Goal: and (@Per Tn A B C) (@LtA Tn A B A A B C) *)
split.
(* Goal: @LtA Tn A B A A B C *)
(* Goal: @Per Tn A B C *)
apply l8_2.
(* Goal: @LtA Tn A B A A B C *)
(* Goal: @Per Tn C B A *)
auto.
(* Goal: @LtA Tn A B A A B C *)
unfold LtA.
(* Goal: and (@LeA Tn A B A A B C) (not (@CongA Tn A B A A B C)) *)
split.
(* Goal: not (@CongA Tn A B A A B C) *)
(* Goal: @LeA Tn A B A A B C *)
unfold LeA.
(* Goal: not (@CongA Tn A B A A B C) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn A B A A B P)) *)
exists A.
(* Goal: not (@CongA Tn A B A A B C) *)
(* Goal: and (@InAngle Tn A A B C) (@CongA Tn A B A A B A) *)
split.
(* Goal: not (@CongA Tn A B A A B C) *)
(* Goal: @CongA Tn A B A A B A *)
(* Goal: @InAngle Tn A A B C *)
apply inangle1123; auto.
(* Goal: not (@CongA Tn A B A A B C) *)
(* Goal: @CongA Tn A B A A B A *)
apply conga_refl; auto.
(* Goal: not (@CongA Tn A B A A B C) *)
intro.
(* Goal: False *)
assert(Out B A C).
(* Goal: False *)
(* Goal: @Out Tn B A C *)
apply(l11_21_a A B A A B C).
(* Goal: False *)
(* Goal: @CongA Tn A B A A B C *)
(* Goal: @Out Tn B A A *)
apply out_trivial; auto.
(* Goal: False *)
(* Goal: @CongA Tn A B A A B C *)
auto.
(* Goal: False *)
assert(Perp C B B A).
(* Goal: False *)
(* Goal: @Perp Tn C B B A *)
apply per_perp_in in H1; auto.
(* Goal: False *)
(* Goal: @Perp Tn C B B A *)
apply perp_in_perp_bis in H1.
(* Goal: False *)
(* Goal: @Perp Tn C B B A *)
induction H1.
(* Goal: False *)
(* Goal: @Perp Tn C B B A *)
(* Goal: @Perp Tn C B B A *)
apply perp_not_eq_1 in H1.
(* Goal: False *)
(* Goal: @Perp Tn C B B A *)
(* Goal: @Perp Tn C B B A *)
tauto.
(* Goal: False *)
(* Goal: @Perp Tn C B B A *)
auto.
(* Goal: False *)
apply perp_comm in H10.
(* Goal: False *)
apply perp_not_col in H10.
(* Goal: False *)
apply out_col in H8.
(* Goal: False *)
Col.
Qed.
Lemma acute_not_per : forall A B C, Acute A B C -> ~ Per A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Acute Tn A B C), not (@Per Tn A B C) *)
intros.
(* Goal: not (@Per Tn A B C) *)
unfold Acute in H.
(* Goal: not (@Per Tn A B C) *)
ex_and H A'.
(* Goal: not (@Per Tn A B C) *)
ex_and H0 B'.
(* Goal: not (@Per Tn A B C) *)
ex_and H C'.
(* Goal: not (@Per Tn A B C) *)
unfold LtA in H0.
(* Goal: not (@Per Tn A B C) *)
spliter.
(* Goal: not (@Per Tn A B C) *)
intro.
(* Goal: False *)
apply H1.
(* Goal: @CongA Tn A B C A' B' C' *)
assert(A <> B /\ C <> B /\ A' <> B' /\ C' <> B').
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A' B')) (not (@eq (@Tpoint Tn) C' B')))) *)
unfold LeA in H0.
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A' B')) (not (@eq (@Tpoint Tn) C' B')))) *)
ex_and H0 X.
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A' B')) (not (@eq (@Tpoint Tn) C' B')))) *)
apply conga_distinct in H3.
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A' B')) (not (@eq (@Tpoint Tn) C' B')))) *)
spliter.
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (and (not (@eq (@Tpoint Tn) A' B')) (not (@eq (@Tpoint Tn) C' B')))) *)
repeat split; auto.
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
unfold InAngle in H0.
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: not (@eq (@Tpoint Tn) C' B') *)
spliter; auto.
(* Goal: @CongA Tn A B C A' B' C' *)
spliter.
(* Goal: @CongA Tn A B C A' B' C' *)
apply(l11_16 A B C A' B' C'); auto.
Qed.
Lemma angle_bisector : forall A B C, A <> B -> C <> B ->
exists P, InAngle P A B C /\ CongA P B A P B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
intros A B C HAB HCB.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
elim (col_dec A B C).
(* Goal: forall _ : not (@Col Tn A B C), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
(* Goal: forall _ : @Col Tn A B C, @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
{
(* Goal: forall _ : @Col Tn A B C, @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
intro HCol.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
elim (bet_dec A B C).
(* Goal: forall _ : not (@Bet Tn A B C), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
(* Goal: forall _ : @Bet Tn A B C, @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
-
(* Goal: forall _ : @Bet Tn A B C, @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
intro HBet; destruct (not_col_exists A B) as [Q HNCol]; trivial.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
destruct (l10_15 A B B Q) as [P [HPerp HOS]]; Col.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
assert_diffs; exists P; split.
(* Goal: @CongA Tn P B A P B C *)
(* Goal: @InAngle Tn P A B C *)
apply in_angle_line; auto.
(* Goal: @CongA Tn P B A P B C *)
apply l11_18_1; Perp.
(* BG Goal: forall _ : not (@Col Tn A B C), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
(* BG Goal: forall _ : not (@Bet Tn A B C), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
-
(* Goal: forall _ : not (@Bet Tn A B C), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
intro HOut; apply not_bet_out in HOut; trivial; assert_diffs.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
exists C; split.
(* Goal: @CongA Tn C B A C B C *)
(* Goal: @InAngle Tn C A B C *)
repeat split; auto.
(* Goal: @CongA Tn C B A C B C *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X C))) *)
exists C; split; Between.
(* Goal: @CongA Tn C B A C B C *)
(* Goal: or (@eq (@Tpoint Tn) C B) (@Out Tn B C C) *)
right; apply out_trivial; auto.
(* Goal: @CongA Tn C B A C B C *)
apply l11_21_b.
(* Goal: @Out Tn B C C *)
(* Goal: @Out Tn B C A *)
apply l6_6; trivial.
(* Goal: @Out Tn B C C *)
apply out_trivial; auto.
(* BG Goal: forall _ : not (@Col Tn A B C), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
}
(* Goal: forall _ : not (@Col Tn A B C), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
intro HNCol.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
assert_diffs.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
destruct (l6_11_existence B B A C) as [C0 [HOut HCong]]; auto.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
destruct (midpoint_existence A C0) as [P HP].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A B C) (@CongA Tn P B A P B C)) *)
exists P.
(* Goal: and (@InAngle Tn P A B C) (@CongA Tn P B A P B C) *)
assert_diffs.
(* Goal: and (@InAngle Tn P A B C) (@CongA Tn P B A P B C) *)
assert (HNCol1 : ~ Col A B C0) by (intro; apply HNCol; ColR).
(* Goal: and (@InAngle Tn P A B C) (@CongA Tn P B A P B C) *)
assert_diffs.
(* Goal: and (@InAngle Tn P A B C) (@CongA Tn P B A P B C) *)
assert (P <> B) by (intro; subst P; apply HNCol1; Col).
(* Goal: and (@InAngle Tn P A B C) (@CongA Tn P B A P B C) *)
split.
(* Goal: @CongA Tn P B A P B C *)
(* Goal: @InAngle Tn P A B C *)
apply (l11_25 P A B C0); try (apply out_trivial); auto; [|apply l6_6; trivial].
(* Goal: @CongA Tn P B A P B C *)
(* Goal: @InAngle Tn P A B C0 *)
repeat split; auto.
(* Goal: @CongA Tn P B A P B C *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A X C0) (or (@eq (@Tpoint Tn) X B) (@Out Tn B X P))) *)
exists P; split; Between.
(* Goal: @CongA Tn P B A P B C *)
(* Goal: or (@eq (@Tpoint Tn) P B) (@Out Tn B P P) *)
right; apply out_trivial; auto.
(* Goal: @CongA Tn P B A P B C *)
destruct (l11_51 B P A B P C0); auto with cong.
(* Goal: @CongA Tn P B A P B C *)
apply (out_conga P B A P B C0); try (apply out_trivial); auto.
Qed.
Lemma reflectl__conga : forall A B P P', A <> B -> B <> P -> ReflectL P P' A B -> CongA A B P A B P'.
Proof.
(* Goal: forall (A B P P' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B P)) (_ : @ReflectL Tn P P' A B), @CongA Tn A B P A B P' *)
intros A B P P' HAB HBP HRefl.
(* Goal: @CongA Tn A B P A B P' *)
destruct HRefl as [[A' [HMid HCol]] [HPerp|Heq]]; [|subst; apply conga_refl; auto].
(* Goal: @CongA Tn A B P A B P' *)
assert_diffs.
(* Goal: @CongA Tn A B P A B P' *)
destruct (eq_dec_points A' B).
(* Goal: @CongA Tn A B P A B P' *)
(* Goal: @CongA Tn A B P A B P' *)
subst A'.
(* Goal: @CongA Tn A B P A B P' *)
(* Goal: @CongA Tn A B P A B P' *)
assert_diffs.
(* Goal: @CongA Tn A B P A B P' *)
(* Goal: @CongA Tn A B P A B P' *)
apply l11_16; auto; apply perp_per_1; [apply perp_col1 with P'|apply perp_col1 with P]; Col; Perp.
(* Goal: @CongA Tn A B P A B P' *)
destruct HMid as [HBet HCong].
(* Goal: @CongA Tn A B P A B P' *)
destruct (l11_49 B A' P B A' P') as [HCong1 [HConga1 HConga2]]; Cong.
(* Goal: @CongA Tn A B P A B P' *)
(* Goal: @CongA Tn B A' P B A' P' *)
apply l11_16; auto; apply perp_per_1, perp_left_comm, perp_col with A; Col; [apply perp_col1 with P'|apply perp_col1 with P]; Col; Perp.
(* Goal: @CongA Tn A B P A B P' *)
destruct (bet_dec A' B A) as [HBBet|HBOut].
(* Goal: @CongA Tn A B P A B P' *)
(* Goal: @CongA Tn A B P A B P' *)
apply l11_13 with A' A'; assumption.
(* Goal: @CongA Tn A B P A B P' *)
apply not_bet_out in HBOut; Col.
(* Goal: @CongA Tn A B P A B P' *)
apply out_conga with A' P A' P'; trivial; apply out_trivial; assert_diffs; auto.
Qed.
Lemma conga_cop_out_reflectl__out : forall A B C P T T',
~ Out B A C -> Coplanar A B C P -> CongA P B A P B C -> Out B A T -> ReflectL T T' B P ->
Out B C T'.
Proof.
(* Goal: forall (A B C P T T' : @Tpoint Tn) (_ : not (@Out Tn B A C)) (_ : @Coplanar Tn A B C P) (_ : @CongA Tn P B A P B C) (_ : @Out Tn B A T) (_ : @ReflectL Tn T T' B P), @Out Tn B C T' *)
intros A B C P T T' HNOut HCop HConga HOut HRefl.
(* Goal: @Out Tn B C T' *)
apply conga_distinct in HConga; spliter; clean.
(* Goal: @Out Tn B C T' *)
assert_diffs.
(* Goal: @Out Tn B C T' *)
assert (HConga1 : CongA P B T P B T') by (apply reflectl__conga; auto; apply is_image_spec_rev, HRefl).
(* Goal: @Out Tn B C T' *)
apply is_image_is_image_spec in HRefl; auto.
(* Goal: @Out Tn B C T' *)
apply conga_distinct in HConga1; spliter; clean.
(* Goal: @Out Tn B C T' *)
destruct (conga_cop__or_out_ts P B C T'); trivial.
(* Goal: @Out Tn B C T' *)
(* Goal: @CongA Tn P B C P B T' *)
(* Goal: @Coplanar Tn P B C T' *)
-
(* Goal: @Coplanar Tn P B C T' *)
apply coplanar_trans_1 with T; [..|Cop].
(* Goal: @Coplanar Tn T P B C *)
(* Goal: not (@Col Tn T P B) *)
{
(* Goal: not (@Col Tn T P B) *)
intro.
(* Goal: False *)
apply HNOut.
(* Goal: @Out Tn B A C *)
assert (HCol : Col A B P) by ColR.
(* Goal: @Out Tn B A C *)
destruct (bet_dec A B P) as [HBet|HOut1].
(* Goal: @Out Tn B A C *)
(* Goal: @Out Tn B A C *)
apply l6_2 with P; auto.
(* Goal: @Out Tn B A C *)
(* Goal: @Bet Tn C B P *)
apply (bet_conga__bet A B P); [|apply conga_comm]; assumption.
(* Goal: @Out Tn B A C *)
apply not_bet_out in HOut1; trivial.
(* Goal: @Out Tn B A C *)
apply l6_7 with P; trivial.
(* Goal: @Out Tn B P C *)
apply (l11_21_a P B A); [apply l6_6|]; assumption.
(* BG Goal: @Out Tn B C T' *)
(* BG Goal: @CongA Tn P B C P B T' *)
(* BG Goal: @Coplanar Tn T P B C *)
}
(* Goal: @Coplanar Tn T P B C *)
apply coplanar_perm_19, col_cop__cop with A; Col; Cop.
(* BG Goal: @Out Tn B C T' *)
(* BG Goal: @CongA Tn P B C P B T' *)
-
(* Goal: @CongA Tn P B C P B T' *)
apply conga_trans with P B A.
(* Goal: @CongA Tn P B A P B T' *)
(* Goal: @CongA Tn P B C P B A *)
apply conga_sym; assumption.
(* Goal: @CongA Tn P B A P B T' *)
apply l6_6 in HOut; apply out_conga with P T P T'; try (apply out_trivial); auto.
(* BG Goal: @Out Tn B C T' *)
-
(* Goal: @Out Tn B C T' *)
exfalso.
(* Goal: False *)
apply (l9_9_bis P B C T'); trivial.
(* Goal: @OS Tn P B C T' *)
exists A; split; apply l9_2.
(* Goal: @TS Tn P B A T' *)
(* Goal: @TS Tn P B A C *)
destruct (conga_cop__or_out_ts P B A C); Cop; contradiction.
(* Goal: @TS Tn P B A T' *)
apply out_two_sides_two_sides with T B; Col.
(* Goal: @TS Tn P B T T' *)
apply invert_two_sides, l10_14; auto.
(* Goal: not (@eq (@Tpoint Tn) T T') *)
intro; subst T'.
(* Goal: False *)
apply HNOut.
(* Goal: @Out Tn B A C *)
assert (Col T B P) by (apply l10_8, HRefl).
(* Goal: @Out Tn B A C *)
assert (Col P B A) by ColR.
(* Goal: @Out Tn B A C *)
assert (Col P B C) by (apply (col_conga_col P B A); assumption).
(* Goal: @Out Tn B A C *)
apply not_bet_out; try ColR.
(* Goal: not (@Bet Tn A B C) *)
intro HBet.
(* Goal: False *)
apply (per_not_col P B A); auto.
(* Goal: @Per Tn P B A *)
apply l11_18_2 with C; assumption.
Qed.
Lemma col_conga_cop_reflectl__col : forall A B C P T T',
~ Out B A C -> Coplanar A B C P -> CongA P B A P B C -> Col B A T -> ReflectL T T' B P ->
Col B C T'.
Proof.
(* Goal: forall (A B C P T T' : @Tpoint Tn) (_ : not (@Out Tn B A C)) (_ : @Coplanar Tn A B C P) (_ : @CongA Tn P B A P B C) (_ : @Col Tn B A T) (_ : @ReflectL Tn T T' B P), @Col Tn B C T' *)
intros A B C P T T' HNOut HCop HConga HCol HRefl.
(* Goal: @Col Tn B C T' *)
destruct (eq_dec_points B T).
(* Goal: @Col Tn B C T' *)
(* Goal: @Col Tn B C T' *)
subst; assert (T = T'); subst; Col.
(* Goal: @Col Tn B C T' *)
(* Goal: @eq (@Tpoint Tn) T T' *)
apply (l10_6_uniqueness_spec T P T); trivial; apply col__refl; Col.
(* Goal: @Col Tn B C T' *)
destruct (out_dec B A T).
(* Goal: @Col Tn B C T' *)
(* Goal: @Col Tn B C T' *)
apply out_col, conga_cop_out_reflectl__out with A P T; assumption.
(* Goal: @Col Tn B C T' *)
destruct (segment_construction A B A B) as [A' [HA'1 HA'2]].
(* Goal: @Col Tn B C T' *)
destruct (segment_construction C B C B) as [C' [HC'1 HC'2]].
(* Goal: @Col Tn B C T' *)
assert (Out B C' T'); try ColR.
(* Goal: @Out Tn B C' T' *)
apply conga_distinct in HConga; spliter; assert_diffs.
(* Goal: @Out Tn B C' T' *)
apply conga_cop_out_reflectl__out with A' P T; trivial.
(* Goal: @Out Tn B A' T *)
(* Goal: @CongA Tn P B A' P B C' *)
(* Goal: @Coplanar Tn A' B C' P *)
(* Goal: not (@Out Tn B A' C') *)
-
(* Goal: not (@Out Tn B A' C') *)
intro; apply HNOut.
(* Goal: @Out Tn B A C *)
apply l6_2 with A'; auto.
(* Goal: @Bet Tn C B A' *)
apply between_symmetry, l6_2 with C'; try (apply l6_6); Between.
(* BG Goal: @Out Tn B A' T *)
(* BG Goal: @CongA Tn P B A' P B C' *)
(* BG Goal: @Coplanar Tn A' B C' P *)
-
(* Goal: @Coplanar Tn A' B C' P *)
destruct (col_dec A B C).
(* Goal: @Coplanar Tn A' B C' P *)
(* Goal: @Coplanar Tn A' B C' P *)
exists C'; left; split; ColR.
(* Goal: @Coplanar Tn A' B C' P *)
apply coplanar_pseudo_trans with A B C; Cop.
(* BG Goal: @Out Tn B A' T *)
(* BG Goal: @CongA Tn P B A' P B C' *)
-
(* Goal: @CongA Tn P B A' P B C' *)
apply conga_comm, l11_13 with A C; auto; apply conga_comm; assumption.
(* BG Goal: @Out Tn B A' T *)
-
(* Goal: @Out Tn B A' T *)
apply l6_2 with A; try (apply between_symmetry); auto.
(* Goal: @Bet Tn A B T *)
apply not_out_bet; Col.
Qed.
Lemma conga2_cop2__col : forall A B C P P', ~ Out B A C ->
CongA P B A P B C -> CongA P' B A P' B C ->
Coplanar A B P P' -> Coplanar B C P P' ->
Col B P P'.
Proof.
(* Goal: forall (A B C P P' : @Tpoint Tn) (_ : not (@Out Tn B A C)) (_ : @CongA Tn P B A P B C) (_ : @CongA Tn P' B A P' B C) (_ : @Coplanar Tn A B P P') (_ : @Coplanar Tn B C P P'), @Col Tn B P P' *)
intros A B C P P' HNOut HP HP' HCopA HCopC.
(* Goal: @Col Tn B P P' *)
apply conga_distinct in HP; apply conga_distinct in HP'; spliter; clean.
(* Goal: @Col Tn B P P' *)
destruct (l6_11_existence B B A C) as [C' [HC'1 HC'2]]; auto.
(* Goal: @Col Tn B P P' *)
destruct (l11_49 P B A P B C'); Cong.
(* Goal: @Col Tn B P P' *)
(* Goal: @CongA Tn P B A P B C' *)
apply out_conga with P A P C; try (apply out_trivial); try (apply l6_6); auto.
(* Goal: @Col Tn B P P' *)
destruct (l11_49 P' B A P' B C'); Cong.
(* Goal: @Col Tn B P P' *)
(* Goal: @CongA Tn P' B A P' B C' *)
apply out_conga with P' A P' C; try (apply out_trivial); try (apply l6_6); auto.
(* Goal: @Col Tn B P P' *)
apply cong3_cop2__col with A C'; Cong.
(* Goal: not (@eq (@Tpoint Tn) A C') *)
(* Goal: @Coplanar Tn B P P' C' *)
(* Goal: @Coplanar Tn B P P' A *)
Cop.
(* Goal: not (@eq (@Tpoint Tn) A C') *)
(* Goal: @Coplanar Tn B P P' C' *)
apply coplanar_perm_12, col_cop__cop with C; Col; Cop.
(* Goal: not (@eq (@Tpoint Tn) A C') *)
intro; subst; auto.
Qed.
Lemma conga2_cop2__col_1 : forall A B C P P', ~ Col A B C ->
CongA P B A P B C -> CongA P' B A P' B C ->
Coplanar A B C P -> Coplanar A B C P' ->
Col B P P'.
Proof.
(* Goal: forall (A B C P P' : @Tpoint Tn) (_ : not (@Col Tn A B C)) (_ : @CongA Tn P B A P B C) (_ : @CongA Tn P' B A P' B C) (_ : @Coplanar Tn A B C P) (_ : @Coplanar Tn A B C P'), @Col Tn B P P' *)
intros A B C P P' HNCol HP HP' HCop HCop'.
(* Goal: @Col Tn B P P' *)
apply conga2_cop2__col with A C; trivial; [|apply coplanar_pseudo_trans with A B C; Cop..].
(* Goal: not (@Out Tn B A C) *)
intro; apply HNCol; Col.
Qed.
Lemma col_conga__conga : forall A B C P P', CongA P B A P B C -> Col B P P' -> B <> P' ->
CongA P' B A P' B C.
Proof.
(* Goal: forall (A B C P P' : @Tpoint Tn) (_ : @CongA Tn P B A P B C) (_ : @Col Tn B P P') (_ : not (@eq (@Tpoint Tn) B P')), @CongA Tn P' B A P' B C *)
intros A B C P P' HConga HCol HBP'.
(* Goal: @CongA Tn P' B A P' B C *)
destruct (bet_dec P B P') as [HBet|HNBet].
(* Goal: @CongA Tn P' B A P' B C *)
(* Goal: @CongA Tn P' B A P' B C *)
apply l11_13 with P P; auto.
(* Goal: @CongA Tn P' B A P' B C *)
apply not_bet_out in HNBet; Col.
(* Goal: @CongA Tn P' B A P' B C *)
apply conga_distinct in HConga; spliter.
(* Goal: @CongA Tn P' B A P' B C *)
apply out_conga with P A P C; try (apply out_trivial); auto.
Qed.
Lemma cop_inangle__ex_col_inangle : forall A B C P Q,
~ Out B A C -> InAngle P A B C -> Coplanar A B C Q ->
exists R, InAngle R A B C /\ P <> R /\ Col P Q R.
Proof.
(* Goal: forall (A B C P Q : @Tpoint Tn) (_ : not (@Out Tn B A C)) (_ : @InAngle Tn P A B C) (_ : @Coplanar Tn A B C Q), @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
intros A B C P Q HNOut HIn HCop.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (h := inangle_distincts A B C P HIn); spliter.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (A <> C) by (intro; subst; apply HNOut, out_trivial; auto).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (eq_dec_points P Q).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
{
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
subst Q.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P P R))) *)
destruct (eq_dec_points A P).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P P R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P P R))) *)
subst P; exists C; split; Col.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P P R))) *)
(* Goal: @InAngle Tn C A B C *)
apply inangle3123; auto.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P P R))) *)
exists A; split; Col; apply inangle1123; auto.
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
}
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (col_dec B P Q) as [HCol|HNCol1].
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
{
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (segment_construction B P B P) as [R [HR1 HR2]].
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
exists R.
(* Goal: and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R)) *)
assert_diffs; split; [|split; ColR].
(* Goal: @InAngle Tn R A B C *)
apply l11_25 with P A C; try (apply out_trivial); auto.
(* Goal: @Out Tn B R P *)
apply l6_6, bet_out; auto.
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
}
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert_diffs.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (col_dec A B C) as [HCol|HNCol2].
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
exists Q; split; Col.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @InAngle Tn Q A B C *)
apply in_angle_line; auto.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @Bet Tn A B C *)
apply not_out_bet; assumption.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (col_dec B C P) as [HCol|HNCol3].
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
-
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (HNCol3 : ~ Col B A P) by (intro; apply HNCol2; ColR).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (cop_not_par_same_side B P Q P P A) as [Q0 [HCol1 HOS]]; Col.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @Coplanar Tn B P Q A *)
apply coplanar_perm_16, col_cop__cop with C; Cop.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (Hd := os_distincts B P A Q0 HOS); spliter; clean.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (one_side_dec B A P Q0).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
{
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (HIn' : InAngle Q0 A B P) by (apply os2__inangle; assumption).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
exists Q0; split; Col.
(* Goal: @InAngle Tn Q0 A B C *)
apply in_angle_trans with P; trivial.
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
}
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (HR : exists R, Bet P R Q0 /\ Col P Q R /\ Col B A R).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B A R))) *)
{
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B A R))) *)
destruct (col_dec B A Q0).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B A R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B A R))) *)
exists Q0; split; Between; Col.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B A R))) *)
assert_diffs.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B A R))) *)
destruct (cop__not_one_side_two_sides B A P Q0) as [_ [_ [R [HCol' HBet]]]]; Col; Cop.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B A R))) *)
exists R; split; trivial; split; ColR.
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
}
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct HR as [R [HR1 [HR2 HR3]]].
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (P <> R) by (intro; subst; apply HNCol3, HR3).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
exists R; split; auto.
(* Goal: @InAngle Tn R A B C *)
apply out321__inangle; auto.
(* Goal: @Out Tn B A R *)
apply col_one_side_out with P; trivial.
(* Goal: @OS Tn B P A R *)
apply one_side_transitivity with Q0; trivial.
(* Goal: @OS Tn B P Q0 R *)
apply one_side_not_col124 in HOS.
(* Goal: @OS Tn B P Q0 R *)
apply invert_one_side, out_one_side; Col.
(* Goal: @Out Tn P Q0 R *)
apply l6_6, bet_out; auto.
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
-
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (cop_not_par_same_side B P Q P P C) as [Q0 [HCol1 HOS]]; Col.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @Coplanar Tn B P Q C *)
apply coplanar_perm_3, coplanar_trans_1 with A; Cop.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (Hd := os_distincts B P C Q0 HOS); spliter; clean.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct (one_side_dec B C P Q0).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
{
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (HIn' : InAngle Q0 C B P) by (apply os2__inangle; assumption).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
exists Q0; split; Col.
(* Goal: @InAngle Tn Q0 A B C *)
apply l11_24, in_angle_trans with P; trivial.
(* Goal: @InAngle Tn P C B A *)
apply l11_24, HIn.
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
}
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (HR : exists R, Bet P R Q0 /\ Col P Q R /\ Col B C R).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B C R))) *)
{
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B C R))) *)
destruct (col_dec B C Q0).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B C R))) *)
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B C R))) *)
exists Q0; split; Between; Col.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B C R))) *)
assert_diffs.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B C R))) *)
destruct (cop__not_one_side_two_sides B C P Q0) as [_ [_ [R [HCol' HBet]]]]; Col; Cop.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@Bet Tn P R Q0) (and (@Col Tn P Q R) (@Col Tn B C R))) *)
exists R; split; trivial; split; ColR.
(* BG Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
}
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
destruct HR as [R [HR1 [HR2 HR3]]].
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
assert (P <> R) by (intro; subst; apply HNCol3, HR3).
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
exists R; split; auto.
(* Goal: @InAngle Tn R A B C *)
apply l11_24, out321__inangle; auto.
(* Goal: @Out Tn B C R *)
apply col_one_side_out with P; trivial.
(* Goal: @OS Tn B P C R *)
apply one_side_transitivity with Q0; trivial.
(* Goal: @OS Tn B P Q0 R *)
apply one_side_not_col124 in HOS.
(* Goal: @OS Tn B P Q0 R *)
apply invert_one_side, out_one_side; Col.
(* Goal: @Out Tn P Q0 R *)
apply l6_6, bet_out; auto.
Qed.
Lemma col_inangle2__out : forall A B C P Q,
~ Bet A B C -> InAngle P A B C -> InAngle Q A B C -> Col B P Q ->
Out B P Q.
Proof.
(* Goal: forall (A B C P Q : @Tpoint Tn) (_ : not (@Bet Tn A B C)) (_ : @InAngle Tn P A B C) (_ : @InAngle Tn Q A B C) (_ : @Col Tn B P Q), @Out Tn B P Q *)
intros A B C P Q HNBet HP HQ HCol.
(* Goal: @Out Tn B P Q *)
assert (Hd := inangle_distincts A B C P HP); assert (Hd' := inangle_distincts A B C Q HQ); spliter; clean.
(* Goal: @Out Tn B P Q *)
destruct (col_dec A B C).
(* Goal: @Out Tn B P Q *)
(* Goal: @Out Tn B P Q *)
assert (Out B A C) by (apply not_bet_out; assumption).
(* Goal: @Out Tn B P Q *)
(* Goal: @Out Tn B P Q *)
apply l6_7 with A; [apply l6_6|]; apply out_in_angle_out with C; auto.
(* Goal: @Out Tn B P Q *)
destruct (col_dec B A P) as [HCol1|HNCol1].
(* Goal: @Out Tn B P Q *)
(* Goal: @Out Tn B P Q *)
apply l6_7 with A; [apply l6_6|]; apply col_in_angle_out with C; ColR.
(* Goal: @Out Tn B P Q *)
apply col_one_side_out with A; trivial.
(* Goal: @OS Tn B A P Q *)
apply one_side_transitivity with C; [|apply one_side_symmetry]; apply invert_one_side, in_angle_one_side; Col.
(* Goal: not (@Col Tn B A Q) *)
intro; apply HNCol1; ColR.
Qed.
Lemma inangle2__lea : forall A B C P Q, InAngle P A B C -> InAngle Q A B C ->
LeA P B Q A B C.
Proof.
(* Goal: forall (A B C P Q : @Tpoint Tn) (_ : @InAngle Tn P A B C) (_ : @InAngle Tn Q A B C), @LeA Tn P B Q A B C *)
intros A B C P Q HP HQ.
(* Goal: @LeA Tn P B Q A B C *)
assert (HP' := l11_24 P A B C HP).
(* Goal: @LeA Tn P B Q A B C *)
assert (HQ' := l11_24 Q A B C HQ).
(* Goal: @LeA Tn P B Q A B C *)
assert (Hd := inangle_distincts A B C P HP); assert (Hd' := inangle_distincts A B C Q HQ); spliter; clean.
(* Goal: @LeA Tn P B Q A B C *)
destruct (col_dec A B C) as [HCol|HNCol].
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
{
(* Goal: @LeA Tn P B Q A B C *)
destruct (bet_dec A B C).
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
apply l11_31_2; auto.
(* Goal: @LeA Tn P B Q A B C *)
apply l11_31_1; auto.
(* Goal: @Out Tn B P Q *)
assert (Out B A C) by (apply not_bet_out; assumption).
(* Goal: @Out Tn B P Q *)
apply l6_7 with A; [apply l6_6|]; apply out_in_angle_out with C; auto.
(* BG Goal: @LeA Tn P B Q A B C *)
}
(* Goal: @LeA Tn P B Q A B C *)
destruct (col_dec B P Q) as [HCol1|HNCol1].
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
apply l11_31_1; auto; apply col_inangle2__out with A C; auto.
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: not (@Bet Tn A B C) *)
intro; apply HNCol; Col.
(* Goal: @LeA Tn P B Q A B C *)
destruct (col_dec B A P) as [HCol2|HNCol2].
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
{
(* Goal: @LeA Tn P B Q A B C *)
assert (Out B A P) by (apply col_in_angle_out with C; auto; intro; apply HNCol; Col).
(* Goal: @LeA Tn P B Q A B C *)
exists Q; split; trivial.
(* Goal: @CongA Tn P B Q A B Q *)
apply out_conga with A Q A Q; try (apply out_trivial); auto.
(* Goal: @CongA Tn A B Q A B Q *)
apply conga_refl; auto.
(* BG Goal: @LeA Tn P B Q A B C *)
}
(* Goal: @LeA Tn P B Q A B C *)
destruct (col_dec B C P) as [HCol3|HNCol3].
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
{
(* Goal: @LeA Tn P B Q A B C *)
assert (Out B C P).
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @Out Tn B C P *)
apply col_in_angle_out with A; auto; intro; apply HNCol; Col.
(* Goal: @LeA Tn P B Q A B C *)
apply lea_right_comm.
(* Goal: @LeA Tn P B Q C B A *)
exists Q; split; trivial.
(* Goal: @CongA Tn P B Q C B Q *)
apply out_conga with C Q C Q; try (apply out_trivial); auto.
(* Goal: @CongA Tn C B Q C B Q *)
apply conga_refl; auto.
(* BG Goal: @LeA Tn P B Q A B C *)
}
(* Goal: @LeA Tn P B Q A B C *)
destruct (col_dec B A Q) as [HCol4|HNCol4].
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
{
(* Goal: @LeA Tn P B Q A B C *)
assert (Out B A Q) by (apply col_in_angle_out with C; auto; intro; apply HNCol; Col).
(* Goal: @LeA Tn P B Q A B C *)
apply lea_left_comm.
(* Goal: @LeA Tn Q B P A B C *)
exists P; split; trivial.
(* Goal: @CongA Tn Q B P A B P *)
apply out_conga with A P A P; try (apply out_trivial); auto.
(* Goal: @CongA Tn A B P A B P *)
apply conga_refl; auto.
(* BG Goal: @LeA Tn P B Q A B C *)
}
(* Goal: @LeA Tn P B Q A B C *)
destruct (col_dec B C Q) as [HCol5|HNCol5].
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
{
(* Goal: @LeA Tn P B Q A B C *)
assert (Out B C Q).
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @Out Tn B C Q *)
apply col_in_angle_out with A; auto; intro; apply HNCol; Col.
(* Goal: @LeA Tn P B Q A B C *)
apply lea_comm.
(* Goal: @LeA Tn Q B P C B A *)
exists P; split; trivial.
(* Goal: @CongA Tn Q B P C B P *)
apply out_conga with C P C P; try (apply out_trivial); auto.
(* Goal: @CongA Tn C B P C B P *)
apply conga_refl; auto.
(* BG Goal: @LeA Tn P B Q A B C *)
}
(* Goal: @LeA Tn P B Q A B C *)
destruct (cop__one_or_two_sides B P A Q) as [HOS|HTS]; Col.
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @Coplanar Tn B P A Q *)
apply coplanar_perm_2, coplanar_trans_1 with C; Cop; Col.
(* Goal: @LeA Tn P B Q A B C *)
(* Goal: @LeA Tn P B Q A B C *)
-
(* Goal: @LeA Tn P B Q A B C *)
apply lea_trans with P B C; [|apply lea_comm]; apply inangle__lea; trivial.
(* Goal: @InAngle Tn Q P B C *)
apply os2__inangle; apply invert_one_side.
(* Goal: @OS Tn C B P Q *)
(* Goal: @OS Tn P B C Q *)
exists A; split; Side; apply in_angle_two_sides; Col.
(* Goal: @OS Tn C B P Q *)
apply one_side_transitivity with A; [|apply one_side_symmetry]; apply in_angle_one_side; Col.
(* BG Goal: @LeA Tn P B Q A B C *)
-
(* Goal: @LeA Tn P B Q A B C *)
apply lea_trans with A B P; [apply lea_right_comm|]; apply inangle__lea; trivial.
(* Goal: @InAngle Tn Q P B A *)
apply os2__inangle; trivial.
(* Goal: @OS Tn B A P Q *)
apply invert_one_side, one_side_transitivity with C; [|apply one_side_symmetry]; apply in_angle_one_side; Col.
Qed.
Lemma conga_inangle_per__acute : forall A B C P,
Per A B C -> InAngle P A B C -> CongA P B A P B C ->
Acute A B P.
Proof.
(* Goal: forall (A B C P : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @InAngle Tn P A B C) (_ : @CongA Tn P B A P B C), @Acute Tn A B P *)
intros A B C P HPer HP1 HP2.
(* Goal: @Acute Tn A B P *)
assert (Hd := inangle_distincts A B C P HP1); spliter; clean.
(* Goal: @Acute Tn A B P *)
assert (HNCol : ~ Col A B C) by (apply per_not_col; auto).
(* Goal: @Acute Tn A B P *)
exists A, B, C; split; trivial.
(* Goal: @LtA Tn A B P A B C *)
split.
(* Goal: not (@CongA Tn A B P A B C) *)
(* Goal: @LeA Tn A B P A B C *)
apply inangle__lea, HP1.
(* Goal: not (@CongA Tn A B P A B C) *)
intro Habs.
(* Goal: False *)
assert (Per A B P) by (apply l11_17 with A B C, conga_sym; trivial).
(* Goal: False *)
apply HNCol, col_permutation_1, cop_per2__col with P; Cop.
(* Goal: @Per Tn C B P *)
apply l11_17 with A B P; trivial.
(* Goal: @CongA Tn A B P C B P *)
apply conga_comm, HP2.
Qed.
Lemma conga_inangle2_per__acute : forall A B C P Q, Per A B C ->
InAngle P A B C -> CongA P B A P B C -> InAngle Q A B C ->
Acute P B Q.
Proof.
(* Goal: forall (A B C P Q : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @InAngle Tn P A B C) (_ : @CongA Tn P B A P B C) (_ : @InAngle Tn Q A B C), @Acute Tn P B Q *)
intros A B C P Q HPer HP1 HP2 HQ.
(* Goal: @Acute Tn P B Q *)
assert (HP' := l11_24 P A B C HP1).
(* Goal: @Acute Tn P B Q *)
assert (HQ' := l11_24 Q A B C HQ).
(* Goal: @Acute Tn P B Q *)
assert (Hd := inangle_distincts A B C P HP1); assert (Hd' := inangle_distincts A B C Q HQ); spliter; clean.
(* Goal: @Acute Tn P B Q *)
assert (HNCol : ~ Col A B C) by (apply per_not_col; auto).
(* Goal: @Acute Tn P B Q *)
assert (HAcute : Acute A B P) by (apply conga_inangle_per__acute with C; assumption).
(* Goal: @Acute Tn P B Q *)
assert (HNCol1 : ~ Col P B A).
(* Goal: @Acute Tn P B Q *)
(* Goal: not (@Col Tn P B A) *)
intro.
(* Goal: @Acute Tn P B Q *)
(* Goal: False *)
assert (Col P B C) by (apply (col_conga_col P B A); assumption).
(* Goal: @Acute Tn P B Q *)
(* Goal: False *)
apply HNCol; ColR.
(* Goal: @Acute Tn P B Q *)
assert (HNCol2 : ~ Col P B C) by (apply (ncol_conga_ncol P B A); assumption).
(* Goal: @Acute Tn P B Q *)
assert (~ Bet A B C) by (intro; apply HNCol; Col).
(* Goal: @Acute Tn P B Q *)
destruct (col_dec B A Q).
(* Goal: @Acute Tn P B Q *)
(* Goal: @Acute Tn P B Q *)
assert (Out B A Q) by (apply col_in_angle_out with C; Col).
(* Goal: @Acute Tn P B Q *)
(* Goal: @Acute Tn P B Q *)
apply (acute_conga__acute A B P); trivial.
(* Goal: @Acute Tn P B Q *)
(* Goal: @CongA Tn A B P P B Q *)
apply out_conga with A P P A; try (apply out_trivial); auto.
(* Goal: @Acute Tn P B Q *)
(* Goal: @CongA Tn A B P P B A *)
apply conga_pseudo_refl; auto.
(* Goal: @Acute Tn P B Q *)
destruct (col_dec B C Q).
(* Goal: @Acute Tn P B Q *)
(* Goal: @Acute Tn P B Q *)
assert (Out B C Q) by (apply col_in_angle_out with A; Between; Col).
(* Goal: @Acute Tn P B Q *)
(* Goal: @Acute Tn P B Q *)
apply (acute_conga__acute A B P); trivial.
(* Goal: @Acute Tn P B Q *)
(* Goal: @CongA Tn A B P P B Q *)
apply out_conga with A P P C; try (apply out_trivial); auto.
(* Goal: @Acute Tn P B Q *)
(* Goal: @CongA Tn A B P P B C *)
apply conga_left_comm, HP2.
(* Goal: @Acute Tn P B Q *)
destruct (col_dec B P Q).
(* Goal: @Acute Tn P B Q *)
(* Goal: @Acute Tn P B Q *)
apply out__acute, col_inangle2__out with A C; assumption.
(* Goal: @Acute Tn P B Q *)
destruct (cop__one_or_two_sides B P A Q) as [HOS|HTS]; Col.
(* Goal: @Acute Tn P B Q *)
(* Goal: @Acute Tn P B Q *)
(* Goal: @Coplanar Tn B P A Q *)
apply coplanar_perm_2, coplanar_trans_1 with C; Cop; Col.
(* Goal: @Acute Tn P B Q *)
(* Goal: @Acute Tn P B Q *)
-
(* Goal: @Acute Tn P B Q *)
apply acute_lea_acute with P B C.
(* Goal: @LeA Tn P B Q P B C *)
(* Goal: @Acute Tn P B C *)
apply (acute_conga__acute A B P); try (apply conga_left_comm); assumption.
(* Goal: @LeA Tn P B Q P B C *)
exists Q; split; [|apply conga_refl; auto].
(* Goal: @InAngle Tn Q P B C *)
apply os2__inangle; apply invert_one_side.
(* Goal: @OS Tn C B P Q *)
(* Goal: @OS Tn P B C Q *)
exists A; split; Side; apply in_angle_two_sides; Col.
(* Goal: @OS Tn C B P Q *)
apply one_side_transitivity with A; [|apply one_side_symmetry]; apply in_angle_one_side; Col.
(* BG Goal: @Acute Tn P B Q *)
-
(* Goal: @Acute Tn P B Q *)
apply acute_lea_acute with A B P; trivial.
(* Goal: @LeA Tn P B Q A B P *)
apply lea_comm.
(* Goal: @LeA Tn Q B P P B A *)
exists Q; split; [|apply conga_pseudo_refl; auto].
(* Goal: @InAngle Tn Q P B A *)
apply os2__inangle; trivial.
(* Goal: @OS Tn B A P Q *)
apply invert_one_side, one_side_transitivity with C; [|apply one_side_symmetry]; apply in_angle_one_side; Col.
Qed.
Lemma lta_os__ts : forall A O B P, ~ Col A O P -> LtA A O P A O B -> OS O A B P ->
TS O P A B.
Lemma conga_os__out : forall O A B C, CongA A O B A O C -> OS O A B C -> Out O B C.
Proof.
(* Goal: forall (O A B C : @Tpoint Tn) (_ : @CongA Tn A O B A O C) (_ : @OS Tn O A B C), @Out Tn O B C *)
intros.
(* Goal: @Out Tn O B C *)
assert(HH:= conga_cop__or_out_ts A O B C).
(* Goal: @Out Tn O B C *)
induction HH; Cop.
(* Goal: @Out Tn O B C *)
apply invert_two_sides in H1.
(* Goal: @Out Tn O B C *)
apply l9_9 in H1.
(* Goal: @Out Tn O B C *)
contradiction.
Qed.
Lemma ex_suppa : forall A B C, A <> B -> B <> C -> exists D E F, SuppA A B C D E F.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)), @ex (@Tpoint Tn) (fun D : @Tpoint Tn => @ex (@Tpoint Tn) (fun E : @Tpoint Tn => @ex (@Tpoint Tn) (fun F : @Tpoint Tn => @SuppA Tn A B C D E F))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => @ex (@Tpoint Tn) (fun E : @Tpoint Tn => @ex (@Tpoint Tn) (fun F : @Tpoint Tn => @SuppA Tn A B C D E F))) *)
destruct (segment_construction A B A B) as [A' []].
(* Goal: @ex (@Tpoint Tn) (fun D : @Tpoint Tn => @ex (@Tpoint Tn) (fun E : @Tpoint Tn => @ex (@Tpoint Tn) (fun F : @Tpoint Tn => @SuppA Tn A B C D E F))) *)
exists C, B, A'.
(* Goal: @SuppA Tn A B C C B A' *)
split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => and (@Bet Tn A B A'0) (@CongA Tn C B A' C B A'0)) *)
exists A'.
(* Goal: and (@Bet Tn A B A') (@CongA Tn C B A' C B A') *)
split; trivial.
(* Goal: @CongA Tn C B A' C B A' *)
assert_diffs.
(* Goal: @CongA Tn C B A' C B A' *)
apply conga_refl; auto.
Qed.
Lemma suppa_distincts : forall A B C D E F, SuppA A B C D E F ->
A <> B /\ B <> C /\ D <> E /\ E <> F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @SuppA Tn A B C D E F), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) E F)))) *)
unfold SuppA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')))), and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) E F)))) *)
intros; spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) E F)))) *)
ex_and H0 A'.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) E F)))) *)
apply conga_distinct in H1; spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (and (not (@eq (@Tpoint Tn) D E)) (not (@eq (@Tpoint Tn) E F)))) *)
repeat split; auto.
Qed.
Lemma suppa_right_comm : forall A B C D E F, SuppA A B C D E F -> SuppA A B C F E D.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @SuppA Tn A B C D E F), @SuppA Tn A B C F E D *)
unfold SuppA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')))), and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn F E D C B A'))) *)
intros; spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn F E D C B A'))) *)
split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn F E D C B A')) *)
ex_and H0 A'.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn F E D C B A')) *)
exists A'.
(* Goal: and (@Bet Tn A B A') (@CongA Tn F E D C B A') *)
split; auto.
(* Goal: @CongA Tn F E D C B A' *)
apply conga_left_comm, H1.
Qed.
Lemma suppa_left_comm : forall A B C D E F, SuppA A B C D E F -> SuppA C B A D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @SuppA Tn A B C D E F), @SuppA Tn C B A D E F *)
unfold SuppA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')))), and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn C B A') (@CongA Tn D E F A B A'))) *)
intros; spliter.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn C B A') (@CongA Tn D E F A B A'))) *)
ex_and H0 A'.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn C B A') (@CongA Tn D E F A B A'))) *)
apply conga_distinct in H1.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn C B A') (@CongA Tn D E F A B A'))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn C B A') (@CongA Tn D E F A B A'))) *)
split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn C B A') (@CongA Tn D E F A B A')) *)
destruct (segment_construction C B C B) as [C' []].
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn C B A') (@CongA Tn D E F A B A')) *)
exists C'.
(* Goal: and (@Bet Tn C B C') (@CongA Tn D E F A B C') *)
split; auto.
(* Goal: @CongA Tn D E F A B C' *)
apply conga_trans with C B A'; trivial.
(* Goal: @CongA Tn C B A' A B C' *)
assert_diffs.
(* Goal: @CongA Tn C B A' A B C' *)
apply conga_left_comm, l11_14; Between.
Qed.
Lemma suppa_comm : forall A B C D E F, SuppA A B C D E F -> SuppA C B A F E D.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @SuppA Tn A B C D E F), @SuppA Tn C B A F E D *)
intros.
(* Goal: @SuppA Tn C B A F E D *)
apply suppa_left_comm, suppa_right_comm, H.
Qed.
Lemma suppa_sym : forall A B C D E F, SuppA A B C D E F -> SuppA D E F A B C.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @SuppA Tn A B C D E F), @SuppA Tn D E F A B C *)
unfold SuppA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')))), and (not (@eq (@Tpoint Tn) D E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn D E A') (@CongA Tn A B C F E A'))) *)
intros; spliter.
(* Goal: and (not (@eq (@Tpoint Tn) D E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn D E A') (@CongA Tn A B C F E A'))) *)
ex_and H0 A'.
(* Goal: and (not (@eq (@Tpoint Tn) D E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn D E A') (@CongA Tn A B C F E A'))) *)
apply conga_distinct in H1; spliter.
(* Goal: and (not (@eq (@Tpoint Tn) D E)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn D E A') (@CongA Tn A B C F E A'))) *)
split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn D E A') (@CongA Tn A B C F E A')) *)
destruct (segment_construction D E D E) as [D' []].
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn D E A') (@CongA Tn A B C F E A')) *)
exists D'.
(* Goal: and (@Bet Tn D E D') (@CongA Tn A B C F E D') *)
split; auto.
(* Goal: @CongA Tn A B C F E D' *)
assert_diffs.
(* Goal: @CongA Tn A B C F E D' *)
apply conga_right_comm, l11_13 with A' D; Between.
(* Goal: @CongA Tn A' B C D E F *)
apply conga_sym, conga_right_comm, H1.
Qed.
Lemma conga2_suppa__suppa : forall A B C D E F A' B' C' D' E' F',
CongA A B C A' B' C' -> CongA D E F D' E' F' -> SuppA A B C D E F ->
SuppA A' B' C' D' E' F'.
Proof.
(* Goal: forall (A B C D E F A' B' C' D' E' F' : @Tpoint Tn) (_ : @CongA Tn A B C A' B' C') (_ : @CongA Tn D E F D' E' F') (_ : @SuppA Tn A B C D E F), @SuppA Tn A' B' C' D' E' F' *)
intros.
(* Goal: @SuppA Tn A' B' C' D' E' F' *)
assert (SuppA A B C D' E' F').
(* Goal: @SuppA Tn A' B' C' D' E' F' *)
(* Goal: @SuppA Tn A B C D' E' F' *)
{
(* Goal: @SuppA Tn A B C D' E' F' *)
unfold SuppA in *; spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D' E' F' C B A'))) *)
split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D' E' F' C B A')) *)
ex_and H2 A0.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D' E' F' C B A')) *)
exists A0.
(* Goal: and (@Bet Tn A B A0) (@CongA Tn D' E' F' C B A0) *)
split; trivial.
(* Goal: @CongA Tn D' E' F' C B A0 *)
apply conga_trans with D E F; [apply conga_sym|]; assumption.
(* BG Goal: @SuppA Tn A' B' C' D' E' F' *)
}
(* Goal: @SuppA Tn A' B' C' D' E' F' *)
apply suppa_sym.
(* Goal: @SuppA Tn D' E' F' A' B' C' *)
apply suppa_sym in H2.
(* Goal: @SuppA Tn D' E' F' A' B' C' *)
unfold SuppA in H2; spliter.
(* Goal: @SuppA Tn D' E' F' A' B' C' *)
split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => and (@Bet Tn D' E' A'0) (@CongA Tn A' B' C' F' E' A'0)) *)
ex_and H3 D0.
(* Goal: @ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => and (@Bet Tn D' E' A'0) (@CongA Tn A' B' C' F' E' A'0)) *)
exists D0.
(* Goal: and (@Bet Tn D' E' D0) (@CongA Tn A' B' C' F' E' D0) *)
split; trivial.
(* Goal: @CongA Tn A' B' C' F' E' D0 *)
apply conga_trans with A B C; [apply conga_sym|]; assumption.
Qed.
Lemma suppa2__conga456 : forall A B C D E F D' E' F',
SuppA A B C D E F -> SuppA A B C D' E' F' -> CongA D E F D' E' F'.
Proof.
(* Goal: forall (A B C D E F D' E' F' : @Tpoint Tn) (_ : @SuppA Tn A B C D E F) (_ : @SuppA Tn A B C D' E' F'), @CongA Tn D E F D' E' F' *)
unfold SuppA.
(* Goal: forall (A B C D E F D' E' F' : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')))) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D' E' F' C B A')))), @CongA Tn D E F D' E' F' *)
intros; spliter.
(* Goal: @CongA Tn D E F D' E' F' *)
ex_and H2 A'.
(* Goal: @CongA Tn D E F D' E' F' *)
ex_and H1 A''.
(* Goal: @CongA Tn D E F D' E' F' *)
apply conga_trans with C B A'; trivial.
(* Goal: @CongA Tn C B A' D' E' F' *)
apply conga_trans with C B A''; [|apply conga_sym, H4].
(* Goal: @CongA Tn C B A' C B A'' *)
apply conga_distinct in H3.
(* Goal: @CongA Tn C B A' C B A'' *)
apply conga_distinct in H4.
(* Goal: @CongA Tn C B A' C B A'' *)
spliter.
(* Goal: @CongA Tn C B A' C B A'' *)
apply out2__conga.
(* Goal: @Out Tn B A'' A' *)
(* Goal: @Out Tn B C C *)
apply out_trivial; auto.
(* Goal: @Out Tn B A'' A' *)
apply l6_2 with A; Between.
Qed.
Lemma suppa2__conga123 : forall A B C D E F A' B' C',
SuppA A B C D E F -> SuppA A' B' C' D E F -> CongA A B C A' B' C'.
Proof.
(* Goal: forall (A B C D E F A' B' C' : @Tpoint Tn) (_ : @SuppA Tn A B C D E F) (_ : @SuppA Tn A' B' C' D E F), @CongA Tn A B C A' B' C' *)
intros.
(* Goal: @CongA Tn A B C A' B' C' *)
apply (suppa2__conga456 D E F); apply suppa_sym; assumption.
Qed.
Lemma bet_out__suppa : forall A B C D E F, A <> B -> B <> C ->
Bet A B C -> Out E D F -> SuppA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @Bet Tn A B C) (_ : @Out Tn E D F), @SuppA Tn A B C D E F *)
intros.
(* Goal: @SuppA Tn A B C D E F *)
split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')) *)
exists C.
(* Goal: and (@Bet Tn A B C) (@CongA Tn D E F C B C) *)
split; auto.
(* Goal: @CongA Tn D E F C B C *)
apply l11_21_b; trivial.
(* Goal: @Out Tn B C C *)
apply out_trivial; auto.
Qed.
Lemma bet_suppa__out : forall A B C D E F,
Bet A B C -> SuppA A B C D E F -> Out E D F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @SuppA Tn A B C D E F), @Out Tn E D F *)
intros.
(* Goal: @Out Tn E D F *)
assert (Hd := H0).
(* Goal: @Out Tn E D F *)
apply suppa_distincts in Hd; spliter.
(* Goal: @Out Tn E D F *)
apply (l11_21_a C B C).
(* Goal: @CongA Tn C B C D E F *)
(* Goal: @Out Tn B C C *)
apply out_trivial; auto.
(* Goal: @CongA Tn C B C D E F *)
apply (suppa2__conga456 A B C); trivial.
(* Goal: @SuppA Tn A B C C B C *)
split; auto.
(* Goal: @ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn C B C C B A')) *)
exists C.
(* Goal: and (@Bet Tn A B C) (@CongA Tn C B C C B C) *)
split; trivial.
(* Goal: @CongA Tn C B C C B C *)
apply conga_refl; auto.
Qed.
Lemma out_suppa__bet : forall A B C D E F,
Out B A C -> SuppA A B C D E F -> Bet D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Out Tn B A C) (_ : @SuppA Tn A B C D E F), @Bet Tn D E F *)
intros.
(* Goal: @Bet Tn D E F *)
destruct (segment_construction A B A B) as [B' []].
(* Goal: @Bet Tn D E F *)
apply (bet_conga__bet A B B'); trivial.
(* Goal: @CongA Tn A B B' D E F *)
apply (suppa2__conga456 A B C); trivial.
(* Goal: @SuppA Tn A B C A B B' *)
assert_diffs.
(* Goal: @SuppA Tn A B C A B B' *)
apply suppa_sym, bet_out__suppa; auto.
Qed.
Lemma per_suppa__per : forall A B C D E F,
Per A B C -> SuppA A B C D E F -> Per D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Per Tn A B C) (_ : @SuppA Tn A B C D E F), @Per Tn D E F *)
unfold SuppA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Per Tn A B C) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')))), @Per Tn D E F *)
intros; spliter.
(* Goal: @Per Tn D E F *)
ex_and H1 A'.
(* Goal: @Per Tn D E F *)
apply (l11_17 C B A'); [|apply conga_sym, H2].
(* Goal: @Per Tn C B A' *)
apply conga_distinct in H2; spliter.
(* Goal: @Per Tn C B A' *)
apply per_col with A; Perp; Col.
Qed.
Lemma per2__suppa : forall A B C D E F, A <> B -> B <> C -> D <> E -> E <> F ->
Per A B C -> Per D E F -> SuppA A B C D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) D E)) (_ : not (@eq (@Tpoint Tn) E F)) (_ : @Per Tn A B C) (_ : @Per Tn D E F), @SuppA Tn A B C D E F *)
intros.
(* Goal: @SuppA Tn A B C D E F *)
destruct (ex_suppa A B C) as [D' [E' [F']]]; auto.
(* Goal: @SuppA Tn A B C D E F *)
apply (conga2_suppa__suppa A B C D' E' F'); try apply conga_refl; auto.
(* Goal: @CongA Tn D' E' F' D E F *)
assert (Hd := H5).
(* Goal: @CongA Tn D' E' F' D E F *)
apply suppa_distincts in Hd; spliter.
(* Goal: @CongA Tn D' E' F' D E F *)
apply l11_16; auto.
(* Goal: @Per Tn D' E' F' *)
apply (per_suppa__per A B C); assumption.
Qed.
Lemma suppa__per : forall A B C, SuppA A B C A B C -> Per A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @SuppA Tn A B C A B C), @Per Tn A B C *)
unfold SuppA.
(* Goal: forall (A B C : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn A B C C B A')))), @Per Tn A B C *)
intros; spliter.
(* Goal: @Per Tn A B C *)
ex_and H0 A'.
(* Goal: @Per Tn A B C *)
apply l8_2, l11_18_2 with A'; trivial.
(* Goal: @CongA Tn C B A C B A' *)
apply conga_left_comm, H1.
Qed.
Lemma acute_suppa__obtuse : forall A B C D E F,
Acute A B C -> SuppA A B C D E F -> Obtuse D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Acute Tn A B C) (_ : @SuppA Tn A B C D E F), @Obtuse Tn D E F *)
unfold SuppA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Acute Tn A B C) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')))), @Obtuse Tn D E F *)
intros; spliter.
(* Goal: @Obtuse Tn D E F *)
ex_and H1 A'.
(* Goal: @Obtuse Tn D E F *)
apply (conga_obtuse__obtuse C B A'); [|apply conga_sym, H2].
(* Goal: @Obtuse Tn C B A' *)
apply conga_distinct in H2; spliter.
(* Goal: @Obtuse Tn C B A' *)
apply obtuse_sym, (acute_bet__obtuse A); auto.
Qed.
Lemma obtuse_suppa__acute : forall A B C D E F,
Obtuse A B C -> SuppA A B C D E F -> Acute D E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Obtuse Tn A B C) (_ : @SuppA Tn A B C D E F), @Acute Tn D E F *)
unfold SuppA.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Obtuse Tn A B C) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A' : @Tpoint Tn => and (@Bet Tn A B A') (@CongA Tn D E F C B A')))), @Acute Tn D E F *)
intros; spliter.
(* Goal: @Acute Tn D E F *)
ex_and H1 A'.
(* Goal: @Acute Tn D E F *)
apply (acute_conga__acute C B A'); [|apply conga_sym, H2].
(* Goal: @Acute Tn C B A' *)
apply conga_distinct in H2; spliter.
(* Goal: @Acute Tn C B A' *)
apply acute_sym, (bet_obtuse__acute A); auto.
Qed.
Lemma lea_suppa2__lea : forall A B C D E F A' B' C' D' E' F',
SuppA A B C A' B' C' -> SuppA D E F D' E' F' -> LeA A B C D E F ->
LeA D' E' F' A' B' C'.
Proof.
(* Goal: forall (A B C D E F A' B' C' D' E' F' : @Tpoint Tn) (_ : @SuppA Tn A B C A' B' C') (_ : @SuppA Tn D E F D' E' F') (_ : @LeA Tn A B C D E F), @LeA Tn D' E' F' A' B' C' *)
unfold SuppA.
(* Goal: forall (A B C D E F A' B' C' D' E' F' : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => and (@Bet Tn A B A'0) (@CongA Tn A' B' C' C B A'0)))) (_ : and (not (@eq (@Tpoint Tn) D E)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => and (@Bet Tn D E A'0) (@CongA Tn D' E' F' F E A'0)))) (_ : @LeA Tn A B C D E F), @LeA Tn D' E' F' A' B' C' *)
intros; spliter.
(* Goal: @LeA Tn D' E' F' A' B' C' *)
ex_and H3 A0.
(* Goal: @LeA Tn D' E' F' A' B' C' *)
ex_and H2 D0.
(* Goal: @LeA Tn D' E' F' A' B' C' *)
apply (l11_30 F E D0 C B A0); [|apply conga_sym; assumption..].
(* Goal: @LeA Tn F E D0 C B A0 *)
apply conga_distinct in H4.
(* Goal: @LeA Tn F E D0 C B A0 *)
apply conga_distinct in H5.
(* Goal: @LeA Tn F E D0 C B A0 *)
spliter.
(* Goal: @LeA Tn F E D0 C B A0 *)
apply lea_comm, l11_36 with D A; Between.
Qed.
Lemma lta_suppa2__lta : forall A B C D E F A' B' C' D' E' F',
SuppA A B C A' B' C' -> SuppA D E F D' E' F' -> LtA A B C D E F ->
LtA D' E' F' A' B' C'.
Proof.
(* Goal: forall (A B C D E F A' B' C' D' E' F' : @Tpoint Tn) (_ : @SuppA Tn A B C A' B' C') (_ : @SuppA Tn D E F D' E' F') (_ : @LtA Tn A B C D E F), @LtA Tn D' E' F' A' B' C' *)
unfold SuppA.
(* Goal: forall (A B C D E F A' B' C' D' E' F' : @Tpoint Tn) (_ : and (not (@eq (@Tpoint Tn) A B)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => and (@Bet Tn A B A'0) (@CongA Tn A' B' C' C B A'0)))) (_ : and (not (@eq (@Tpoint Tn) D E)) (@ex (@Tpoint Tn) (fun A'0 : @Tpoint Tn => and (@Bet Tn D E A'0) (@CongA Tn D' E' F' F E A'0)))) (_ : @LtA Tn A B C D E F), @LtA Tn D' E' F' A' B' C' *)
intros; spliter.
(* Goal: @LtA Tn D' E' F' A' B' C' *)
ex_and H3 A0.
(* Goal: @LtA Tn D' E' F' A' B' C' *)
ex_and H2 D0.
(* Goal: @LtA Tn D' E' F' A' B' C' *)
apply (conga_preserves_lta F E D0 C B A0); [apply conga_sym; assumption..|].
(* Goal: @LtA Tn F E D0 C B A0 *)
apply conga_distinct in H4.
(* Goal: @LtA Tn F E D0 C B A0 *)
apply conga_distinct in H5.
(* Goal: @LtA Tn F E D0 C B A0 *)
spliter.
(* Goal: @LtA Tn F E D0 C B A0 *)
apply lta_comm, bet2_lta__lta with A D; Between.
Qed.
Lemma suppa_dec : forall A B C D E F, SuppA A B C D E F \/ ~ SuppA A B C D E F.
Proof.
(* Goal: forall A B C D E F : @Tpoint Tn, or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
intros.
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
induction (eq_dec_points A B).
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
right; intros []; auto.
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
induction (eq_dec_points B C).
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
right; intro Habs; apply suppa_distincts in Habs; spliter; auto.
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
destruct (ex_suppa A B C) as [D' [E' [F']]]; auto.
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
induction (conga_dec D' E' F' D E F).
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
left; apply (conga2_suppa__suppa A B C D' E' F'); try apply conga_refl; auto.
(* Goal: or (@SuppA Tn A B C D E F) (not (@SuppA Tn A B C D E F)) *)
right; intro; apply H2, (suppa2__conga456 A B C); assumption.
Qed.
End T11_2.
Ltac not_exist_hyp4 A B C D E F G H := first [not_exist_hyp_comm A B | not_exist_hyp_comm C D | not_exist_hyp_comm E F | not_exist_hyp_comm G H].
Ltac not_exist_hyp5 A B C D E F G H I J := first [not_exist_hyp_comm A B | not_exist_hyp_comm C D | not_exist_hyp_comm E F | not_exist_hyp_comm G H | not_exist_hyp_comm I J].
Ltac not_exist_hyp6 A B C D E F G H I J K L := first [not_exist_hyp_comm A B | not_exist_hyp_comm C D | not_exist_hyp_comm E F | not_exist_hyp_comm G H | not_exist_hyp_comm I J | not_exist_hyp_comm K L].
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
end.
Hint Resolve conga_refl conga_sym cong3_conga conga_pseudo_refl conga_trivial_1
conga_right_comm conga_left_comm conga_comm : conga.
Ltac CongA := auto with conga.
Hint Resolve l11_31_1 l11_31_2 lta__lea lea_comm lea_right_comm lea_left_comm
lea_asym lea121345 inangle__lea conga__lea conga__lea456123 lea_refl
acute_per__lta obtuse_per__lta acute_obtuse__lta : lea.
Ltac Lea := auto with lea.
Section T11_3.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma acute_one_side_aux : forall P A O B,
OS O A P B -> Acute A O P -> Perp O A B O ->
OS O B A P.
Lemma acute_one_side_aux0 : forall P A O B, Col A O P -> Acute A O P -> Perp O A B O -> OS O B A P.
Lemma acute_cop_perp__one_side :
forall P A O B, Acute A O P -> Perp O A B O -> Coplanar A B O P -> OS O B A P.
End T11_3.
Section T11_2D.
Context `{T2D:Tarski_2D}.
Lemma conga__or_out_ts : forall A B C C',
CongA A B C A B C' -> Out B C C' \/ TS A B C C'.
Proof.
(* Goal: forall (A B C C' : @Tpoint Tn) (_ : @CongA Tn A B C A B C'), or (@Out Tn B C C') (@TS Tn A B C C') *)
intros A B C C'.
(* Goal: forall _ : @CongA Tn A B C A B C', or (@Out Tn B C C') (@TS Tn A B C C') *)
apply conga_cop__or_out_ts, all_coplanar.
Qed.
Lemma conga_out_reflectl__out : forall A B C P T T',
~ Out B A C -> CongA P B A P B C -> Out B A T -> ReflectL T T' B P -> Out B C T'.
Proof.
(* Goal: forall (A B C P T T' : @Tpoint Tn) (_ : not (@Out Tn B A C)) (_ : @CongA Tn P B A P B C) (_ : @Out Tn B A T) (_ : @ReflectL Tn T T' B P), @Out Tn B C T' *)
intros A B C P T T' H.
(* Goal: forall (_ : @CongA Tn P B A P B C) (_ : @Out Tn B A T) (_ : @ReflectL Tn T T' B P), @Out Tn B C T' *)
assert (H1 := all_coplanar A B C P).
(* Goal: forall (_ : @CongA Tn P B A P B C) (_ : @Out Tn B A T) (_ : @ReflectL Tn T T' B P), @Out Tn B C T' *)
apply conga_cop_out_reflectl__out; assumption.
Qed.
Lemma col_conga_reflectl__col : forall A B C P T T',
~ Out B A C -> CongA P B A P B C -> Col B A T -> ReflectL T T' B P -> Col B C T'.
Proof.
(* Goal: forall (A B C P T T' : @Tpoint Tn) (_ : not (@Out Tn B A C)) (_ : @CongA Tn P B A P B C) (_ : @Col Tn B A T) (_ : @ReflectL Tn T T' B P), @Col Tn B C T' *)
intros A B C P T T' H.
(* Goal: forall (_ : @CongA Tn P B A P B C) (_ : @Col Tn B A T) (_ : @ReflectL Tn T T' B P), @Col Tn B C T' *)
assert (H1 := all_coplanar A B C P).
(* Goal: forall (_ : @CongA Tn P B A P B C) (_ : @Col Tn B A T) (_ : @ReflectL Tn T T' B P), @Col Tn B C T' *)
apply col_conga_cop_reflectl__col; assumption.
Qed.
Lemma conga2__col : forall A B C P P',
~ Out B A C -> CongA P B A P B C -> CongA P' B A P' B C -> Col B P P'.
Proof.
(* Goal: forall (A B C P P' : @Tpoint Tn) (_ : not (@Out Tn B A C)) (_ : @CongA Tn P B A P B C) (_ : @CongA Tn P' B A P' B C), @Col Tn B P P' *)
intros A B C P P' H H1 H2.
(* Goal: @Col Tn B P P' *)
assert (H3 := all_coplanar A B P P').
(* Goal: @Col Tn B P P' *)
assert (H4 := all_coplanar B C P P').
(* Goal: @Col Tn B P P' *)
apply conga2_cop2__col with A C; assumption.
Qed.
Lemma inangle__ex_col_inangle : forall A B C P Q, ~ Out B A C -> InAngle P A B C ->
exists R, InAngle R A B C /\ P <> R /\ Col P Q R.
Proof.
(* Goal: forall (A B C P Q : @Tpoint Tn) (_ : not (@Out Tn B A C)) (_ : @InAngle Tn P A B C), @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun R : @Tpoint Tn => and (@InAngle Tn R A B C) (and (not (@eq (@Tpoint Tn) P R)) (@Col Tn P Q R))) *)
apply cop_inangle__ex_col_inangle; [assumption..|].
(* Goal: @Coplanar Tn A B C Q *)
apply all_coplanar.
Qed.
Lemma acute_perp__one_side : forall P A O B, Acute A O P -> Perp O A B O -> OS O B A P.
Proof.
(* Goal: forall (P A O B : @Tpoint Tn) (_ : @Acute Tn A O P) (_ : @Perp Tn O A B O), @OS Tn O B A P *)
intros.
(* Goal: @OS Tn O B A P *)
apply acute_cop_perp__one_side; [assumption..|].
(* Goal: @Coplanar Tn A B O P *)
apply all_coplanar.
Qed.
End T11_2D. |
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq div fintype prime.
From mathcomp
Require Import bigop finset fingroup morphism automorphism quotient action.
From mathcomp
Require Import cyclic gproduct gfunctor commutator pgroup center nilpotent.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Section ModP.
Variable (aT : finGroupType) (sT : finType) (D : {group aT}).
Variable to : action D sT.
Lemma pgroup_fix_mod (p : nat) (G : {group aT}) (S : {set sT}) :
p.-group G -> [acts G, on S | to] -> #|S| = #|'Fix_(S | to)(G)| %[mod p].
End ModP.
Section ModularGroupAction.
Variables (aT rT : finGroupType) (D : {group aT}) (R : {group rT}).
Variables (to : groupAction D R) (p : nat).
Implicit Types (G H : {group aT}) (M : {group rT}).
Lemma nontrivial_gacent_pgroup G M :
p.-group G -> p.-group M -> {acts G, on group M | to} ->
Proof.
(* Goal: forall (_ : is_true (@pgroup aT (nat_pred_of_nat p) (@gval aT G))) (_ : is_true (@pgroup rT (nat_pred_of_nat p) (@gval rT M))) (_ : @acts_on_group aT rT (@gval aT D) (@gval rT R) (@gval aT G) (@gval rT M) to) (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT))) (@gval rT M : @set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (oneg (group_set_of_baseGroupType (FinGroup.base rT)) : @set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))))))), is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G)) : @set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (oneg (group_set_of_baseGroupType (FinGroup.base rT)) : @set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))))) *)
move=> pG pM [nMG sMR] ntM; have [p_pr p_dv_M _] := pgroup_pdiv pM ntM.
(* Goal: is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G))) (oneg (group_set_of_baseGroupType (FinGroup.base rT))))) *)
rewrite -cardG_gt1 (leq_trans (prime_gt1 p_pr)) 1?dvdn_leq ?cardG_gt0 //= /dvdn.
(* Goal: is_true (@eq_op nat_eqType (modn (@card (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)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G)))))) p) O) *)
by rewrite gacentE ?(acts_dom nMG) // setIA (setIidPl sMR) -pgroup_fix_mod.
Qed.
Lemma pcore_sub_astab_irr G M :
p.-group M -> M \subset R -> acts_irreducibly G M to ->
Proof.
(* Goal: forall (_ : is_true (@pgroup rT (nat_pred_of_nat p) (@gval rT M))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))) (_ : is_true (@acts_irreducibly aT rT (@gval aT D) (@gval rT R) (@gval aT G) (@gval rT M) to)), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@pcore (nat_pred_of_nat p) aT (@gval aT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) *)
move=> pM sMR /mingroupP[/andP[ntM nMG] minM].
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@pcore (nat_pred_of_nat p) aT (@gval aT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) *)
have /andP[sGpG nGpG]: 'O_p(G) <| G := gFnormal _ G.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@pcore (nat_pred_of_nat p) aT (@gval aT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) *)
have sGD := acts_dom nMG; have sGpD: 'O_p(G) \subset D := gFsub_trans _ sGD.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@pcore (nat_pred_of_nat p) aT (@gval aT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) *)
rewrite subsetI sGpG -gacentC //=; apply/setIidPl; apply: minM (subsetIl _ _).
(* Goal: is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT))) (@gval rT (@setI_group rT M (@gacent_group aT rT D R to (@pcore (nat_pred_of_nat p) aT (@gval aT G))))) (oneg (group_set_of_baseGroupType (FinGroup.base rT))))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT (@setI_group rT M (@gacent_group aT rT D R to (@pcore (nat_pred_of_nat p) aT (@gval aT G))))) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) *)
rewrite nontrivial_gacent_pgroup ?pcore_pgroup //=; last first.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@pcore (nat_pred_of_nat p) aT (@gval aT G)))) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
(* Goal: @acts_on_group aT rT (@gval aT D) (@gval rT R) (@pcore (nat_pred_of_nat p) aT (@gval aT G)) (@gval rT M) to *)
by split; rewrite ?gFsub_trans.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@pcore (nat_pred_of_nat p) aT (@gval aT G)))) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
by apply: subset_trans (acts_subnorm_subgacent sGpD nMG); rewrite subsetI subxx.
Qed.
Lemma pcore_faithful_irr_act G M :
p.-group M -> M \subset R -> acts_irreducibly G M to ->
Proof.
(* Goal: forall (_ : is_true (@pgroup rT (nat_pred_of_nat p) (@gval rT M))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))) (_ : is_true (@acts_irreducibly aT rT (@gval aT D) (@gval rT R) (@gval aT G) (@gval rT M) to)) (_ : is_true (@faithful aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval aT G) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@pcore (nat_pred_of_nat p) aT (@gval aT G)) (oneg (group_set_of_baseGroupType (FinGroup.base aT))) *)
move=> pM sMR irrG ffulG; apply/trivgP; apply: subset_trans ffulG.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@pcore_group (nat_pred_of_nat p) aT (@gval aT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) *)
exact: pcore_sub_astab_irr.
Qed.
End ModularGroupAction.
Section Sylow.
Variables (p : nat) (gT : finGroupType) (G : {group gT}).
Implicit Types P Q H K : {group gT}.
Theorem Sylow's_theorem :
[/\ forall P, [max P | p.-subgroup(G) P] = p.-Sylow(G) P,
Lemma max_pgroup_Sylow P : [max P | p.-subgroup(G) P] = p.-Sylow(G) P.
Proof.
(* Goal: @eq bool (@maxgroup gT (@gval gT P) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P)) *)
by case Sylow's_theorem.
Qed.
Lemma Sylow_superset Q :
Q \subset G -> p.-group Q -> {P : {group gT} | p.-Sylow(G) P & Q \subset P}.
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 Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@pgroup gT (nat_pred_of_nat p) (@gval gT Q))), @sig2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT P))))) *)
move=> sQG pQ.
(* Goal: @sig2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT P))))) *)
have [|P] := @maxgroup_exists _ (p.-subgroup(G)) Q; first exact/andP.
(* Goal: forall (_ : is_true (@maxgroup gT (@gval gT P) (fun B : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @psubgroup gT (nat_pred_of_nat p) (@gval gT G) (@gval gT B)))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT P))))), @sig2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT P))))) *)
by rewrite max_pgroup_Sylow; exists P.
Qed.
Lemma Sylow_exists : {P : {group gT} | p.-Sylow(G) P}.
Proof.
(* Goal: @sig (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) *)
by case: (Sylow_superset (sub1G G) (pgroup1 _ p)) => P; exists P.
Qed.
Lemma Syl_trans : [transitive G, on 'Syl_p(G) | 'JG].
Proof.
(* Goal: is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (group_of_finType gT) (@gval gT G) (@Syl gT p (@gval gT G)) (conjG_action gT)) *)
by case Sylow's_theorem.
Qed.
Lemma Sylow_trans P Q :
p.-Sylow(G) P -> p.-Sylow(G) Q -> exists2 x, x \in G & Q :=: P :^ x.
Proof.
(* Goal: forall (_ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (_ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT Q))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT Q) (@conjugate gT (@gval gT P) x)) *)
move=> sylP sylQ; have:= (atransP2 Syl_trans) P Q; rewrite !inE.
(* Goal: forall _ : forall (_ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (_ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT Q))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (Finite.sort (group_of_finType gT)) Q (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort (group_of_finType gT)) (conjG_action gT) P a)), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x0 (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT Q) (@conjugate gT (@gval gT P) x0)) *)
by case=> // x Gx ->; exists x.
Qed.
Lemma Sylow_subJ P Q :
p.-Sylow(G) P -> Q \subset G -> p.-group Q ->
Proof.
(* Goal: forall (_ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT 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 Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@pgroup gT (nat_pred_of_nat p) (@gval gT Q))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 Q))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT P) x))))) *)
move=> sylP sQG pQ; have [Px sylPx] := Sylow_superset sQG pQ.
(* 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 Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT Px)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 Q))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT P) x))))) *)
by have [x Gx ->] := Sylow_trans sylP sylPx; exists x.
Qed.
Lemma Sylow_Jsub P Q :
p.-Sylow(G) P -> Q \subset G -> p.-group Q ->
Proof.
(* Goal: forall (_ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT 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 Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@pgroup gT (nat_pred_of_nat p) (@gval gT Q))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@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 (@gval gT Q) 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 P))))) *)
move=> sylP sQG pQ; have [x Gx] := Sylow_subJ sylP sQG pQ.
(* 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 Q))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT P) x)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@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 (@gval gT Q) 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 P))))) *)
by exists x^-1; rewrite (groupV, sub_conjgV).
Qed.
Lemma card_Syl P : p.-Sylow(G) P -> #|'Syl_p(G)| = #|G : 'N_G(P)|.
Proof.
(* Goal: forall _ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P)), @eq nat (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) (@Syl gT p (@gval gT G))))) (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@gval gT P)))) *)
by case: Sylow's_theorem P.
Qed.
Lemma card_Syl_dvd : #|'Syl_p(G)| %| #|G|.
Proof.
(* Goal: is_true (dvdn (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) (@Syl gT p (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
by case Sylow_exists => P /card_Syl->; apply: dvdn_indexg.
Qed.
Lemma card_Syl_mod : prime p -> #|'Syl_p(G)| %% p = 1%N.
Proof.
(* Goal: forall _ : is_true (prime p), @eq nat (modn (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) (@Syl gT p (@gval gT G))))) p) (S O) *)
by case Sylow's_theorem.
Qed.
Lemma Frattini_arg H P : G <| H -> p.-Sylow(G) P -> G * 'N_H(P) = H.
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT G) (@gval gT H))) (_ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))), @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@normaliser gT (@gval gT P)))) (@gval gT H) *)
case/andP=> sGH nGH sylP; rewrite -normC ?subIset ?nGH ?orbT // -astab1JG.
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (group_of_finType gT) (@set1 (group_of_finType gT) P) (conjG_action gT))) (@gval gT G)) (@gval gT H) *)
move/subgroup_transitiveP: Syl_trans => ->; rewrite ?inE //.
(* Goal: is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (group_of_finType gT) (@gval gT H) (@Syl gT p (@gval gT G)) (conjG_action gT)) *)
apply/imsetP; exists P; rewrite ?inE //.
(* Goal: @eq (Finite.sort (set_of_finType (group_of_finType gT))) (@Syl gT p (@gval gT G)) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (group_of_finType gT) (conjG_action gT) (@gval gT H) P) *)
apply/eqP; rewrite eqEsubset -{1}((atransP Syl_trans) P) ?inE // imsetS //=.
(* Goal: is_true (@subset (group_of_finType gT) (@mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (group_of_finType gT) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (group_of_finType gT) (conjG_action gT) (@gval gT H) P))) (@mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (group_of_finType gT) (@Syl gT p (@gval gT G))))) *)
by apply/subsetP=> _ /imsetP[x Hx ->]; rewrite inE -(normsP nGH x Hx) pHallJ2.
Qed.
End Sylow.
Section MoreSylow.
Variables (gT : finGroupType) (p : nat).
Implicit Types G H P : {group gT}.
Lemma Sylow_setI_normal G H P :
G <| H -> p.-Sylow(H) P -> p.-Sylow(G) (G :&: P).
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT G) (@gval gT H))) (_ : is_true (@pHall gT (nat_pred_of_nat p) (@gval gT H) (@gval gT P))), is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT P))) *)
case/normalP=> sGH nGH sylP; have [Q sylQ] := Sylow_exists p G.
(* Goal: is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT P))) *)
have /maxgroupP[/andP[sQG pQ] maxQ] := Hall_max sylQ.
(* Goal: is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT P))) *)
have [R sylR sQR] := Sylow_superset (subset_trans sQG sGH) pQ.
(* Goal: is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT P))) *)
have [[x Hx ->] pR] := (Sylow_trans sylR sylP, pHall_pgroup sylR).
(* Goal: is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@conjugate gT (@gval gT R) x))) *)
rewrite -(nGH x Hx) -conjIg pHallJ2.
(* Goal: is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT (@setI_group gT G R))) *)
have /maxQ-> //: Q \subset G :&: R by rewrite subsetI sQG.
(* Goal: is_true (@psubgroup gT (nat_pred_of_nat p) (@gval gT G) (@gval gT (@setI_group gT G R))) *)
by rewrite /psubgroup subsetIl (pgroupS _ pR) ?subsetIr.
Qed.
Lemma normal_sylowP G :
reflect (exists2 P : {group gT}, p.-Sylow(G) P & P <| G)
Lemma trivg_center_pgroup P : p.-group P -> 'Z(P) = 1 -> P :=: 1.
Proof.
(* Goal: forall (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P))) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@center gT (@gval gT P)) (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 P) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
move=> pP Z1; apply/eqP/idPn=> ntP.
(* Goal: False *)
have{ntP} [p_pr p_dv_P _] := pgroup_pdiv pP ntP.
(* Goal: False *)
suff: p %| #|'Z(P)| by rewrite Z1 cards1 gtnNdvd ?prime_gt1.
(* Goal: is_true (dvdn p (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT P)))))) *)
by rewrite /center /dvdn -afixJ -pgroup_fix_mod // astabsJ normG.
Qed.
Lemma p2group_abelian P : p.-group P -> logn p #|P| <= 2 -> abelian P.
Lemma card_p2group_abelian P : prime p -> #|P| = (p ^ 2)%N -> abelian P.
Proof.
(* Goal: forall (_ : is_true (prime p)) (_ : @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 P)))) (expn p (S (S O)))), is_true (@abelian gT (@gval gT P)) *)
move=> primep oP; have pP: p.-group P by rewrite /pgroup oP pnat_exp pnat_id.
(* Goal: is_true (@abelian gT (@gval gT P)) *)
by rewrite (p2group_abelian pP) // oP pfactorK.
Qed.
Lemma Sylow_transversal_gen (T : {set {group gT}}) G :
(forall P, P \in T -> P \subset G) ->
(forall p, p \in \pi(G) -> exists2 P, P \in T & p.-Sylow(G) P) ->
Proof.
(* Goal: forall (_ : forall (P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T)))), 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 P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (p : nat) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of (unwrap_pi_arg (@pi_arg_of_fin_pred (FinGroup.arg_finType (FinGroup.base gT)) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))), @ex2 (Finite.sort (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => is_true (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T)))) (fun P : Finite.sort (group_of_finType gT) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))) (@gval gT P)))) (@gval gT G) *)
move=> G_T T_G; apply/eqP; rewrite eqEcard gen_subG.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))) (@gval gT P))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))) (@gval gT P))))))))) *)
apply/andP; split; first exact/bigcupsP.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))) (@gval gT P)))))))) *)
apply: dvdn_leq (cardG_gt0 _) _; apply/dvdn_partP=> // q /T_G[P T_P sylP].
(* Goal: is_true (dvdn (partn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (nat_pred_of_nat q)) (@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 (@generated_group gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))) (@gval gT P))))))))) *)
by rewrite -(card_Hall sylP); apply: cardSg; rewrite sub_gen // bigcup_sup.
Qed.
Lemma Sylow_gen G : <<\bigcup_(P : {group gT} | Sylow G P) P>> = G.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@Sylow gT (@gval gT G) (@gval gT P)) (@gval gT P)))) (@gval gT G) *)
set T := [set P : {group gT} | Sylow G P].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@Sylow gT (@gval gT G) (@gval gT P)) (@gval gT P)))) (@gval gT G) *)
rewrite -{2}(@Sylow_transversal_gen T G) => [|P | q _].
(* Goal: @ex2 (Finite.sort (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => is_true (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T)))) (fun P : Finite.sort (group_of_finType gT) => is_true (@pHall gT (nat_pred_of_nat q) (@gval gT G) (@gval gT P))) *)
(* Goal: forall _ : is_true (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))), 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 P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@Sylow gT (@gval gT G) (@gval gT P)) (@gval gT P)))) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))) (@gval gT P)))) *)
-
(* Goal: @ex2 (Finite.sort (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => is_true (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T)))) (fun P : Finite.sort (group_of_finType gT) => is_true (@pHall gT (nat_pred_of_nat q) (@gval gT G) (@gval gT P))) *)
(* Goal: forall _ : is_true (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))), 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 P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@Sylow gT (@gval gT G) (@gval gT P)) (@gval gT P)))) (@generated gT (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (group_of_finType gT)) P (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))) (@gval gT P)))) *)
by congr <<_>>; apply: eq_bigl => P; rewrite inE.
(* Goal: @ex2 (Finite.sort (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => is_true (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T)))) (fun P : Finite.sort (group_of_finType gT) => is_true (@pHall gT (nat_pred_of_nat q) (@gval gT G) (@gval gT P))) *)
(* Goal: forall _ : is_true (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))), 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 P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
-
(* Goal: @ex2 (Finite.sort (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => is_true (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T)))) (fun P : Finite.sort (group_of_finType gT) => is_true (@pHall gT (nat_pred_of_nat q) (@gval gT G) (@gval gT P))) *)
(* Goal: forall _ : is_true (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T))), 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 P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by rewrite inE => /and3P[].
(* Goal: @ex2 (Finite.sort (group_of_finType gT)) (fun P : Finite.sort (group_of_finType gT) => is_true (@in_mem (Finite.sort (group_of_finType gT)) P (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) T)))) (fun P : Finite.sort (group_of_finType gT) => is_true (@pHall gT (nat_pred_of_nat q) (@gval gT G) (@gval gT P))) *)
by case: (Sylow_exists q G) => P sylP; exists P; rewrite // inE (p_Sylow sylP).
Qed.
End MoreSylow.
Section SomeHall.
Variable gT : finGroupType.
Implicit Types (p : nat) (pi : nat_pred) (G H K P R : {group gT}).
Lemma Hall_pJsub p pi G H P :
pi.-Hall(G) H -> p \in pi -> P \subset G -> p.-group P ->
Proof.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred pi))) (_ : 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 P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@pgroup gT (nat_pred_of_nat p) (@gval gT P))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@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 (@gval gT P) 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))))) *)
move=> hallH pi_p sPG pP.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@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 (@gval gT P) 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))))) *)
have [S sylS] := Sylow_exists p H; have sylS_G := subHall_Sylow hallH pi_p sylS.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@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 (@gval gT P) 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))))) *)
have [x Gx sPxS] := Sylow_Jsub sylS_G sPG pP; exists x => //.
(* Goal: is_true (@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 (@gval gT P) 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)))) *)
exact: subset_trans sPxS (pHall_sub sylS).
Qed.
Lemma Hall_psubJ p pi G H P :
pi.-Hall(G) H -> p \in pi -> P \subset G -> p.-group P ->
Proof.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@in_mem nat p (@mem nat nat_pred_pred pi))) (_ : 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 P))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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 (@pgroup gT (nat_pred_of_nat p) (@gval gT P))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 P))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT H) x))))) *)
move=> hallH pi_p sPG pP; have [x Gx sPxH] := Hall_pJsub hallH pi_p sPG pP.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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 P))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT H) x))))) *)
by exists x^-1; rewrite ?groupV -?sub_conjg.
Qed.
Lemma Hall_setI_normal pi G K H :
K <| G -> pi.-Hall(G) H -> pi.-Hall(K) (H :&: K).
Lemma coprime_mulG_setI_norm H G K R :
K * R = G -> G \subset 'N(H) -> coprime #|K| #|R| ->
(K :&: H) * (R :&: H) = G :&: H.
Proof.
(* Goal: forall (_ : @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT G)) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R)))))), @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT H))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H)) *)
move=> defG nHG coKR; apply/eqP; rewrite eqEcard mulG_subG /= -defG.
(* Goal: is_true (andb (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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H)))))) (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H))))) (@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)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT H)))))))) *)
rewrite !setSI ?mulG_subl ?mulG_subr //=.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H))))) (@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)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT H))))))) *)
rewrite coprime_cardMg ?(coKR, coprimeSg (subsetIl _ _), coprime_sym) //=.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H))))) (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT H))))))) *)
pose pi := \pi(K); have piK: pi.-group K by apply: pgroup_pi.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H))))) (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT H))))))) *)
have pi'R: pi^'.-group R by rewrite /pgroup -coprime_pi' /=.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H))))) (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT H))))))) *)
have [hallK hallR] := coprime_mulpG_Hall defG piK pi'R.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H))))) (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT H))))))) *)
have nsHG: H :&: G <| G by rewrite /normal subsetIr normsI ?normG.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT K) (@gval gT R)) (@gval gT H))))) (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT H))))))) *)
rewrite -!(setIC H) defG -(partnC pi (cardG_gt0 _)).
(* Goal: is_true (leq (muln (partn (@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 (@setI_group gT H G))))) pi) (partn (@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 (@setI_group gT H G))))) (negn pi))) (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT K))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT R))))))) *)
rewrite -(card_Hall (Hall_setI_normal nsHG hallR)) /= setICA.
(* Goal: is_true (leq (muln (partn (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT G))))) pi) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT G))))))) (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT K))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT R))))))) *)
rewrite -(card_Hall (Hall_setI_normal nsHG hallK)) /= setICA.
(* Goal: is_true (leq (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT G)))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT R) (@gval gT G))))))) (muln (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT K))))) (@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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT R))))))) *)
by rewrite -defG (setIidPl (mulG_subl _ _)) (setIidPl (mulG_subr _ _)).
Qed.
End SomeHall.
Section Nilpotent.
Variable gT : finGroupType.
Implicit Types (G H K P L : {group gT}) (p q : nat).
Lemma pgroup_nil p P : p.-group P -> nilpotent P.
Proof.
(* Goal: forall _ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P)), is_true (@nilpotent gT (@gval gT P)) *)
move: {2}_.+1 (ltnSn #|P|) => n.
(* Goal: forall (_ : is_true (leq (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT P))))) n)) (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P))), is_true (@nilpotent gT (@gval gT P)) *)
elim: n gT P => // n IHn pT P; rewrite ltnS=> lePn pP.
(* Goal: is_true (@nilpotent pT (@gval pT P)) *)
have [Z1 | ntZ] := eqVneq 'Z(P) 1.
(* Goal: is_true (@nilpotent pT (@gval pT P)) *)
(* Goal: is_true (@nilpotent pT (@gval pT P)) *)
by rewrite (trivg_center_pgroup pP Z1) nilpotent1.
(* Goal: is_true (@nilpotent pT (@gval pT P)) *)
rewrite -quotient_center_nil IHn ?morphim_pgroup // (leq_trans _ lePn) //.
(* Goal: is_true (leq (S (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType pT (@center pT (@gval pT P))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType pT (@center pT (@gval pT P)))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType pT (@center pT (@gval pT P))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType pT (@center pT (@gval pT P))))) (@gval (@coset_groupType pT (@center pT (@gval pT P))) (@quotient_group pT P (@center pT (@gval pT P)))))))) (@card (FinGroup.arg_finType (FinGroup.base pT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base pT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base pT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base pT)) (@gval pT P))))) *)
rewrite card_quotient ?normal_norm ?center_normal // -divgS ?subsetIl //.
(* Goal: is_true (leq (S (divn (@card (FinGroup.arg_finType (FinGroup.base pT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base pT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base pT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base pT)) (@gval pT P)))) (@card (FinGroup.arg_finType (FinGroup.base pT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base pT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base pT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base pT)) (@gval pT (@center_group pT P))))))) (@card (FinGroup.arg_finType (FinGroup.base pT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base pT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base pT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base pT)) (@gval pT P))))) *)
by rewrite ltn_Pdiv // ltnNge -trivg_card_le1.
Qed.
Lemma pgroup_sol p P : p.-group P -> solvable P.
Proof.
(* Goal: forall _ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P)), is_true (@solvable gT (@gval gT P)) *)
by move/pgroup_nil; apply: nilpotent_sol.
Qed.
Lemma small_nil_class G : nil_class G <= 5 -> nilpotent G.
Proof.
(* Goal: forall _ : is_true (leq (@nil_class gT (@gval gT G)) (S (S (S (S (S O)))))), is_true (@nilpotent gT (@gval gT G)) *)
move=> leK5; case: (ltnP 5 #|G|) => [lt5G | leG5 {leK5}].
(* Goal: is_true (@nilpotent gT (@gval gT G)) *)
(* Goal: is_true (@nilpotent gT (@gval gT G)) *)
by rewrite nilpotent_class (leq_ltn_trans leK5).
(* Goal: is_true (@nilpotent gT (@gval gT G)) *)
apply: pgroup_nil (pdiv #|G|) _ _; apply/andP; split=> //.
(* Goal: is_true (@all nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat nat_pred_pred (nat_pred_of_nat (pdiv (@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))))))))) (primes (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) *)
by case: #|G| leG5 => //; do 5!case=> //.
Qed.
Lemma nil_class2 G : (nil_class G <= 2) = (G^`(1) \subset 'Z(G)).
Proof.
(* Goal: @eq bool (leq (@nil_class gT (@gval gT G)) (S (S O))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) *)
rewrite subsetI der_sub; apply/idP/commG1P=> [clG2 | L3G1].
(* Goal: is_true (leq (@nil_class gT (@gval gT G)) (S (S O))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT (@derived_at (S O) gT (@gval gT G)) (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by apply/(lcn_nil_classP 2); rewrite ?small_nil_class ?(leq_trans clG2).
(* Goal: is_true (leq (@nil_class gT (@gval gT G)) (S (S O))) *)
by apply/(lcn_nil_classP 2) => //; apply/lcnP; exists 2.
Qed.
Lemma nil_class3 G : (nil_class G <= 3) = ('L_3(G) \subset 'Z(G)).
Proof.
(* Goal: @eq bool (leq (@nil_class gT (@gval gT G)) (S (S (S O)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@lower_central_at (S (S (S O))) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) *)
rewrite subsetI lcn_sub; apply/idP/commG1P=> [clG3 | L4G1].
(* Goal: is_true (leq (@nil_class gT (@gval gT G)) (S (S (S O)))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT (@lower_central_at (S (S (S O))) gT (@gval gT G)) (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by apply/(lcn_nil_classP 3); rewrite ?small_nil_class ?(leq_trans clG3).
(* Goal: is_true (leq (@nil_class gT (@gval gT G)) (S (S (S O)))) *)
by apply/(lcn_nil_classP 3) => //; apply/lcnP; exists 3.
Qed.
Lemma nilpotent_maxp_normal pi G H :
nilpotent G -> [max H | pi.-subgroup(G) H] -> H <| G.
Lemma nilpotent_Hall_pcore pi G H :
nilpotent G -> pi.-Hall(G) H -> H :=: 'O_pi(G).
Lemma nilpotent_pcore_Hall pi G : nilpotent G -> pi.-Hall(G) 'O_pi(G).
Proof.
(* Goal: forall _ : is_true (@nilpotent gT (@gval gT G)), is_true (@pHall gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *)
move=> nilG; case: (@maxgroup_exists _ (psubgroup pi G) 1) => [|H maxH _].
(* Goal: is_true (@pHall gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *)
(* Goal: is_true (@psubgroup gT pi (@gval gT G) (@gval gT (one_group gT))) *)
by rewrite /psubgroup sub1G pgroup1.
(* Goal: is_true (@pHall gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *)
have hallH := normal_max_pgroup_Hall maxH (nilpotent_maxp_normal nilG maxH).
(* Goal: is_true (@pHall gT pi (@gval gT G) (@pcore pi gT (@gval gT G))) *)
by rewrite -(nilpotent_Hall_pcore nilG hallH).
Qed.
Lemma nilpotent_pcoreC pi G : nilpotent G -> 'O_pi(G) \x 'O_pi^'(G) = G.
Proof.
(* Goal: forall _ : is_true (@nilpotent gT (@gval gT G)), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (direct_product gT (@pcore pi gT (@gval gT G)) (@pcore (negn pi) gT (@gval gT G))) (@gval gT G) *)
move=> nilG; have trO: 'O_pi(G) :&: 'O_pi^'(G) = 1.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (direct_product gT (@pcore pi gT (@gval gT G)) (@pcore (negn pi) gT (@gval gT G))) (@gval gT G) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@pcore pi gT (@gval gT G)) (@pcore (negn pi) gT (@gval gT G))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by apply: coprime_TIg; apply: (@pnat_coprime pi); apply: pcore_pgroup.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (direct_product gT (@pcore pi gT (@gval gT G)) (@pcore (negn pi) gT (@gval gT G))) (@gval gT G) *)
rewrite dprodE //.
(* 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 (@pcore_group (negn pi) 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)) (@centraliser gT (@gval gT (@pcore_group pi gT (@gval gT G))))))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT (@pcore_group pi gT (@gval gT G))) (@gval gT (@pcore_group (negn pi) gT (@gval gT G)))) (@gval gT G) *)
apply/eqP; rewrite eqEcard mul_subG ?pcore_sub // (TI_cardMg trO).
(* 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 (@pcore_group (negn pi) 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)) (@centraliser gT (@gval gT (@pcore_group pi gT (@gval gT G))))))) *)
(* Goal: is_true (andb true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@pcore_group pi gT (@gval gT G)))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@pcore_group (negn pi) gT (@gval gT G))))))))) *)
by rewrite !(card_Hall (nilpotent_pcore_Hall _ _)) // partnC ?leqnn.
(* 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 (@pcore_group (negn pi) 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)) (@centraliser gT (@gval gT (@pcore_group pi gT (@gval gT G))))))) *)
rewrite (sameP commG1P trivgP) -trO subsetI commg_subl commg_subr.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@pcore_group (negn pi) 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 (@pcore_group pi gT (@gval gT G))))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@pcore_group pi 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 (@pcore_group (negn pi) gT (@gval gT G)))))))) *)
by rewrite !gFsub_trans ?gFnorm.
Qed.
Lemma sub_nilpotent_cent2 H K G :
nilpotent G -> K \subset G -> H \subset G -> coprime #|K| #|H| ->
H \subset 'C(K).
Proof.
(* Goal: forall (_ : is_true (@nilpotent 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 K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (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 (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))), 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)) (@centraliser gT (@gval gT K))))) *)
move=> nilG sKG sHG; rewrite coprime_pi' // => p'H.
(* 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)) (@centraliser gT (@gval gT K))))) *)
have sub_Gp := sub_Hall_pcore (nilpotent_pcore_Hall _ nilG).
(* 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)) (@centraliser gT (@gval gT K))))) *)
have [_ _ cGpp' _] := dprodP (nilpotent_pcoreC \pi(K) nilG).
(* 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)) (@centraliser gT (@gval gT K))))) *)
by apply: centSS cGpp'; rewrite sub_Gp ?pgroup_pi.
Qed.
Lemma pi_center_nilpotent G : nilpotent G -> \pi('Z(G)) = \pi(G).
Proof.
(* Goal: forall _ : is_true (@nilpotent gT (@gval gT G)), @eq nat_pred (pi_of (unwrap_pi_arg (@pi_arg_of_fin_pred (FinGroup.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)))))) (pi_of (unwrap_pi_arg (@pi_arg_of_fin_pred (FinGroup.arg_finType (FinGroup.base gT)) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
move=> nilG; apply/eq_piP => /= p.
(* Goal: @eq bool (@in_mem nat p (@mem nat nat_pred_pred (pi_of (@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)) (@center gT (@gval gT G)))))))) (@in_mem nat p (@mem nat nat_pred_pred (pi_of (@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))))))) *)
apply/idP/idP=> [|pG]; first exact: (piSg (center_sub _)).
(* Goal: is_true (@in_mem nat p (@mem nat nat_pred_pred (pi_of (@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)) (@center gT (@gval gT G)))))))) *)
move: (pG); rewrite !mem_primes !cardG_gt0; case/andP=> p_pr _.
(* Goal: is_true (andb (prime p) (andb true (dvdn p (@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)) (@center gT (@gval gT G)))))))) *)
pose Z := 'O_p(G) :&: 'Z(G); have ntZ: Z != 1.
(* Goal: is_true (andb (prime p) (andb true (dvdn p (@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)) (@center gT (@gval gT G)))))))) *)
(* Goal: is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) Z (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) *)
rewrite meet_center_nil ?pcore_normal // trivg_card_le1 -ltnNge.
(* Goal: is_true (andb (prime p) (andb true (dvdn p (@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)) (@center gT (@gval gT G)))))))) *)
(* Goal: is_true (leq (S (S O)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@pcore_group (nat_pred_of_nat p) gT (@gval gT G))))))) *)
rewrite (card_Hall (nilpotent_pcore_Hall p nilG)) p_part.
(* Goal: is_true (andb (prime p) (andb true (dvdn p (@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)) (@center gT (@gval gT G)))))))) *)
(* Goal: is_true (leq (S (S O)) (expn p (logn p (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) *)
by rewrite (ltn_exp2l 0 _ (prime_gt1 p_pr)) logn_gt0.
(* Goal: is_true (andb (prime p) (andb true (dvdn p (@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)) (@center gT (@gval gT G)))))))) *)
have pZ: p.-group Z := pgroupS (subsetIl _ _) (pcore_pgroup _ _).
(* Goal: is_true (andb (prime p) (andb true (dvdn p (@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)) (@center gT (@gval gT G)))))))) *)
have{ntZ pZ} [_ pZ _] := pgroup_pdiv pZ ntZ.
(* Goal: is_true (andb (prime p) (andb true (dvdn p (@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)) (@center gT (@gval gT G)))))))) *)
by rewrite p_pr (dvdn_trans pZ) // cardSg ?subsetIr.
Qed.
Lemma Sylow_subnorm p G P : p.-Sylow('N_G(P)) P = p.-Sylow(G) P.
End Nilpotent.
Lemma nil_class_pgroup (gT : finGroupType) (p : nat) (P : {group gT}) :
p.-group P -> nil_class P <= maxn 1 (logn p #|P|).-1.
Definition Zgroup (gT : finGroupType) (A : {set gT}) :=
[forall (V : {group gT} | Sylow A V), cyclic V].
Section Zgroups.
Variables (gT rT : finGroupType) (D : {group gT}) (f : {morphism D >-> rT}).
Implicit Types G H K : {group gT}.
Lemma ZgroupS G H : H \subset G -> Zgroup G -> Zgroup H.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@Zgroup gT (@gval gT G))), is_true (@Zgroup gT (@gval gT H)) *)
move=> sHG /forallP zgG; apply/forall_inP=> V /SylowP[p p_pr /and3P[sVH]].
(* Goal: forall (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT V))) (_ : is_true (pnat (negn (nat_pred_of_nat p)) (@indexg gT (@gval gT H) (@gval gT V)))), is_true (@cyclic gT (@gval gT V)) *)
case/(Sylow_superset (subset_trans sVH sHG))=> P sylP sVP _.
(* Goal: is_true (@cyclic gT (@gval gT V)) *)
by have:= zgG P; rewrite (p_Sylow sylP); apply: cyclicS.
Qed.
Lemma morphim_Zgroup G : Zgroup G -> Zgroup (f @* G).
Proof.
(* Goal: forall _ : is_true (@Zgroup gT (@gval gT G)), is_true (@Zgroup rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *)
move=> zgG; wlog sGD: G zgG / G \subset D.
(* Goal: is_true (@Zgroup rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *)
(* Goal: forall _ : forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@Zgroup gT (@gval gT G))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D))))), is_true (@Zgroup rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))), is_true (@Zgroup rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *)
by rewrite -morphimIdom; apply; rewrite (ZgroupS _ zgG, subsetIl) ?subsetIr.
(* Goal: is_true (@Zgroup rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *)
apply/forall_inP=> fV /SylowP[p pr_p sylfV].
(* Goal: is_true (@cyclic rT (@gval rT fV)) *)
have [P sylP] := Sylow_exists p G.
(* Goal: is_true (@cyclic rT (@gval rT fV)) *)
have [|z _ ->] := @Sylow_trans p _ _ (f @* P)%G _ _ sylfV.
(* Goal: is_true (@cyclic rT (@conjugate rT (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) P)) z)) *)
(* Goal: is_true (@pHall rT (nat_pred_of_nat p) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) G)) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) P))) *)
by apply: morphim_pHall (sylP); apply: subset_trans (pHall_sub sylP) sGD.
(* Goal: is_true (@cyclic rT (@conjugate rT (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) P)) z)) *)
by rewrite cyclicJ morphim_cyclic ?(forall_inP zgG) //; apply/SylowP; exists p.
Qed.
Lemma nil_Zgroup_cyclic G : Zgroup G -> nilpotent G -> cyclic G.
Proof.
(* Goal: forall (_ : is_true (@Zgroup gT (@gval gT G))) (_ : is_true (@nilpotent gT (@gval gT G))), is_true (@cyclic gT (@gval gT G)) *)
elim: {G}_.+1 {-2}G (ltnSn #|G|) => // n IHn G; rewrite ltnS => leGn ZgG nilG.
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
have [->|[p pr_p pG]] := trivgVpdiv G; first by rewrite -cycle1 cycle_cyclic.
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
have /dprodP[_ defG Cpp' _] := nilpotent_pcoreC p nilG.
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
have /cyclicP[x def_p]: cyclic 'O_p(G).
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
(* Goal: is_true (@cyclic gT (@pcore (nat_pred_of_nat p) gT (@gval gT G))) *)
have:= forallP ZgG 'O_p(G)%G.
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
(* Goal: forall _ : is_true (implb (@Sylow gT (@gval gT G) (@gval gT (@pcore_group (nat_pred_of_nat p) gT (@gval gT G)))) (@cyclic gT (@gval gT (@pcore_group (nat_pred_of_nat p) gT (@gval gT G))))), is_true (@cyclic gT (@pcore (nat_pred_of_nat p) gT (@gval gT G))) *)
by rewrite (p_Sylow (nilpotent_pcore_Hall p nilG)).
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
have /cyclicP[x' def_p']: cyclic 'O_p^'(G).
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
(* Goal: is_true (@cyclic gT (@pcore (negn (nat_pred_of_nat p)) gT (@gval gT G))) *)
have sp'G := pcore_sub p^' G.
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
(* Goal: is_true (@cyclic gT (@pcore (negn (nat_pred_of_nat p)) gT (@gval gT G))) *)
apply: IHn (leq_trans _ leGn) (ZgroupS sp'G _) (nilpotentS sp'G _) => //.
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
(* Goal: is_true (leq (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@pcore_group (negn (nat_pred_of_nat p)) gT (@gval gT G))))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
rewrite proper_card // properEneq sp'G andbT; case: eqP => //= def_p'.
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
(* Goal: is_true false *)
by have:= pcore_pgroup p^' G; rewrite def_p' /pgroup p'natE ?pG.
(* Goal: is_true (@cyclic gT (@gval gT G)) *)
apply/cyclicP; exists (x * x'); rewrite -{}defG def_p def_p' cycleM //.
(* Goal: is_true (coprime (@order gT x) (@order gT x')) *)
(* Goal: @commute (FinGroup.base gT) x x' *)
by red; rewrite -(centsP Cpp') // (def_p, def_p') cycle_id.
(* Goal: is_true (coprime (@order gT x) (@order gT x')) *)
by rewrite /order -def_p -def_p' (@pnat_coprime p) //; apply: pcore_pgroup.
Qed.
End Zgroups.
Arguments Zgroup {gT} A%g.
Section NilPGroups.
Variables (p : nat) (gT : finGroupType).
Implicit Type G P N : {group gT}.
Lemma normal_pgroup r P N :
p.-group P -> N <| P -> r <= logn p #|N| ->
Proof.
(* Goal: forall (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT P))) (_ : is_true (@normal gT (@gval gT N) (@gval gT P))) (_ : is_true (leq r (logn p (@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 N))))))), @ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun Q : @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 Q))) (@mem (Finite.sort (FinGroup.arg_finType (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 (@normal gT (@gval gT Q) (@gval gT P))) (@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 Q)))) (expn p r))) *)
elim: r gT P N => [|r IHr] gTr P N pP nNP le_r.
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p O))) *)
by exists (1%G : {group gTr}); rewrite sub1G normal1 cards1.
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
have [NZ_1 | ntNZ] := eqVneq (N :&: 'Z(P)) 1.
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
by rewrite (TI_center_nil (pgroup_nil pP)) // cards1 logn1 in le_r.
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
have: p.-group (N :&: 'Z(P)) by apply: pgroupS pP; rewrite /= setICA subsetIl.
(* Goal: forall _ : is_true (@pgroup gTr (nat_pred_of_nat p) (@setI (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N) (@center gTr (@gval gTr P)))), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
case/pgroup_pdiv=> // p_pr /Cauchy[// | z].
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr (@setI_group gTr N (@center_group gTr P))))))) (_ : @eq nat (@order gTr z) p) (_ : @ex nat (fun m : nat => @eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr (@setI_group gTr N (@center_group gTr P)))))) (expn p (S m)))), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
rewrite -cycle_subG !subsetI => /and3P[szN szP cPz] ozp _.
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
have{cPz} nzP: P \subset 'N(<[z]>) by rewrite cents_norm // centsC.
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
have: N / <[z]> <| P / <[z]> by rewrite morphim_normal.
(* Goal: forall _ : is_true (@normal (@coset_groupType gTr (@cycle gTr z)) (@quotient gTr (@gval gTr N) (@cycle gTr z)) (@quotient gTr (@gval gTr P) (@cycle gTr z))), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
case/IHr=> [||Qb [sQNb nQPb]]; first exact: morphim_pgroup.
(* Goal: forall _ : @eq nat (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@gval (@coset_groupType gTr (@cycle gTr z)) Qb)))) (expn p r), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
(* Goal: is_true (leq r (logn p (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@gval (@coset_groupType gTr (@cycle gTr z)) (@quotient_group gTr N (@cycle gTr z)))))))) *)
rewrite card_quotient ?(subset_trans (normal_sub nNP)) // -ltnS.
(* Goal: forall _ : @eq nat (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@gval (@coset_groupType gTr (@cycle gTr z)) Qb)))) (expn p r), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
(* Goal: is_true (leq (S r) (S (logn p (@indexg gTr (@gval gTr N) (@gval gTr (@cycle_group gTr z)))))) *)
apply: (leq_trans le_r); rewrite -(Lagrange szN) [#|_|]ozp.
(* Goal: forall _ : @eq nat (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@gval (@coset_groupType gTr (@cycle gTr z)) Qb)))) (expn p r), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
(* Goal: is_true (leq (logn p (muln p (@indexg gTr (@gval gTr N) (@gval gTr (@cycle_group gTr z))))) (S (logn p (@indexg gTr (@gval gTr N) (@gval gTr (@cycle_group gTr z)))))) *)
by rewrite lognM // ?prime_gt0 // logn_prime ?eqxx.
(* Goal: forall _ : @eq nat (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@gval (@coset_groupType gTr (@cycle gTr z)) Qb)))) (expn p r), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
case/(inv_quotientN _): nQPb sQNb => [|Q -> szQ nQP]; first exact/andP.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@quotient gTr (@gval gTr Q) (@gval gTr (@cycle_group gTr z))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@gval (@coset_groupType gTr (@cycle gTr z)) (@quotient_group gTr N (@cycle gTr z))))))) (_ : @eq nat (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@quotient gTr (@gval gTr Q) (@gval gTr (@cycle_group gTr z)))))) (expn p r)), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
have nzQ := subset_trans (normal_sub nQP) nzP.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@quotient gTr (@gval gTr Q) (@gval gTr (@cycle_group gTr z))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@gval (@coset_groupType gTr (@cycle gTr z)) (@quotient_group gTr N (@cycle gTr z))))))) (_ : @eq nat (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gTr (@cycle gTr z)))) (@quotient gTr (@gval gTr Q) (@gval gTr (@cycle_group gTr z)))))) (expn p r)), @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
rewrite quotientSGK // card_quotient // => sQN izQ.
(* Goal: @ex (@group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr)))) (fun Q : @group_of gTr (Phant (FinGroup.arg_sort (FinGroup.base gTr))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr N))))) (is_true (@normal gTr (@gval gTr Q) (@gval gTr P))) (@eq nat (@card (FinGroup.arg_finType (FinGroup.base gTr)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTr)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTr)) (@gval gTr Q)))) (expn p (S r)))) *)
by exists Q; split=> //; rewrite expnS -izQ -ozp Lagrange.
Qed.
Theorem Baer_Suzuki x G :
x \in G -> (forall y, y \in G -> p.-group <<[set x; x ^ y]>>) ->
End NilPGroups.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun ssrnat eqtype seq choice div fintype.
From mathcomp
Require Import path bigop finset prime ssralg poly polydiv mxpoly.
From mathcomp
Require Import generic_quotient countalg closed_field ssrnum ssrint rat intdiv.
From mathcomp
Require Import algebraics_fundamentals.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GRing.Theory Num.Theory.
Local Open Scope ring_scope.
Lemma ComplexNumMixin (L : closedFieldType) (conj : {rmorphism L -> L}) :
involutive conj -> ~ conj =1 id ->
{numL | forall x : NumDomainType L numL, `|x| ^+ 2 = x * conj x}.
Module Algebraics.
Module Type Specification.
Parameter type : Type.
Parameter eqMixin : Equality.class_of type.
Canonical eqType := EqType type eqMixin.
Parameter choiceMixin : Choice.mixin_of type.
Canonical choiceType := ChoiceType type choiceMixin.
Parameter countMixin : Countable.mixin_of type.
Canonical countType := CountType type countMixin.
Parameter zmodMixin : GRing.Zmodule.mixin_of type.
Canonical zmodType := ZmodType type zmodMixin.
Canonical countZmodType := [countZmodType of type].
Parameter ringMixin : GRing.Ring.mixin_of zmodType.
Canonical ringType := RingType type ringMixin.
Canonical countRingType := [countRingType of type].
Parameter unitRingMixin : GRing.UnitRing.mixin_of ringType.
Canonical unitRingType := UnitRingType type unitRingMixin.
Axiom mulC : @commutative ringType ringType *%R.
Canonical comRingType := ComRingType type mulC.
Canonical comUnitRingType := [comUnitRingType of type].
Axiom idomainAxiom : GRing.IntegralDomain.axiom ringType.
Canonical idomainType := IdomainType type idomainAxiom.
Axiom fieldMixin : GRing.Field.mixin_of unitRingType.
Canonical fieldType := FieldType type fieldMixin.
Parameter decFieldMixin : GRing.DecidableField.mixin_of unitRingType.
Canonical decFieldType := DecFieldType type decFieldMixin.
Axiom closedFieldAxiom : GRing.ClosedField.axiom ringType.
Canonical closedFieldType := ClosedFieldType type closedFieldAxiom.
Parameter numMixin : Num.mixin_of ringType.
Canonical numDomainType := NumDomainType type numMixin.
Canonical numFieldType := [numFieldType of type].
Parameter conjMixin : Num.ClosedField.imaginary_mixin_of numDomainType.
Canonical numClosedFieldType := NumClosedFieldType type conjMixin.
Axiom algebraic : integralRange (@ratr unitRingType).
End Specification.
Module Implementation : Specification.
Definition L := tag Fundamental_Theorem_of_Algebraics.
Definition conjL : {rmorphism L -> L} :=
s2val (tagged Fundamental_Theorem_of_Algebraics).
Fact conjL_K : involutive conjL.
Proof.
(* Goal: @involutive (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ClosedField.ringType L))) (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL) *)
exact: s2valP (tagged Fundamental_Theorem_of_Algebraics).
Qed.
Fact conjL_nt : ~ conjL =1 id.
Proof.
(* Goal: not (@eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ClosedField.ringType L))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ClosedField.ringType L))) (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ClosedField.ringType L)) => x)) *)
exact: s2valP' (tagged Fundamental_Theorem_of_Algebraics).
Qed.
Definition LnumMixin := ComplexNumMixin conjL_K conjL_nt.
Definition Lnum := NumDomainType L (sval LnumMixin).
Definition QtoL := [rmorphism of @ratr [numFieldType of Lnum]].
Notation pQtoL := (map_poly QtoL).
Definition rootQtoL p_j :=
if p_j.1 == 0 then 0 else
(sval (closed_field_poly_normal (pQtoL p_j.1)))`_p_j.2.
Definition eq_root p_j q_k := rootQtoL p_j == rootQtoL q_k.
Fact eq_root_is_equiv : equiv_class_of eq_root.
Proof.
(* Goal: @equiv_class_of (prod (Equality.sort (GRing.Zmodule.eqType (poly_zmodType rat_Ring))) nat) eq_root *)
by rewrite /eq_root; split=> [ ? | ? ? | ? ? ? ] // /eqP->.
Qed.
Canonical eq_root_equiv := EquivRelPack eq_root_is_equiv.
Definition type : Type := {eq_quot eq_root}%qT.
Definition eqMixin : Equality.class_of type := EquivQuot.eqMixin _.
Canonical eqType := EqType type eqMixin.
Definition choiceMixin : Choice.mixin_of type := EquivQuot.choiceMixin _.
Canonical choiceType := ChoiceType type choiceMixin.
Definition countMixin : Countable.mixin_of type := CanCountMixin reprK.
Canonical countType := CountType type countMixin.
Definition CtoL (u : type) := rootQtoL (repr u).
Fact CtoL_inj : injective CtoL.
Proof.
(* Goal: @injective (GRing.Zmodule.sort (GRing.ClosedField.zmodType L)) type CtoL *)
by move=> u v /eqP eq_uv; rewrite -[u]reprK -[v]reprK; apply/eqmodP.
Qed.
Fact CtoL_P u : integralOver QtoL (CtoL u).
Proof.
(* Goal: @integralOver rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (@GRing.RMorphism.apply rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (Phant (forall _ : GRing.Ring.sort rat_Ring, GRing.Ring.sort (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))))) QtoL) (CtoL u) *)
rewrite /CtoL /rootQtoL; case: (repr u) => p j /=.
(* Goal: @integralOver rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (if @eq_op (GRing.Zmodule.eqType (poly_zmodType rat_Ring)) p (GRing.zero (poly_zmodType rat_Ring)) then GRing.zero (GRing.ClosedField.zmodType L) else @nth (GRing.ClosedField.sort L) (GRing.zero (GRing.ClosedField.zmodType L)) (@proj1_sig (list (GRing.ClosedField.sort L)) (fun r : list (GRing.ClosedField.sort L) => @eq (@poly_of (GRing.ClosedField.ringType L) (Phant (GRing.ClosedField.sort L))) (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) p) (@GRing.scale (GRing.ClosedField.ringType L) (@GRing.Lalgebra.lmod_ringType (GRing.ClosedField.ringType L) (Phant (GRing.ClosedField.sort L)) (poly_lalgType (GRing.ClosedField.ringType L))) (@lead_coef (GRing.ClosedField.ringType L) (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) p)) (@BigOp.bigop (@poly_of (GRing.ClosedField.ringType L) (Phant (GRing.ClosedField.sort L))) (GRing.ClosedField.sort L) (GRing.one (poly_ringType (GRing.ClosedField.ringType L))) r (fun z : GRing.ClosedField.sort L => @BigBody (@poly_of (GRing.ClosedField.ringType L) (Phant (GRing.ClosedField.sort L))) (GRing.ClosedField.sort L) z (@GRing.mul (poly_ringType (GRing.ClosedField.ringType L))) true (@GRing.add (poly_zmodType (GRing.ClosedField.ringType L)) (polyX (GRing.ClosedField.ringType L)) (@GRing.opp (poly_zmodType (GRing.ClosedField.ringType L)) (@polyC (GRing.ClosedField.ringType L) z))))))) (@closed_field_poly_normal L (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let ' @GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) p))) j) *)
case: (closed_field_poly_normal _) => r Dp /=.
(* Goal: @integralOver rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (if @eq_op (GRing.Zmodule.eqType (poly_zmodType rat_Ring)) p (GRing.zero (poly_zmodType rat_Ring)) then GRing.zero (GRing.ClosedField.zmodType L) else @nth (GRing.ClosedField.sort L) (GRing.zero (GRing.ClosedField.zmodType L)) r j) *)
case: ifPn => [_ | nz_p]; first exact: integral0.
(* Goal: @integralOver rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@nth (GRing.ClosedField.sort L) (GRing.zero (GRing.ClosedField.zmodType L)) r j) *)
have [/(nth_default 0)-> | lt_j_r] := leqP (size r) j; first exact: integral0.
(* Goal: @integralOver rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@nth (GRing.ClosedField.sort L) (GRing.zero (GRing.ClosedField.zmodType L)) r j) *)
apply/integral_algebraic; exists p; rewrite // Dp -mul_polyC rootM orbC.
(* Goal: is_true (orb (@root (GRing.IntegralDomain.ringType (GRing.Field.idomainType (Num.NumField.fieldType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.ClosedField.ringType L))) (GRing.ClosedField.sort L) (GRing.one (poly_ringType (GRing.ClosedField.ringType L))) r (fun z : GRing.ClosedField.sort L => @BigBody (GRing.Ring.sort (poly_ringType (GRing.ClosedField.ringType L))) (GRing.ClosedField.sort L) z (@GRing.mul (poly_ringType (GRing.ClosedField.ringType L))) true (@GRing.add (poly_zmodType (GRing.ClosedField.ringType L)) (polyX (GRing.ClosedField.ringType L)) (@GRing.opp (poly_zmodType (GRing.ClosedField.ringType L)) (@polyC (GRing.ClosedField.ringType L) z))))) (@nth (GRing.ClosedField.sort L) (GRing.zero (GRing.ClosedField.zmodType L)) r j)) (@root (GRing.IntegralDomain.ringType (GRing.Field.idomainType (Num.NumField.fieldType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let ' @GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x))))) (@polyC (GRing.ClosedField.ringType L) (@lead_coef (GRing.ClosedField.ringType L) (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) p))) (@nth (GRing.ClosedField.sort L) (GRing.zero (GRing.ClosedField.zmodType L)) r j))) *)
by rewrite root_prod_XsubC mem_nth.
Qed.
Fact LtoC_subproof z : integralOver QtoL z -> {u | CtoL u = z}.
Proof.
(* Goal: forall _ : @integralOver rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (@GRing.RMorphism.apply rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (Phant (forall _ : GRing.Ring.sort rat_Ring, GRing.Ring.sort (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))))) QtoL) z, @sig type (fun u : type => @eq (GRing.Zmodule.sort (GRing.ClosedField.zmodType L)) (CtoL u) z) *)
case/sig2_eqW=> p mon_p pz0; rewrite /CtoL.
(* Goal: @sig type (fun u : type => @eq (GRing.Zmodule.sort (GRing.ClosedField.zmodType L)) (rootQtoL (@Repr.f (prod (Equality.sort (GRing.Zmodule.eqType (poly_zmodType rat_Ring))) nat) (@EquivQuot.quotType (prod (Equality.sort (GRing.Zmodule.eqType (poly_zmodType rat_Ring))) nat) (prod_choiceType (GRing.Zmodule.choiceType (poly_zmodType rat_Ring)) nat_choiceType) (fun x : Choice.sort (prod_choiceType (GRing.Zmodule.choiceType (poly_zmodType rat_Ring)) nat_choiceType) => x) (fun x : Choice.sort (prod_choiceType (GRing.Zmodule.choiceType (poly_zmodType rat_Ring)) nat_choiceType) => x) eq_root_equiv (@defaultEncModRel (prod_choiceType (GRing.Zmodule.choiceType (poly_zmodType rat_Ring)) nat_choiceType) eq_root)) u)) z) *)
pose j := index z (sval (closed_field_poly_normal (pQtoL p))).
(* Goal: @sig type (fun u : type => @eq (GRing.Zmodule.sort (GRing.ClosedField.zmodType L)) (rootQtoL (@Repr.f (prod (Equality.sort (GRing.Zmodule.eqType (poly_zmodType rat_Ring))) nat) (@EquivQuot.quotType (prod (Equality.sort (GRing.Zmodule.eqType (poly_zmodType rat_Ring))) nat) (prod_choiceType (GRing.Zmodule.choiceType (poly_zmodType rat_Ring)) nat_choiceType) (fun x : Choice.sort (prod_choiceType (GRing.Zmodule.choiceType (poly_zmodType rat_Ring)) nat_choiceType) => x) (fun x : Choice.sort (prod_choiceType (GRing.Zmodule.choiceType (poly_zmodType rat_Ring)) nat_choiceType) => x) eq_root_equiv (@defaultEncModRel (prod_choiceType (GRing.Zmodule.choiceType (poly_zmodType rat_Ring)) nat_choiceType) eq_root)) u)) z) *)
pose u := \pi_type%qT (p, j); exists u; have /eqmodP/eqP-> := reprK u.
(* Goal: @eq (GRing.Zmodule.sort (GRing.ClosedField.zmodType L)) (rootQtoL (@pair (Choice.sort (poly_choiceType rat_Ring)) nat p j)) z *)
rewrite /rootQtoL -if_neg monic_neq0 //; apply: nth_index => /=.
(* Goal: is_true (@in_mem (GRing.ClosedField.sort L) z (@mem (GRing.ClosedField.sort L) (seq_predType (GRing.Zmodule.eqType (GRing.ClosedField.zmodType L))) (@proj1_sig (list (GRing.ClosedField.sort L)) (fun r : list (GRing.ClosedField.sort L) => @eq (@poly_of (GRing.ClosedField.ringType L) (Phant (GRing.ClosedField.sort L))) (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) p) (@GRing.scale (GRing.ClosedField.ringType L) (@GRing.Lalgebra.lmod_ringType (GRing.ClosedField.ringType L) (Phant (GRing.ClosedField.sort L)) (poly_lalgType (GRing.ClosedField.ringType L))) (@lead_coef (GRing.ClosedField.ringType L) (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) p)) (@BigOp.bigop (@poly_of (GRing.ClosedField.ringType L) (Phant (GRing.ClosedField.sort L))) (GRing.ClosedField.sort L) (GRing.one (poly_ringType (GRing.ClosedField.ringType L))) r (fun z : GRing.ClosedField.sort L => @BigBody (@poly_of (GRing.ClosedField.ringType L) (Phant (GRing.ClosedField.sort L))) (GRing.ClosedField.sort L) z (@GRing.mul (poly_ringType (GRing.ClosedField.ringType L))) true (@GRing.add (poly_zmodType (GRing.ClosedField.ringType L)) (polyX (GRing.ClosedField.ringType L)) (@GRing.opp (poly_zmodType (GRing.ClosedField.ringType L)) (@polyC (GRing.ClosedField.ringType L) z))))))) (@closed_field_poly_normal L (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) (@ratr (Num.NumField.unitRingType (@Num.NumField.pack (GRing.ClosedField.sort L) (GRing.ClosedField.fieldType L) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) (fun x : phantom (GRing.Field.class_of (GRing.ClosedField.sort L)) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (GRing.ClosedField.sort L)) (@Num.NumDomain.Class (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))))))) => forall x : GRing.ClosedField.sort L, @eq (GRing.ClosedField.sort L) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))) numL (GRing.ClosedField.idomainType L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.ClosedField.sort L)) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L)))) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (@GRing.Field.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.DecidableField.base (let '@GRing.ClosedField.Pack T c := L in T) (@GRing.ClosedField.base (let '@GRing.ClosedField.Pack T c := L in T) (GRing.ClosedField.class L))))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin)) => x)))) p))))) *)
case: (closed_field_poly_normal _) => r /= Dp.
(* Goal: is_true (@in_mem (GRing.ClosedField.sort L) z (@mem (GRing.ClosedField.sort L) (seq_predType (GRing.Zmodule.eqType (GRing.ClosedField.zmodType L))) r)) *)
by rewrite Dp (monicP _) ?(monic_map QtoL) // scale1r root_prod_XsubC in pz0.
Qed.
Definition LtoC z Az := sval (@LtoC_subproof z Az).
Fact LtoC_K z Az : CtoL (@LtoC z Az) = z.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.ClosedField.zmodType L)) (CtoL (@LtoC z Az)) z *)
exact: (svalP (LtoC_subproof Az)).
Qed.
Fact CtoL_K u : LtoC (CtoL_P u) = u.
Proof.
(* Goal: @eq type (@LtoC (CtoL u) (CtoL_P u)) u *)
by apply: CtoL_inj; rewrite LtoC_K.
Qed.
Definition zero := LtoC (integral0 _).
Definition add u v := LtoC (integral_add (CtoL_P u) (CtoL_P v)).
Definition opp u := LtoC (integral_opp (CtoL_P u)).
Fact addA : associative add.
Proof.
(* Goal: @associative type add *)
by move=> u v w; apply: CtoL_inj; rewrite !LtoC_K addrA.
Qed.
Fact addC : commutative add.
Proof.
(* Goal: @commutative type type add *)
by move=> u v; apply: CtoL_inj; rewrite !LtoC_K addrC.
Qed.
Fact add0 : left_id zero add.
Proof.
(* Goal: @left_id type type zero add *)
by move=> u; apply: CtoL_inj; rewrite !LtoC_K add0r.
Qed.
Fact addN : left_inverse zero opp add.
Proof.
(* Goal: @left_inverse type type type zero opp add *)
by move=> u; apply: CtoL_inj; rewrite !LtoC_K addNr.
Qed.
Definition zmodMixin := ZmodMixin addA addC add0 addN.
Canonical zmodType := ZmodType type zmodMixin.
Canonical countZmodType := [countZmodType of type].
Fact CtoL_is_additive : additive CtoL.
Proof.
(* Goal: @GRing.Additive.axiom zmodType (GRing.ClosedField.zmodType L) CtoL *)
by move=> u v; rewrite !LtoC_K.
Qed.
Canonical CtoL_additive := Additive CtoL_is_additive.
Definition one := LtoC (integral1 _).
Definition mul u v := LtoC (integral_mul (CtoL_P u) (CtoL_P v)).
Definition inv u := LtoC (integral_inv (CtoL_P u)).
Fact mulA : associative mul.
Proof.
(* Goal: @associative type mul *)
by move=> u v w; apply: CtoL_inj; rewrite !LtoC_K mulrA.
Qed.
Fact mulC : commutative mul.
Proof.
(* Goal: @commutative type type mul *)
by move=> u v; apply: CtoL_inj; rewrite !LtoC_K mulrC.
Qed.
Fact mul1 : left_id one mul.
Proof.
(* Goal: @left_id type type one mul *)
by move=> u; apply: CtoL_inj; rewrite !LtoC_K mul1r.
Qed.
Fact mulD : left_distributive mul +%R.
Proof.
(* Goal: @left_distributive type type mul (@GRing.add zmodType) *)
by move=> u v w; apply: CtoL_inj; rewrite !LtoC_K mulrDl.
Qed.
Fact one_nz : one != 0 :> type.
Proof.
(* Goal: is_true (negb (@eq_op eqType (one : type) (GRing.zero zmodType : type))) *)
by rewrite -(inj_eq CtoL_inj) !LtoC_K oner_eq0.
Qed.
Definition ringMixin := ComRingMixin mulA mulC mul1 mulD one_nz.
Canonical ringType := RingType type ringMixin.
Canonical comRingType := ComRingType type mulC.
Canonical countRingType := [countRingType of type].
Fact CtoL_is_multiplicative : multiplicative CtoL.
Proof.
(* Goal: @GRing.RMorphism.mixin_of ringType (GRing.ClosedField.ringType L) CtoL *)
by split=> [u v|]; rewrite !LtoC_K.
Qed.
Canonical CtoL_rmorphism := AddRMorphism CtoL_is_multiplicative.
Fact mulVf : GRing.Field.axiom inv.
Proof.
(* Goal: @GRing.Field.axiom ringType inv *)
move=> u; rewrite -(inj_eq CtoL_inj) rmorph0 => nz_u.
(* Goal: @eq (GRing.Ring.sort ringType) (@GRing.mul ringType (inv u) u) (GRing.one ringType) *)
by apply: CtoL_inj; rewrite !LtoC_K mulVf.
Qed.
Definition unitRingMixin := FieldUnitMixin mulVf inv0.
Canonical unitRingType := UnitRingType type unitRingMixin.
Canonical comUnitRingType := [comUnitRingType of type].
Definition fieldMixin := FieldMixin mulVf inv0.
Definition idomainAxiom := FieldIdomainMixin fieldMixin.
Canonical idomainType := IdomainType type idomainAxiom.
Canonical fieldType := FieldType type fieldMixin.
Fact closedFieldAxiom : GRing.ClosedField.axiom ringType.
Definition decFieldMixin := closed_field_QEMixin closedFieldAxiom.
Canonical decFieldType := DecFieldType type decFieldMixin.
Canonical closedFieldType := ClosedFieldType type closedFieldAxiom.
Fact conj_subproof u : integralOver QtoL (conjL (CtoL u)).
Proof.
(* Goal: @integralOver rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (@GRing.RMorphism.apply rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (Phant (forall _ : GRing.Ring.sort rat_Ring, GRing.Ring.sort (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))))) QtoL) (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL (CtoL u)) *)
have [p mon_p pu0] := CtoL_P u; exists p => //.
(* Goal: is_true (@root (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (@GRing.RMorphism.apply rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (Phant (forall _ : GRing.Ring.sort rat_Ring, GRing.Ring.sort (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))))) QtoL) p) (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL (CtoL u))) *)
rewrite -(fmorph_root conjL) conjL_K map_poly_id // => _ /(nthP 0)[j _ <-].
(* Goal: @eq (Equality.sort (GRing.Ring.eqType (GRing.Field.ringType (GRing.ClosedField.fieldType L)))) (@GRing.RMorphism.apply (GRing.Field.ringType (GRing.ClosedField.fieldType L)) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.Field.sort (GRing.ClosedField.fieldType L), GRing.Ring.sort (GRing.ClosedField.ringType L))) conjL (@nth (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType L))))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType L)))) (@polyseq (GRing.Field.ringType (GRing.ClosedField.fieldType L)) (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (@GRing.RMorphism.apply rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (Phant (forall _ : GRing.Ring.sort rat_Ring, GRing.Ring.sort (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))))) QtoL) p)) j)) (@nth (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType L))))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType L)))) (@polyseq (GRing.Field.ringType (GRing.ClosedField.fieldType L)) (@map_poly rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (@GRing.RMorphism.apply rat_Ring (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))) (Phant (forall _ : GRing.Ring.sort rat_Ring, GRing.Ring.sort (GRing.UnitRing.ringType (Num.NumField.unitRingType (@Num.NumField.pack (Num.NumDomain.sort Lnum) (GRing.ClosedField.fieldType L) (GRing.Field.class (GRing.ClosedField.fieldType L)) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort (GRing.ClosedField.fieldType L))) (GRing.Field.class (GRing.ClosedField.fieldType L)) => x) Lnum (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.NumDomain.class_of (Num.NumDomain.sort Lnum)) (Num.NumDomain.class Lnum) => x)))))) QtoL) p)) j) *)
by rewrite coef_map fmorph_rat.
Qed.
Fact conj_is_rmorphism : rmorphism (fun u => LtoC (conj_subproof u)).
Definition conj : {rmorphism type -> type} := RMorphism conj_is_rmorphism.
Lemma conjK : involutive conj.
Proof.
(* Goal: @involutive (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (@GRing.RMorphism.apply ringType ringType (Phant (forall _ : type, type)) conj) *)
by move=> u; apply: CtoL_inj; rewrite !LtoC_K conjL_K.
Qed.
Fact conj_nt : ~ conj =1 id.
Proof.
(* Goal: not (@eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (@GRing.RMorphism.apply ringType ringType (Phant (forall _ : type, type)) conj) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType ringType) => x)) *)
have [i i2]: exists i : type, i ^+ 2 = -1.
(* Goal: not (@eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (@GRing.RMorphism.apply ringType ringType (Phant (forall _ : type, type)) conj) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType ringType) => x)) *)
(* Goal: @ex type (fun i : type => @eq (GRing.Ring.sort ringType) (@GRing.exp ringType i (S (S O))) (@GRing.opp (GRing.Ring.zmodType ringType) (GRing.one ringType))) *)
have [i] := @solve_monicpoly _ 2 (nth 0 [:: -1 : type]) isT.
(* Goal: not (@eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (@GRing.RMorphism.apply ringType ringType (Phant (forall _ : type, type)) conj) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType ringType) => x)) *)
(* Goal: forall _ : @eq (GRing.Ring.sort (GRing.ClosedField.ringType closedFieldType)) (@GRing.exp (GRing.ClosedField.ringType closedFieldType) i (S (S O))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ClosedField.ringType closedFieldType))) (Finite.sort (ordinal_finType (S (S O)))) (GRing.zero (GRing.Ring.zmodType (GRing.ClosedField.ringType closedFieldType))) (index_enum (ordinal_finType (S (S O)))) (fun i0 : ordinal (S (S O)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ClosedField.ringType closedFieldType))) (ordinal (S (S O))) i0 (@GRing.add (GRing.Ring.zmodType (GRing.ClosedField.ringType closedFieldType))) true (@GRing.mul (GRing.ClosedField.ringType closedFieldType) (@nth (GRing.Zmodule.sort zmodType) (GRing.zero zmodType) (@cons type (@GRing.opp (GRing.Ring.zmodType ringType) (GRing.one ringType)) (@nil type)) (@nat_of_ord (S (S O)) i0)) (@GRing.exp (GRing.ClosedField.ringType closedFieldType) i (@nat_of_ord (S (S O)) i0))))), @ex type (fun i : type => @eq (GRing.Ring.sort ringType) (@GRing.exp ringType i (S (S O))) (@GRing.opp (GRing.Ring.zmodType ringType) (GRing.one ringType))) *)
by rewrite !big_ord_recl big_ord0 /= mul0r mulr1 !addr0; exists i.
(* Goal: not (@eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType ringType)) (@GRing.RMorphism.apply ringType ringType (Phant (forall _ : type, type)) conj) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType ringType) => x)) *)
move/(_ i)/(congr1 CtoL); rewrite LtoC_K => iL_J.
(* Goal: False *)
have/ltr_geF/idP[] := @ltr01 Lnum; rewrite -oppr_ge0 -(rmorphN1 CtoL_rmorphism).
(* Goal: is_true (@Num.Def.ler Lnum (GRing.zero (Num.NumDomain.zmodType Lnum)) (@GRing.RMorphism.apply ringType (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.Ring.sort ringType, GRing.Ring.sort (GRing.ClosedField.ringType L))) CtoL_rmorphism (@GRing.opp (GRing.Ring.zmodType ringType) (GRing.one ringType)))) *)
rewrite -i2 rmorphX /= expr2 -{2}iL_J -(svalP LnumMixin).
(* Goal: is_true (@Num.Def.ler Lnum (GRing.zero (Num.NumDomain.zmodType Lnum)) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) => x))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (@proj1_sig (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) (fun numL : Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)))))) => forall x : Num.NumDomain.sort (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x) numL (fun x : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x)), @eq (GRing.Ring.sort (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)))) (@GRing.exp (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) (@Num.Def.normr (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0)) x) (S (S O))) (@GRing.mul (Num.NumDomain.ringType (@Num.NumDomain.pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))) numL (GRing.ClosedField.idomainType L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) (fun x0 : phantom (GRing.IntegralDomain.class_of (GRing.IntegralDomain.sort (GRing.ClosedField.idomainType L))) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L)) => x0) numL (fun x0 : phantom (Num.mixin_of (@GRing.Ring.Pack (GRing.ClosedField.sort L) (@GRing.ComRing.base (GRing.ClosedField.sort L) (@GRing.ComUnitRing.base (GRing.ClosedField.sort L) (@GRing.IntegralDomain.base (GRing.ClosedField.sort L) (GRing.IntegralDomain.class (GRing.ClosedField.idomainType L))))))) numL => x0))) x (@GRing.RMorphism.apply (GRing.ClosedField.ringType L) (GRing.ClosedField.ringType L) (Phant (forall _ : GRing.ClosedField.sort L, GRing.ClosedField.sort L)) conjL x))) LnumMixin) => x)) (CtoL i)) (S (S O)))) *)
by rewrite exprn_ge0 ?normr_ge0.
Qed.
Definition numMixin := sval (ComplexNumMixin conjK conj_nt).
Canonical numDomainType := NumDomainType type numMixin.
Canonical numFieldType := [numFieldType of type].
Lemma normK u : `|u| ^+ 2 = u * conj u.
Proof.
(* Goal: @eq (GRing.Ring.sort (Num.NumDomain.ringType numDomainType)) (@GRing.exp (Num.NumDomain.ringType numDomainType) (@Num.Def.normr numDomainType u) (S (S O))) (@GRing.mul (Num.NumDomain.ringType numDomainType) u (@GRing.RMorphism.apply ringType ringType (Phant (forall _ : type, type)) conj u)) *)
exact: svalP (ComplexNumMixin conjK conj_nt) u.
Qed.
Lemma algebraic : integralRange (@ratr unitRingType).
Definition conjMixin :=
ImaginaryMixin (svalP (imaginary_exists closedFieldType))
(fun x => esym (normK x)).
Canonical numClosedFieldType := NumClosedFieldType type conjMixin.
End Implementation.
Definition divisor := Implementation.type.
Module Internals.
Import Implementation.
Local Notation algC := type.
Local Notation "z ^*" := (conj z) (at level 2, format "z ^*") : ring_scope.
Local Notation QtoC := (ratr : rat -> algC).
Local Notation QtoCm := [rmorphism of QtoC].
Local Notation pQtoC := (map_poly QtoC).
Local Notation ZtoQ := (intr : int -> rat).
Local Notation ZtoC := (intr : int -> algC).
Local Notation Creal := (Num.real : qualifier 0 algC).
Fact algCi_subproof : {i : algC | i ^+ 2 = -1}.
Proof.
(* Goal: @sig type (fun i : type => @eq (GRing.Ring.sort ringType) (@GRing.exp ringType i (S (S O))) (@GRing.opp (GRing.Ring.zmodType ringType) (GRing.one ringType))) *)
exact: GRing.imaginary_exists.
Qed.
Variant getCrat_spec : Type := GetCrat_spec CtoQ of cancel QtoC CtoQ.
Fact getCrat_subproof : getCrat_spec.
Proof.
(* Goal: getCrat_spec *)
have isQ := rat_algebraic_decidable algebraic.
(* Goal: getCrat_spec *)
exists (fun z => if isQ z is left Qz then sval (sig_eqW Qz) else 0) => a.
(* Goal: @eq rat match isQ (@ratr unitRingType a) with | left Qz => @proj1_sig (Choice.sort (GRing.Zmodule.choiceType (GRing.Ring.zmodType rat_Ring))) (fun x : Choice.sort (GRing.Zmodule.choiceType (GRing.Ring.zmodType rat_Ring)) => @eq (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType fieldType)))) (@ratr unitRingType a) (@GRing.RMorphism.apply rat_Ring (GRing.Field.ringType fieldType) (Phant (forall _ : rat, GRing.Field.sort fieldType)) (ratr_rmorphism numFieldType) x)) (@sig_eqW (GRing.Zmodule.choiceType (GRing.Ring.zmodType rat_Ring)) (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType fieldType))) (fun _ : GRing.Zmodule.sort (GRing.Ring.zmodType rat_Ring) => @ratr unitRingType a) (@GRing.RMorphism.apply rat_Ring (GRing.Field.ringType fieldType) (Phant (forall _ : rat, GRing.Field.sort fieldType)) (ratr_rmorphism numFieldType)) Qz) | right n => GRing.zero (GRing.Ring.zmodType rat_Ring) end a *)
case: (isQ _) => [Qa | []]; last by exists a.
(* Goal: @eq rat (@proj1_sig (Choice.sort (GRing.Zmodule.choiceType (GRing.Ring.zmodType rat_Ring))) (fun x : Choice.sort (GRing.Zmodule.choiceType (GRing.Ring.zmodType rat_Ring)) => @eq (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType fieldType)))) (@ratr unitRingType a) (@GRing.RMorphism.apply rat_Ring (GRing.Field.ringType fieldType) (Phant (forall _ : rat, GRing.Field.sort fieldType)) (ratr_rmorphism numFieldType) x)) (@sig_eqW (GRing.Zmodule.choiceType (GRing.Ring.zmodType rat_Ring)) (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType fieldType))) (fun _ : GRing.Zmodule.sort (GRing.Ring.zmodType rat_Ring) => @ratr unitRingType a) (@GRing.RMorphism.apply rat_Ring (GRing.Field.ringType fieldType) (Phant (forall _ : rat, GRing.Field.sort fieldType)) (ratr_rmorphism numFieldType)) Qa)) a *)
by case: (sig_eqW _) => b /= /fmorph_inj.
Qed.
Fact floorC_subproof x : {m | x \is Creal -> ZtoC m <= x < ZtoC (m + 1)}.
Proof.
(* Goal: @sig int (fun m : int => forall _ : is_true (@in_mem type x (@mem type (predPredType type) (@has_quality O type (@Num.Def.Rreal numDomainType : qualifier O type)))), is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
have [Rx | _] := boolP (x \is Creal); last by exists 0.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
without loss x_ge0: x Rx / x >= 0.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: forall _ : forall (x : type) (_ : is_true (@in_mem type x (@mem type (predPredType type) (@has_quality O type (@Num.Def.Rreal numDomainType))))) (_ : is_true (@Num.Def.ler numDomainType (GRing.zero (Num.NumDomain.zmodType numDomainType)) x)), @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))), @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
have [x_ge0 | /ltrW x_le0] := real_ger0P Rx; first exact.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: forall _ : forall (x : type) (_ : is_true (@in_mem type x (@mem type (predPredType type) (@has_quality O type (@Num.Def.Rreal numDomainType))))) (_ : is_true (@Num.Def.ler numDomainType (GRing.zero (Num.NumDomain.zmodType numDomainType)) x)), @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))), @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
case/(_ (- x)) => [||m /(_ isT)]; rewrite ?rpredN ?oppr_ge0 //.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: forall _ : is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) (@GRing.opp zmodType x)) (@Num.Def.ltr numDomainType (@GRing.opp zmodType x) (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring))))), @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
rewrite ler_oppr ltr_oppl -!rmorphN opprD /= ltr_neqAle ler_eqVlt.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: forall _ : is_true (andb (orb (@eq_op (Num.NumDomain.eqType numDomainType) x (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) (@GRing.opp (GRing.Ring.zmodType int_Ring) m))) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) (@GRing.opp (GRing.Ring.zmodType int_Ring) m)))) (andb (negb (@eq_op (Num.NumDomain.eqType numDomainType) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) (@GRing.add (GRing.Ring.zmodType int_Ring) (@GRing.opp (GRing.Ring.zmodType int_Ring) m) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)))) x)) (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) (@GRing.add (GRing.Ring.zmodType int_Ring) (@GRing.opp (GRing.Ring.zmodType int_Ring) m) (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)))) x))), @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
case: eqP => [-> _ | _ /and3P[lt_x_m _ le_m_x]].
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: @sig int (fun m0 : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m0) (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) (@GRing.opp (GRing.Ring.zmodType int_Ring) m))) (@Num.Def.ltr numDomainType (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) (@GRing.opp (GRing.Ring.zmodType int_Ring) m)) (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m0 (GRing.one int_Ring)))))) *)
by exists (- m) => _; rewrite lerr rmorphD ltr_addl ltr01.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
by exists (- m - 1); rewrite le_m_x subrK.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
have /ex_minnP[n lt_x_n1 min_n]: exists n, x < n.+1%:R.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: @ex nat (fun n : nat => is_true (@Num.Def.ltr numDomainType x (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) (S n)))) *)
have [n le_x_n] := rat_algebraic_archimedean algebraic x.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
(* Goal: @ex nat (fun n : nat => is_true (@Num.Def.ltr numDomainType x (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) (S n)))) *)
by exists n; rewrite -(ger0_norm x_ge0) (ltr_trans le_x_n) ?ltr_nat.
(* Goal: @sig int (fun m : int => forall _ : is_true true, is_true (andb (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) m) x) (@Num.Def.ltr numDomainType x (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (@GRing.add int_ZmodType m (GRing.one int_Ring)))))) *)
exists n%:Z => _; rewrite addrC -intS lt_x_n1 andbT.
(* Goal: is_true (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (Posz n)) x) *)
case Dn: n => // [n1]; rewrite -Dn.
(* Goal: is_true (@Num.Def.ler numDomainType (@intmul (GRing.Ring.zmodType ringType) (GRing.one ringType) (Posz n)) x) *)
have [||//|] := @real_lerP _ n%:R x; rewrite ?rpred_nat //.
(* Goal: forall _ : is_true (@Num.Def.ltr numDomainType x (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType numDomainType)) (GRing.one (Num.NumDomain.ringType numDomainType)) n)), is_true false *)
by rewrite Dn => /min_n; rewrite Dn ltnn.
Qed.
Fact minCpoly_subproof (x : algC) :
{p | p \is monic & forall q, root (pQtoC q) x = (p %| q)%R}.
Proof.
(* Goal: @sig2 (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (fun p : @poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))) => is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) p (@mem (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (predPredType (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))))) (@has_quality O (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (@monic (GRing.IntegralDomain.ringType rat_iDomain)))))) (fun p : @poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))) => forall q : @poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring)), @eq bool (@root ringType (@map_poly rat_Ring ringType (@ratr unitRingType : forall _ : rat, type) q) x) (Pdiv.Field.dvdp rat_iDomain p q)) *)
have isQ := rat_algebraic_decidable algebraic.
(* Goal: @sig2 (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (fun p : @poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))) => is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) p (@mem (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (predPredType (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))))) (@has_quality O (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (@monic (GRing.IntegralDomain.ringType rat_iDomain)))))) (fun p : @poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))) => forall q : @poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring)), @eq bool (@root ringType (@map_poly rat_Ring ringType (@ratr unitRingType) q) x) (Pdiv.Field.dvdp rat_iDomain p q)) *)
have [p [mon_p px0 irr_p]] := minPoly_decidable_closure isQ (algebraic x).
(* Goal: @sig2 (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (fun p : @poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))) => is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) p (@mem (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (predPredType (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))))) (@has_quality O (@poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain)))) (@monic (GRing.IntegralDomain.ringType rat_iDomain)))))) (fun p : @poly_of (GRing.IntegralDomain.ringType rat_iDomain) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType rat_iDomain))) => forall q : @poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring)), @eq bool (@root ringType (@map_poly rat_Ring ringType (@ratr unitRingType) q) x) (Pdiv.Field.dvdp rat_iDomain p q)) *)
exists p => // q; apply/idP/idP=> [qx0 | /dvdpP[r ->]]; last first.
(* Goal: is_true (Pdiv.Field.dvdp rat_iDomain p q) *)
(* Goal: is_true (@root ringType (@map_poly rat_Ring ringType (@ratr unitRingType) (@GRing.mul (poly_ringType (GRing.Field.ringType rat_fieldType)) r p)) x) *)
by rewrite rmorphM rootM px0 orbT.
(* Goal: is_true (Pdiv.Field.dvdp rat_iDomain p q) *)
suffices /eqp_dvdl <-: gcdp p q %= p by apply: dvdp_gcdr.
(* Goal: is_true (Pdiv.Field.eqp (GRing.Field.idomainType rat_fieldType) (gcdp (GRing.Field.idomainType rat_fieldType) p q) p) *)
rewrite irr_p ?dvdp_gcdl ?gtn_eqF // -(size_map_poly QtoCm) gcdp_map /=.
(* Goal: is_true (leq (S (S O)) (@size type (@polyseq ringType (gcdp idomainType (@map_poly (GRing.Field.ringType rat_fieldType) (GRing.IntegralDomain.ringType idomainType) (@ratr unitRingType) p) (@map_poly (GRing.Field.ringType rat_fieldType) (GRing.IntegralDomain.ringType idomainType) (@ratr unitRingType) q))))) *)
rewrite (@root_size_gt1 _ x) ?root_gcd ?px0 //.
(* Goal: is_true (negb (@eq_op (poly_eqType ringType) (gcdp idomainType (@map_poly (GRing.Field.ringType rat_fieldType) (GRing.IntegralDomain.ringType idomainType) (@ratr unitRingType) p) (@map_poly (GRing.Field.ringType rat_fieldType) (GRing.IntegralDomain.ringType idomainType) (@ratr unitRingType) q)) (GRing.zero (poly_zmodType ringType)))) *)
by rewrite gcdp_eq0 negb_and map_poly_eq0 monic_neq0.
Qed.
Definition algC_divisor (x : algC) := x : divisor.
Definition int_divisor m := m%:~R : divisor.
Definition nat_divisor n := n%:R : divisor.
End Internals.
Module Import Exports.
Import Implementation Internals.
Notation algC := type.
Delimit Scope C_scope with C.
Delimit Scope C_core_scope with Cc.
Delimit Scope C_expanded_scope with Cx.
Open Scope C_core_scope.
Canonical eqType.
Canonical choiceType.
Canonical countType.
Canonical zmodType.
Canonical countZmodType.
Canonical ringType.
Canonical countRingType.
Canonical unitRingType.
Canonical comRingType.
Canonical comUnitRingType.
Canonical idomainType.
Canonical numDomainType.
Canonical fieldType.
Canonical numFieldType.
Canonical decFieldType.
Canonical closedFieldType.
Canonical numClosedFieldType.
Notation algCeq := eqType.
Notation algCzmod := zmodType.
Notation algCring := ringType.
Notation algCuring := unitRingType.
Notation algCnum := numDomainType.
Notation algCfield := fieldType.
Notation algCnumField := numFieldType.
Notation algCnumClosedField := numClosedFieldType.
Notation Creal := (@Num.Def.Rreal numDomainType).
Definition getCrat := let: GetCrat_spec CtoQ _ := getCrat_subproof in CtoQ.
Definition Crat : pred_class := fun x : algC => ratr (getCrat x) == x.
Definition floorC x := sval (floorC_subproof x).
Definition Cint : pred_class := fun x : algC => (floorC x)%:~R == x.
Definition truncC x := if x >= 0 then `|floorC x|%N else 0%N.
Definition Cnat : pred_class := fun x : algC => (truncC x)%:R == x.
Definition minCpoly x : {poly algC} :=
let: exist2 p _ _ := minCpoly_subproof x in map_poly ratr p.
Coercion nat_divisor : nat >-> divisor.
Coercion int_divisor : int >-> divisor.
Coercion algC_divisor : algC >-> divisor.
Lemma nCdivE (p : nat) : p = p%:R :> divisor. Proof. by []. Qed.
Proof.
(* Goal: @eq divisor (nat_divisor p) (@GRing.natmul (GRing.Ring.zmodType ringType) (GRing.one ringType) p) *)
by [].
Qed.
Definition CdivE := (nCdivE, zCdivE).
Definition dvdC (x : divisor) : pred_class :=
fun y : algC => if x == 0 then y == 0 else y / x \in Cint.
Notation "x %| y" := (y \in dvdC x) : C_expanded_scope.
Notation "x %| y" := (@in_mem divisor y (mem (dvdC x))) : C_scope.
Definition eqCmod (e x y : divisor) := (e %| x - y)%C.
Notation "x == y %[mod e ]" := (eqCmod e x y) : C_scope.
Notation "x != y %[mod e ]" := (~~ (x == y %[mod e])%C) : C_scope.
End Exports.
End Algebraics.
Export Algebraics.Exports.
Section AlgebraicsTheory.
Implicit Types (x y z : algC) (n : nat) (m : int) (b : bool).
Import Algebraics.Internals.
Local Notation ZtoQ := (intr : int -> rat).
Local Notation ZtoC := (intr : int -> algC).
Local Notation QtoC := (ratr : rat -> algC).
Local Notation QtoCm := [rmorphism of QtoC].
Local Notation CtoQ := getCrat.
Local Notation intrp := (map_poly intr).
Local Notation pZtoQ := (map_poly ZtoQ).
Local Notation pZtoC := (map_poly ZtoC).
Local Notation pQtoC := (map_poly ratr).
Local Hint Resolve (intr_inj : injective ZtoC) : core.
Definition eqC_nat n p : (n%:R == p%:R :> algC) = (n == p) := eqr_nat _ n p.
Definition leC_nat n p : (n%:R <= p%:R :> algC) = (n <= p)%N := ler_nat _ n p.
Definition ltC_nat n p : (n%:R < p%:R :> algC) = (n < p)%N := ltr_nat _ n p.
Definition Cchar : [char algC] =i pred0 := @char_num _.
Definition CratrE :=
let CnF := Algebraics.Implementation.numFieldType in
let QtoCm := ratr_rmorphism CnF in
((rmorph0 QtoCm, rmorph1 QtoCm, rmorphMn QtoCm, rmorphN QtoCm, rmorphD QtoCm),
(rmorphM QtoCm, rmorphX QtoCm, fmorphV QtoCm),
(rmorphMz QtoCm, rmorphXz QtoCm, @ratr_norm CnF, @ratr_sg CnF),
=^~ (@ler_rat CnF, @ltr_rat CnF, (inj_eq (fmorph_inj QtoCm)))).
Definition CintrE :=
let CnF := Algebraics.Implementation.numFieldType in
Definition algC_algebraic x := Algebraics.Implementation.algebraic x.
Lemma Creal0 : 0 \is Creal. Proof. exact: rpred0. Qed.
Proof.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (predPredType (Num.NumDomain.sort Algebraics.Implementation.numDomainType)) (@has_quality O (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.Rreal Algebraics.Implementation.numDomainType)))) *)
exact: rpred0.
Qed.
Hint Resolve Creal0 Creal1 : core.
Lemma algCrect x : x = 'Re x + 'i * 'Im x.
Proof.
(* Goal: @eq Algebraics.Implementation.type x (@GRing.add (GRing.Ring.zmodType (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType)) (@Re Algebraics.Implementation.numClosedFieldType x) (@GRing.mul (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (@imaginaryC Algebraics.Implementation.numClosedFieldType) (@Im Algebraics.Implementation.numClosedFieldType x))) *)
by rewrite [LHS]Crect.
Qed.
Lemma algCreal_Re x : 'Re x \is Creal.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType)) (@Re Algebraics.Implementation.numClosedFieldType x) (@mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (predPredType (Num.NumDomain.sort Algebraics.Implementation.numDomainType)) (@has_quality O (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.Rreal Algebraics.Implementation.numDomainType)))) *)
by rewrite Creal_Re.
Qed.
Lemma algCreal_Im x : 'Im x \is Creal.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType)) (@Im Algebraics.Implementation.numClosedFieldType x) (@mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (predPredType (Num.NumDomain.sort Algebraics.Implementation.numDomainType)) (@has_quality O (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.Rreal Algebraics.Implementation.numDomainType)))) *)
by rewrite Creal_Im.
Qed.
Hint Resolve algCreal_Re algCreal_Im : core.
Lemma floorC_itv x : x \is Creal -> (floorC x)%:~R <= x < (floorC x + 1)%:~R.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (predPredType (Num.NumDomain.sort Algebraics.Implementation.numDomainType)) (@has_quality O (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.Rreal Algebraics.Implementation.numDomainType)))), is_true (andb (@Num.Def.ler Algebraics.Implementation.numDomainType (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (floorC x)) x) (@Num.Def.ltr Algebraics.Implementation.numDomainType x (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (@GRing.add int_ZmodType (floorC x) (GRing.one int_Ring))))) *)
by rewrite /floorC => Rx; case: (floorC_subproof x) => //= m; apply.
Qed.
Lemma floorC_def x m : m%:~R <= x < (m + 1)%:~R -> floorC x = m.
Proof.
(* Goal: forall _ : is_true (andb (@Num.Def.ler Algebraics.Implementation.numDomainType (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) m) x) (@Num.Def.ltr Algebraics.Implementation.numDomainType x (@intmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (@GRing.add int_ZmodType m (GRing.one int_Ring))))), @eq int (floorC x) m *)
case/andP=> lemx ltxm1; apply/eqP; rewrite eqr_le -!ltz_addr1.
(* Goal: is_true (andb (@Num.Def.ltr int_numDomainType (floorC x) (@GRing.add int_ZmodType m (GRing.one int_Ring))) (@Num.Def.ltr int_numDomainType m (@GRing.add int_ZmodType (floorC x) (GRing.one int_Ring)))) *)
have /floorC_itv/andP[lefx ltxf1]: x \is Creal.
(* Goal: is_true (andb (@Num.Def.ltr int_numDomainType (floorC x) (@GRing.add int_ZmodType m (GRing.one int_Ring))) (@Num.Def.ltr int_numDomainType m (@GRing.add int_ZmodType (floorC x) (GRing.one int_Ring)))) *)
(* Goal: is_true (@in_mem Algebraics.Implementation.type x (@mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (predPredType (Num.NumDomain.sort Algebraics.Implementation.numDomainType)) (@has_quality O (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.Rreal Algebraics.Implementation.numDomainType)))) *)
by rewrite -[x](subrK m%:~R) rpredD ?realz ?ler_sub_real.
(* Goal: is_true (andb (@Num.Def.ltr int_numDomainType (floorC x) (@GRing.add int_ZmodType m (GRing.one int_Ring))) (@Num.Def.ltr int_numDomainType m (@GRing.add int_ZmodType (floorC x) (GRing.one int_Ring)))) *)
by rewrite -!(ltr_int [numFieldType of algC]) 2?(@ler_lt_trans _ x).
Qed.
Lemma intCK : cancel intr floorC.
Proof.
(* Goal: @cancel (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) int (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType)) floorC *)
by move=> m; apply: floorC_def; rewrite ler_int ltr_int ltz_addr1 lerr.
Qed.
Lemma floorC0 : floorC 0 = 0. Proof. exact: (intCK 0). Qed.
Proof.
(* Goal: @eq int (floorC (GRing.zero Algebraics.Implementation.zmodType)) (GRing.zero int_ZmodType) *)
exact: (intCK 0).
Qed.
Hint Resolve floorC0 floorC1 : core.
Lemma floorCpK (p : {poly algC}) :
p \is a polyOver Cint -> map_poly intr (map_poly floorC p) = p.
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type)) p (@mem (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType))) (predPredType (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)))) (@has_quality (S O) (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType))) (@polyOver Algebraics.Implementation.ringType Cint)))), @eq (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType))) (@map_poly int_Ring Algebraics.Implementation.ringType (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType)) (@map_poly Algebraics.Implementation.ringType int_Ring floorC p)) p *)
move/(all_nthP 0)=> Zp; apply/polyP=> i.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@polyseq Algebraics.Implementation.ringType (@map_poly int_Ring Algebraics.Implementation.ringType (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType)) (@map_poly Algebraics.Implementation.ringType int_Ring floorC p))) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@polyseq Algebraics.Implementation.ringType p) i) *)
rewrite coef_map coef_map_id0 //= -[p]coefK coef_poly.
(* Goal: @eq Algebraics.Implementation.type (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (floorC (if leq (S i) (@size (GRing.Ring.sort Algebraics.Implementation.ringType) (@polyseq Algebraics.Implementation.ringType p)) then @nth (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@polyseq Algebraics.Implementation.ringType p) i else GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)))) (if leq (S i) (@size (GRing.Ring.sort Algebraics.Implementation.ringType) (@polyseq Algebraics.Implementation.ringType p)) then @nth (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@polyseq Algebraics.Implementation.ringType p) i else GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) *)
by case: ifP => [/Zp/floorCK // | _]; rewrite floorC0.
Qed.
Lemma floorCpP (p : {poly algC}) :
p \is a polyOver Cint -> {q | p = map_poly intr q}.
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type)) p (@mem (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType))) (predPredType (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)))) (@has_quality (S O) (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType))) (@polyOver Algebraics.Implementation.ringType Cint)))), @sig (@poly_of int_Ring (Phant (GRing.Ring.sort int_Ring))) (fun q : @poly_of int_Ring (Phant (GRing.Ring.sort int_Ring)) => @eq (@poly_of Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type)) p (@map_poly int_Ring Algebraics.Implementation.ringType (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType)) q)) *)
by exists (map_poly floorC p); rewrite floorCpK.
Qed.
Lemma Cint_int m : m%:~R \in Cint.
Proof.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) m) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) *)
by rewrite unfold_in intCK.
Qed.
Lemma CintP x : reflect (exists m, x = m%:~R) (x \in Cint).
Proof.
(* Goal: Bool.reflect (@ex int (fun m : int => @eq Algebraics.Implementation.type x (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) m))) (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) *)
by apply: (iffP idP) => [/eqP<-|[m ->]]; [exists (floorC x) | apply: Cint_int].
Qed.
Lemma floorCD : {in Cint & Creal, {morph floorC : x y / x + y}}.
Lemma floorCN : {in Cint, {morph floorC : x / - x}}.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun x : Algebraics.Implementation.type => @eq int (floorC ((fun x0 : Algebraics.Implementation.type => @GRing.opp Algebraics.Implementation.zmodType x0) x)) ((fun x0 : int => @GRing.opp int_ZmodType x0) (floorC x))) (inPhantom (@morphism_1 Algebraics.Implementation.type int floorC (fun x : Algebraics.Implementation.type => @GRing.opp Algebraics.Implementation.zmodType x) (fun x : int => @GRing.opp int_ZmodType x))) *)
by move=> _ /CintP[m ->]; rewrite -rmorphN !intCK.
Qed.
Lemma floorCM : {in Cint &, {morph floorC : x y / x * y}}.
Proof.
(* Goal: @prop_in2 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun x y : Algebraics.Implementation.type => @eq int (floorC ((fun x0 y0 : Algebraics.Implementation.type => @GRing.mul Algebraics.Implementation.ringType x0 y0) x y)) ((fun x0 y0 : int => @GRing.mul int_Ring x0 y0) (floorC x) (floorC y))) (inPhantom (@morphism_2 Algebraics.Implementation.type int floorC (fun x y : Algebraics.Implementation.type => @GRing.mul Algebraics.Implementation.ringType x y) (fun x y : int => @GRing.mul int_Ring x y))) *)
by move=> _ _ /CintP[m1 ->] /CintP[m2 ->]; rewrite -rmorphM !intCK.
Qed.
Lemma floorCX n : {in Cint, {morph floorC : x / x ^+ n}}.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun x : Algebraics.Implementation.type => @eq int (floorC ((fun x0 : Algebraics.Implementation.type => @GRing.exp Algebraics.Implementation.ringType x0 n) x)) ((fun x0 : int => @GRing.exp int_Ring x0 n) (floorC x))) (inPhantom (@morphism_1 Algebraics.Implementation.type int floorC (fun x : Algebraics.Implementation.type => @GRing.exp Algebraics.Implementation.ringType x n) (fun x : int => @GRing.exp int_Ring x n))) *)
by move=> _ /CintP[m ->]; rewrite -rmorphX !intCK.
Qed.
Lemma rpred_Cint S (ringS : subringPred S) (kS : keyed_pred ringS) x :
x \in Cint -> x \in kS.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)), is_true (@in_mem Algebraics.Implementation.type x (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) S (@GRing.Pred.opp_key (GRing.Ring.zmodType Algebraics.Implementation.ringType) S (@GRing.Pred.zmod_opp (GRing.Ring.zmodType Algebraics.Implementation.ringType) S (@GRing.Pred.subring_zmod Algebraics.Implementation.ringType S ringS))) kS))) *)
by case/CintP=> m ->; apply: rpred_int.
Qed.
Lemma Cint1 : 1 \in Cint. Proof. exact: (Cint_int 1). Qed.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) *)
exact: (Cint_int 1).
Qed.
Fact Cint_subring : subring_closed Cint.
Proof.
(* Goal: @GRing.subring_closed Algebraics.Implementation.ringType Cint *)
by split=> // _ _ /CintP[m ->] /CintP[p ->]; rewrite -(rmorphB, rmorphM) Cint_int.
Qed.
Canonical Cint_keyed := KeyedPred Cint_key.
Canonical Cint_opprPred := OpprPred Cint_subring.
Canonical Cint_addrPred := AddrPred Cint_subring.
Canonical Cint_mulrPred := MulrPred Cint_subring.
Canonical Cint_zmodPred := ZmodPred Cint_subring.
Canonical Cint_semiringPred := SemiringPred Cint_subring.
Canonical Cint_smulrPred := SmulrPred Cint_subring.
Canonical Cint_subringPred := SubringPred Cint_subring.
Lemma Creal_Cint : {subset Cint <= Creal}.
Proof.
(* Goal: @sub_mem Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (@mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (predPredType (Num.NumDomain.sort Algebraics.Implementation.numDomainType)) (@has_quality O (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.Rreal Algebraics.Implementation.numDomainType))) *)
by move=> _ /CintP[m ->]; apply: realz.
Qed.
Lemma conj_Cint x : x \in Cint -> x^* = x.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) x) x *)
by move/Creal_Cint/conj_Creal.
Qed.
Lemma Cint_normK x : x \in Cint -> `|x| ^+ 2 = x ^+ 2.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)), @eq (GRing.Ring.sort (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (@GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType x) (S (S O))) (@GRing.exp Algebraics.Implementation.ringType x (S (S O))) *)
by move/Creal_Cint/real_normK.
Qed.
Lemma CintEsign x : x \in Cint -> x = (-1) ^+ (x < 0)%C * `|x|.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)), @eq Algebraics.Implementation.type x (@GRing.mul (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@GRing.opp (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (nat_of_bool (@Num.Def.ltr Algebraics.Implementation.numDomainType x (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType))))) (@Num.Def.normr Algebraics.Implementation.numDomainType x)) *)
by move/Creal_Cint/realEsign.
Qed.
Lemma truncC_itv x : 0 <= x -> (truncC x)%:R <= x < (truncC x).+1%:R.
Proof.
(* Goal: forall _ : is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) x), is_true (andb (@Num.Def.ler Algebraics.Implementation.numDomainType (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (truncC x)) x) (@Num.Def.ltr Algebraics.Implementation.numDomainType x (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (S (truncC x))))) *)
move=> x_ge0; have /andP[lemx ltxm1] := floorC_itv (ger0_real x_ge0).
(* Goal: is_true (andb (@Num.Def.ler Algebraics.Implementation.numDomainType (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (truncC x)) x) (@Num.Def.ltr Algebraics.Implementation.numDomainType x (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (S (truncC x))))) *)
rewrite /truncC x_ge0 -addn1 !pmulrn PoszD gez0_abs ?lemx //.
(* Goal: is_true (@Num.Def.ler int_numDomainType (GRing.zero (Num.NumDomain.zmodType int_numDomainType)) (floorC x)) *)
by rewrite -ltz_addr1 -(ltr_int [numFieldType of algC]) (ler_lt_trans x_ge0).
Qed.
Lemma truncC_def x n : n%:R <= x < n.+1%:R -> truncC x = n.
Proof.
(* Goal: forall _ : is_true (andb (@Num.Def.ler Algebraics.Implementation.numDomainType (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) n) x) (@Num.Def.ltr Algebraics.Implementation.numDomainType x (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (S n)))), @eq nat (truncC x) n *)
move=> ivt_n_x; have /andP[lenx _] := ivt_n_x.
(* Goal: @eq nat (truncC x) n *)
by rewrite /truncC (ler_trans (ler0n _ n)) // (@floorC_def _ n) // addrC -intS.
Qed.
Lemma natCK n : truncC n%:R = n.
Proof.
(* Goal: @eq nat (truncC (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) n)) n *)
by apply: truncC_def; rewrite lerr ltr_nat /=.
Qed.
Lemma CnatP x : reflect (exists n, x = n%:R) (x \in Cnat).
Proof.
(* Goal: Bool.reflect (@ex nat (fun n : nat => @eq Algebraics.Implementation.type x (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) n))) (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by apply: (iffP eqP) => [<- | [n ->]]; [exists (truncC x) | rewrite natCK].
Qed.
Lemma truncCK : {in Cnat, cancel truncC (GRing.natmul 1)}.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat) (fun x : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (truncC x)) x) (inPhantom (@cancel nat (Num.NumDomain.sort Algebraics.Implementation.numDomainType) truncC (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))))) *)
by move=> x /eqP.
Qed.
Lemma truncC_gt0 x : (0 < truncC x)%N = (1 <= x).
Proof.
(* Goal: @eq bool (leq (S O) (truncC x)) (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) x) *)
apply/idP/idP=> [m_gt0 | x_ge1].
(* Goal: is_true (leq (S O) (truncC x)) *)
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) x) *)
have /truncC_itv/andP[lemx _]: 0 <= x.
(* Goal: is_true (leq (S O) (truncC x)) *)
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) x) *)
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) x) *)
by move: m_gt0; rewrite /truncC; case: ifP.
(* Goal: is_true (leq (S O) (truncC x)) *)
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) x) *)
by apply: ler_trans lemx; rewrite ler1n.
(* Goal: is_true (leq (S O) (truncC x)) *)
have /truncC_itv/andP[_ ltxm1]:= ler_trans ler01 x_ge1.
(* Goal: is_true (leq (S O) (truncC x)) *)
by rewrite -ltnS -ltC_nat (ler_lt_trans x_ge1).
Qed.
Lemma truncC0Pn x : reflect (truncC x = 0%N) (~~ (1 <= x)).
Proof.
(* Goal: Bool.reflect (@eq nat (truncC x) O) (negb (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) x)) *)
by rewrite -truncC_gt0 -eqn0Ngt; apply: eqP.
Qed.
Lemma truncC0 : truncC 0 = 0%N. Proof. exact: (natCK 0). Qed.
Proof.
(* Goal: @eq nat (truncC (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType))) O *)
exact: (natCK 0).
Qed.
Lemma truncCD :
{in Cnat & Num.nneg, {morph truncC : x y / x + y >-> (x + y)%N}}.
Lemma truncCM : {in Cnat &, {morph truncC : x y / x * y >-> (x * y)%N}}.
Proof.
(* Goal: @prop_in2 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat) (fun x y : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq nat (truncC ((fun x0 y0 : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @GRing.mul (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) x0 y0) x y)) ((fun x0 y0 : nat => muln x0 y0) (truncC x) (truncC y))) (inPhantom (@morphism_2 (Num.NumDomain.sort Algebraics.Implementation.numDomainType) nat truncC (fun x y : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @GRing.mul (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) x y) (fun x y : nat => muln x y))) *)
by move=> _ _ /CnatP[n1 ->] /CnatP[n2 ->]; rewrite -natrM !natCK.
Qed.
Lemma truncCX n : {in Cnat, {morph truncC : x / x ^+ n >-> (x ^ n)%N}}.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat) (fun x : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq nat (truncC ((fun x0 : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) x0 n) x)) ((fun x0 : nat => expn x0 n) (truncC x))) (inPhantom (@morphism_1 (Num.NumDomain.sort Algebraics.Implementation.numDomainType) nat truncC (fun x : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) x n) (fun x : nat => expn x n))) *)
by move=> _ /CnatP[n1 ->]; rewrite -natrX !natCK.
Qed.
Lemma rpred_Cnat S (ringS : semiringPred S) (kS : keyed_pred ringS) x :
x \in Cnat -> x \in kS.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)), is_true (@in_mem Algebraics.Implementation.type x (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) S (@GRing.Pred.add_key (GRing.Ring.zmodType Algebraics.Implementation.ringType) S (@GRing.Pred.semiring_add Algebraics.Implementation.ringType S ringS)) kS))) *)
by case/CnatP=> n ->; apply: rpred_nat.
Qed.
Lemma Cnat_nat n : n%:R \in Cnat. Proof. by apply/CnatP; exists n. Qed.
Proof.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) n) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by apply/CnatP; exists n.
Qed.
Lemma Cnat1 : 1 \in Cnat. Proof. exact: (Cnat_nat 1). Qed.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
exact: (Cnat_nat 1).
Qed.
Fact Cnat_semiring : semiring_closed Cnat.
Proof.
(* Goal: @GRing.semiring_closed Algebraics.Implementation.ringType Cnat *)
by do 2![split] => //= _ _ /CnatP[n ->] /CnatP[m ->]; rewrite -(natrD, natrM).
Qed.
Canonical Cnat_keyed := KeyedPred Cnat_key.
Canonical Cnat_addrPred := AddrPred Cnat_semiring.
Canonical Cnat_mulrPred := MulrPred Cnat_semiring.
Canonical Cnat_semiringPred := SemiringPred Cnat_semiring.
Lemma Cnat_ge0 x : x \in Cnat -> 0 <= x.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) x) *)
by case/CnatP=> n ->; apply: ler0n.
Qed.
Lemma Cnat_gt0 x : x \in Cnat -> (0 < x) = (x != 0).
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)), @eq bool (@Num.Def.ltr Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) x) (negb (@eq_op Algebraics.Implementation.eqType x (GRing.zero Algebraics.Implementation.zmodType))) *)
by case/CnatP=> n ->; rewrite pnatr_eq0 ltr0n lt0n.
Qed.
Lemma conj_Cnat x : x \in Cnat -> x^* = x.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) x) x *)
by case/CnatP=> n ->; apply: rmorph_nat.
Qed.
Lemma norm_Cnat x : x \in Cnat -> `|x| = x.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)), @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType x) x *)
by move/Cnat_ge0/ger0_norm.
Qed.
Lemma Creal_Cnat : {subset Cnat <= Creal}.
Proof.
(* Goal: @sub_mem Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat) (@mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (predPredType (Num.NumDomain.sort Algebraics.Implementation.numDomainType)) (@has_quality O (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.Rreal Algebraics.Implementation.numDomainType))) *)
by move=> z /conj_Cnat/CrealP.
Qed.
Lemma Cnat_sum_eq1 (I : finType) (P : pred I) (F : I -> algC) :
(forall i, P i -> F i \in Cnat) -> \sum_(i | P i) F i = 1 ->
{i : I | [/\ P i, F i = 1 & forall j, j != i -> P j -> F j = 0]}.
Proof.
(* Goal: forall (_ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem Algebraics.Implementation.type (F i) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat))) (_ : @eq (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort I) (GRing.zero Algebraics.Implementation.zmodType) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort I) i (@GRing.add Algebraics.Implementation.zmodType) (P i) (F i))) (GRing.one Algebraics.Implementation.ringType)), @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
move=> natF sumF1; pose nF i := truncC (F i).
(* Goal: @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
have{natF} defF i: P i -> F i = (nF i)%:R by move/natF/eqP.
(* Goal: @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
have{sumF1} /eqP sumF1: (\sum_(i | P i) nF i == 1)%N.
(* Goal: @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
(* 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) (nF i))) (S O)) *)
by rewrite -eqC_nat natr_sum -(eq_bigr _ defF) sumF1.
(* Goal: @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
have [i Pi nZfi]: {i : I | P i & nF i != 0%N}.
(* Goal: @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
(* Goal: @sig2 (Finite.sort I) (fun i : Finite.sort I => is_true (P i)) (fun i : Finite.sort I => is_true (negb (@eq_op nat_eqType (nF i) O))) *)
by apply/sig2W/exists_inP; rewrite -negb_forall_in -sum_nat_eq0 sumF1.
(* Goal: @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
have F'ge0 := (leq0n _, etrans (eq_sym _ _) (sum_nat_eq0 (predD1 P i) nF)).
(* Goal: @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
rewrite -lt0n in nZfi; have [_] := (leqif_add (leqif_eq nZfi) (F'ge0 _)).
(* Goal: forall _ : @eq bool (@eq_op nat_eqType (addn (S O) O) (addn (nF i) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i0 : Finite.sort I => @BigBody nat (Finite.sort I) i0 addn (@pred_of_simpl (Equality.sort (Finite.eqType I)) (@predD1 (Finite.eqType I) P i) i0) (nF i0))))) (andb (@eq_op nat_eqType (S O) (nF i)) (@FiniteQuant.quant0b I (fun i0 : Finite.sort I => @FiniteQuant.all_in I (@pred_of_simpl (Equality.sort (Finite.eqType I)) (@predD1 (Finite.eqType I) P i) i0) (FiniteQuant.Quantified (@eq_op nat_eqType (nF i0) O)) i0))), @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Equality.sort (Finite.eqType I)) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
rewrite /= big_andbC -bigD1 // sumF1 => /esym/andP/=[/eqP Fi1 /forall_inP Fi'0].
(* Goal: @sig (Finite.sort I) (fun i : Finite.sort I => and3 (is_true (P i)) (@eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType)) (forall (j : Finite.sort I) (_ : is_true (negb (@eq_op (Finite.eqType I) j i))) (_ : is_true (P j)), @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType))) *)
exists i; split=> // [|j neq_ji Pj]; first by rewrite defF // -Fi1.
(* Goal: @eq Algebraics.Implementation.type (F j) (GRing.zero Algebraics.Implementation.zmodType) *)
by rewrite defF // (eqP (Fi'0 j _)) // neq_ji.
Qed.
Lemma Cnat_mul_eq1 x y :
x \in Cnat -> y \in Cnat -> (x * y == 1) = (x == 1) && (y == 1).
Proof.
(* Goal: forall (_ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat))) (_ : is_true (@in_mem Algebraics.Implementation.type y (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat))), @eq bool (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.mul Algebraics.Implementation.ringType x y) (GRing.one Algebraics.Implementation.ringType)) (andb (@eq_op Algebraics.Implementation.eqType x (GRing.one Algebraics.Implementation.ringType)) (@eq_op Algebraics.Implementation.eqType y (GRing.one Algebraics.Implementation.ringType))) *)
by do 2!move/truncCK <-; rewrite -natrM !pnatr_eq1 muln_eq1.
Qed.
Lemma Cnat_prod_eq1 (I : finType) (P : pred I) (F : I -> algC) :
(forall i, P i -> F i \in Cnat) -> \prod_(i | P i) F i = 1 ->
forall i, P i -> F i = 1.
Proof.
(* Goal: forall (_ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem Algebraics.Implementation.type (F i) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat))) (_ : @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (@BigOp.bigop (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) (GRing.one Algebraics.Implementation.ringType) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) i (@GRing.mul Algebraics.Implementation.ringType) (P i) (F i))) (GRing.one Algebraics.Implementation.ringType)) (i : Finite.sort I) (_ : is_true (P i)), @eq Algebraics.Implementation.type (F i) (GRing.one Algebraics.Implementation.ringType) *)
move=> natF prodF1; apply/eqfun_inP; rewrite -big_andE.
(* Goal: is_true (@BigOp.bigop bool (Finite.sort I) true (index_enum I) (fun i : Finite.sort I => @BigBody bool (Finite.sort I) i andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) P)) (@eq_op Algebraics.Implementation.eqType (F i) (GRing.one Algebraics.Implementation.ringType)))) *)
move: prodF1; elim/(big_load (fun x => x \in Cnat)): _.
(* Goal: prod (is_true (@in_mem Algebraics.Implementation.type (@BigOp.bigop Algebraics.Implementation.type (Finite.sort I) (GRing.one Algebraics.Implementation.ringType) (index_enum I) (fun i : Finite.sort I => @BigBody Algebraics.Implementation.type (Finite.sort I) i (@GRing.mul Algebraics.Implementation.ringType) (P i) (F i))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat))) (forall _ : @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (@BigOp.bigop Algebraics.Implementation.type (Finite.sort I) (GRing.one Algebraics.Implementation.ringType) (index_enum I) (fun i : Finite.sort I => @BigBody Algebraics.Implementation.type (Finite.sort I) i (@GRing.mul Algebraics.Implementation.ringType) (P i) (F i))) (GRing.one Algebraics.Implementation.ringType), is_true (@BigOp.bigop bool (Finite.sort I) true (index_enum I) (fun i : Finite.sort I => @BigBody bool (Finite.sort I) i andb (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) P)) (@eq_op Algebraics.Implementation.eqType (F i) (GRing.one Algebraics.Implementation.ringType))))) *)
elim/big_rec2: _ => // i all1x x /natF N_Fi [Nx x1all1].
(* Goal: prod (is_true (@in_mem Algebraics.Implementation.type (@GRing.mul Algebraics.Implementation.ringType (F i) x) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat))) (forall _ : @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (@GRing.mul Algebraics.Implementation.ringType (F i) x) (GRing.one Algebraics.Implementation.ringType), is_true (andb (@eq_op Algebraics.Implementation.eqType (F i) (GRing.one Algebraics.Implementation.ringType)) all1x)) *)
by split=> [|/eqP]; rewrite ?rpredM ?Cnat_mul_eq1 // => /andP[-> /eqP].
Qed.
Lemma Cint_Cnat : {subset Cnat <= Cint}.
Proof.
(* Goal: @sub_mem Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) *)
by move=> _ /CnatP[n ->]; rewrite pmulrn Cint_int.
Qed.
Lemma CintE x : (x \in Cint) = (x \in Cnat) || (- x \in Cnat).
Lemma Cnat_norm_Cint x : x \in Cint -> `|x| \in Cnat.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)), is_true (@in_mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType x) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
case/CintP=> [m ->]; rewrite [m]intEsign rmorphM rmorph_sign.
(* Goal: is_true (@in_mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@GRing.mul Algebraics.Implementation.ringType (@GRing.exp Algebraics.Implementation.ringType (@GRing.opp (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType)) (nat_of_bool (@Num.Def.ltr int_numDomainType m (GRing.zero (Num.NumDomain.zmodType int_numDomainType))))) (@GRing.RMorphism.apply int_Ring Algebraics.Implementation.ringType (Phant (forall _ : GRing.Ring.sort int_Ring, GRing.Ring.sort Algebraics.Implementation.ringType)) (intmul1_rmorphism Algebraics.Implementation.ringType) (Posz (absz m))))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by rewrite normrM normr_sign mul1r normr_nat rpred_nat.
Qed.
Lemma CnatEint x : (x \in Cnat) = (x \in Cint) && (0 <= x).
Proof.
(* Goal: @eq bool (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) (andb (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) x)) *)
apply/idP/andP=> [Nx | [Zx x_ge0]]; first by rewrite Cint_Cnat ?Cnat_ge0.
(* Goal: is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by rewrite -(ger0_norm x_ge0) Cnat_norm_Cint.
Qed.
Lemma CintEge0 x : 0 <= x -> (x \in Cint) = (x \in Cnat).
Proof.
(* Goal: forall _ : is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) x), @eq bool (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by rewrite CnatEint andbC => ->.
Qed.
Lemma Cnat_exp_even x n : ~~ odd n -> x \in Cint -> x ^+ n \in Cnat.
Proof.
(* Goal: forall (_ : is_true (negb (odd n))) (_ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))), is_true (@in_mem (GRing.Ring.sort Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType x n) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
rewrite -dvdn2 => /dvdnP[m ->] Zx; rewrite mulnC exprM -Cint_normK ?rpredX //.
(* Goal: is_true (@in_mem (GRing.Ring.sort Algebraics.Implementation.ringType) (@Num.Def.normr Algebraics.Implementation.numDomainType x) (@mem (GRing.Ring.sort Algebraics.Implementation.ringType) (predPredType (GRing.Ring.sort Algebraics.Implementation.ringType)) (@unkey_pred (GRing.Ring.sort Algebraics.Implementation.ringType) Cnat (@GRing.Pred.mul_key Algebraics.Implementation.ringType Cnat Cnat_mulrPred) Cnat_keyed))) *)
exact: Cnat_norm_Cint.
Qed.
Lemma norm_Cint_ge1 x : x \in Cint -> x != 0 -> 1 <= `|x|.
Proof.
(* Goal: forall (_ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))) (_ : is_true (negb (@eq_op Algebraics.Implementation.eqType x (GRing.zero Algebraics.Implementation.zmodType)))), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (@Num.Def.normr Algebraics.Implementation.numDomainType x)) *)
rewrite -normr_eq0 => /Cnat_norm_Cint/CnatP[n ->].
(* Goal: forall _ : is_true (negb (@eq_op (Num.NumDomain.eqType Algebraics.Implementation.numDomainType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) n) (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)))), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) n)) *)
by rewrite pnatr_eq0 ler1n lt0n.
Qed.
Lemma sqr_Cint_ge1 x : x \in Cint -> x != 0 -> 1 <= x ^+ 2.
Proof.
(* Goal: forall (_ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))) (_ : is_true (negb (@eq_op Algebraics.Implementation.eqType x (GRing.zero Algebraics.Implementation.zmodType)))), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (@GRing.exp Algebraics.Implementation.ringType x (S (S O)))) *)
by move=> Zx nz_x; rewrite -Cint_normK // expr_ge1 ?normr_ge0 ?norm_Cint_ge1.
Qed.
Lemma Cint_ler_sqr x : x \in Cint -> x <= x ^+ 2.
Lemma dvdCP x y : reflect (exists2 z, z \in Cint & y = z * x) (x %| y)%C.
Proof.
(* Goal: Bool.reflect (@ex2 Algebraics.Implementation.type (fun z : Algebraics.Implementation.type => is_true (@in_mem Algebraics.Implementation.type z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))) (fun z : Algebraics.Implementation.type => @eq Algebraics.Implementation.type y (@GRing.mul Algebraics.Implementation.ringType z x))) (@in_mem Algebraics.divisor y (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x))) *)
rewrite unfold_in; have [-> | nz_x] := altP eqP.
(* Goal: Bool.reflect (@ex2 Algebraics.Implementation.type (fun z : Algebraics.Implementation.type => is_true (@in_mem Algebraics.Implementation.type z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))) (fun z : Algebraics.Implementation.type => @eq Algebraics.Implementation.type y (@GRing.mul Algebraics.Implementation.ringType z x))) (@in_mem (GRing.Ring.sort Algebraics.Implementation.ringType) (@GRing.mul Algebraics.Implementation.ringType y (@GRing.inv Algebraics.Implementation.unitRingType x)) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) *)
(* Goal: Bool.reflect (@ex2 Algebraics.Implementation.type (fun z : Algebraics.Implementation.type => is_true (@in_mem Algebraics.Implementation.type z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))) (fun z : Algebraics.Implementation.type => @eq Algebraics.Implementation.type y (@GRing.mul Algebraics.Implementation.ringType z (GRing.zero Algebraics.Implementation.zmodType)))) (@eq_op Algebraics.Implementation.eqType y (GRing.zero Algebraics.Implementation.zmodType)) *)
by apply: (iffP eqP) => [-> | [z _ ->]]; first exists 0; rewrite ?mulr0.
(* Goal: Bool.reflect (@ex2 Algebraics.Implementation.type (fun z : Algebraics.Implementation.type => is_true (@in_mem Algebraics.Implementation.type z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))) (fun z : Algebraics.Implementation.type => @eq Algebraics.Implementation.type y (@GRing.mul Algebraics.Implementation.ringType z x))) (@in_mem (GRing.Ring.sort Algebraics.Implementation.ringType) (@GRing.mul Algebraics.Implementation.ringType y (@GRing.inv Algebraics.Implementation.unitRingType x)) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) *)
apply: (iffP idP) => [Zyx | [z Zz ->]]; last by rewrite mulfK.
(* Goal: @ex2 Algebraics.Implementation.type (fun z : Algebraics.Implementation.type => is_true (@in_mem Algebraics.Implementation.type z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))) (fun z : Algebraics.Implementation.type => @eq Algebraics.Implementation.type y (@GRing.mul Algebraics.Implementation.ringType z x)) *)
by exists (y / x); rewrite ?divfK.
Qed.
Lemma dvdCP_nat x y : 0 <= x -> 0 <= y -> (x %| y)%C -> {n | y = n%:R * x}.
Lemma dvdC0 x : (x %| 0)%C.
Proof.
(* Goal: is_true (@in_mem Algebraics.divisor (GRing.zero Algebraics.Implementation.zmodType) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x))) *)
by apply/dvdCP; exists 0; rewrite ?mul0r.
Qed.
Lemma dvd0C x : (0 %| x)%C = (x == 0).
Proof.
(* Goal: @eq bool (@in_mem Algebraics.divisor x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC (GRing.zero Algebraics.Implementation.zmodType)))) (@eq_op Algebraics.Implementation.eqType x (GRing.zero Algebraics.Implementation.zmodType)) *)
by rewrite unfold_in eqxx.
Qed.
Lemma dvdC_mull x y z : y \in Cint -> (x %| z)%C -> (x %| y * z)%C.
Lemma dvdC_mulr x y z : y \in Cint -> (x %| z)%C -> (x %| z * y)%C.
Proof.
(* Goal: forall (_ : is_true (@in_mem Algebraics.Implementation.type y (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint))) (_ : is_true (@in_mem Algebraics.divisor z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x)))), is_true (@in_mem Algebraics.divisor (@GRing.mul Algebraics.Implementation.ringType z y) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x))) *)
by rewrite mulrC; apply: dvdC_mull.
Qed.
Lemma dvdC_mul2r x y z : y != 0 -> (x * y %| z * y)%C = (x %| z)%C.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op Algebraics.Implementation.eqType y (GRing.zero Algebraics.Implementation.zmodType))), @eq bool (@in_mem Algebraics.divisor (@GRing.mul Algebraics.Implementation.ringType z y) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC (@GRing.mul Algebraics.Implementation.ringType x y)))) (@in_mem Algebraics.divisor z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x))) *)
move=> nz_y; rewrite !unfold_in !(mulIr_eq0 _ (mulIf nz_y)).
(* Goal: @eq bool (if @eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType Algebraics.Implementation.idomainType)) x (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType Algebraics.Implementation.idomainType))) then @eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType Algebraics.Implementation.idomainType)) z (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType Algebraics.Implementation.idomainType))) else @eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (floorC (@GRing.mul Algebraics.Implementation.ringType (@GRing.mul Algebraics.Implementation.ringType z y) (@GRing.inv Algebraics.Implementation.unitRingType (@GRing.mul Algebraics.Implementation.ringType x y))))) (@GRing.mul Algebraics.Implementation.ringType (@GRing.mul Algebraics.Implementation.ringType z y) (@GRing.inv Algebraics.Implementation.unitRingType (@GRing.mul Algebraics.Implementation.ringType x y)))) (if @eq_op Algebraics.Implementation.eqType x (GRing.zero Algebraics.Implementation.zmodType) then @eq_op Algebraics.Implementation.eqType z (GRing.zero Algebraics.Implementation.zmodType) else @eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (floorC (@GRing.mul Algebraics.Implementation.ringType z (@GRing.inv Algebraics.Implementation.unitRingType x)))) (@GRing.mul Algebraics.Implementation.ringType z (@GRing.inv Algebraics.Implementation.unitRingType x))) *)
by rewrite mulrAC invfM mulrA divfK.
Qed.
Lemma dvdC_mul2l x y z : y != 0 -> (y * x %| y * z)%C = (x %| z)%C.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op Algebraics.Implementation.eqType y (GRing.zero Algebraics.Implementation.zmodType))), @eq bool (@in_mem Algebraics.divisor (@GRing.mul Algebraics.Implementation.ringType y z) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC (@GRing.mul Algebraics.Implementation.ringType y x)))) (@in_mem Algebraics.divisor z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x))) *)
by rewrite !(mulrC y); apply: dvdC_mul2r.
Qed.
Lemma dvdC_trans x y z : (x %| y)%C -> (y %| z)%C -> (x %| z)%C.
Proof.
(* Goal: forall (_ : is_true (@in_mem Algebraics.divisor y (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x)))) (_ : is_true (@in_mem Algebraics.divisor z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC y)))), is_true (@in_mem Algebraics.divisor z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x))) *)
by move=> x_dv_y /dvdCP[m Zm ->]; apply: dvdC_mull.
Qed.
Lemma dvdC_refl x : (x %| x)%C.
Proof.
(* Goal: is_true (@in_mem Algebraics.divisor x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC x))) *)
by apply/dvdCP; exists 1; rewrite ?mul1r.
Qed.
Lemma dvdC_zmod x : zmod_closed (dvdC x).
Proof.
(* Goal: @GRing.zmod_closed Algebraics.Implementation.zmodType (dvdC x) *)
split=> [| _ _ /dvdCP[y Zy ->] /dvdCP[z Zz ->]]; first exact: dvdC0.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (@GRing.add Algebraics.Implementation.zmodType (@GRing.mul Algebraics.Implementation.ringType y x) (@GRing.opp Algebraics.Implementation.zmodType (@GRing.mul Algebraics.Implementation.ringType z x))) (@mem (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (predPredType (GRing.Zmodule.sort Algebraics.Implementation.zmodType)) (dvdC x))) *)
by rewrite -mulrBl dvdC_mull ?rpredB.
Qed.
Canonical dvdC_keyed x := KeyedPred (dvdC_key x).
Canonical dvdC_opprPred x := OpprPred (dvdC_zmod x).
Canonical dvdC_addrPred x := AddrPred (dvdC_zmod x).
Canonical dvdC_zmodPred x := ZmodPred (dvdC_zmod x).
Lemma dvdC_nat (p n : nat) : (p %| n)%C = (p %| n)%N.
Proof.
(* Goal: @eq bool (@in_mem Algebraics.divisor (nat_divisor n) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC (nat_divisor p)))) (dvdn p n) *)
rewrite unfold_in CintEge0 ?divr_ge0 ?invr_ge0 ?ler0n // !pnatr_eq0.
(* Goal: @eq bool (if @eq_op nat_eqType p O then @eq_op nat_eqType n O else @in_mem Algebraics.Implementation.type (@GRing.mul Algebraics.Implementation.ringType (nat_divisor n) (@GRing.inv Algebraics.Implementation.unitRingType (nat_divisor p))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) (dvdn p n) *)
have [-> | nz_p] := altP eqP; first by rewrite dvd0n.
(* Goal: @eq bool (@in_mem Algebraics.Implementation.type (@GRing.mul Algebraics.Implementation.ringType (nat_divisor n) (@GRing.inv Algebraics.Implementation.unitRingType (nat_divisor p))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) (dvdn p n) *)
apply/CnatP/dvdnP=> [[q def_q] | [q ->]]; exists q.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul Algebraics.Implementation.ringType (nat_divisor (muln q p)) (@GRing.inv Algebraics.Implementation.unitRingType (nat_divisor p))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) q) *)
(* Goal: @eq nat n (muln q p) *)
by apply/eqP; rewrite -eqC_nat natrM -def_q divfK ?pnatr_eq0.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul Algebraics.Implementation.ringType (nat_divisor (muln q p)) (@GRing.inv Algebraics.Implementation.unitRingType (nat_divisor p))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) q) *)
by rewrite [num in num / _]natrM mulfK ?pnatr_eq0.
Qed.
Lemma dvdC_int (p : nat) x : x \in Cint -> (p %| x)%C = (p %| `|floorC x|)%N.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)), @eq bool (@in_mem Algebraics.divisor x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC (nat_divisor p)))) (dvdn p (absz (floorC x))) *)
move=> Zx; rewrite -{1}(floorCK Zx) {1}[floorC x]intEsign.
(* Goal: @eq bool (@in_mem Algebraics.divisor (@intmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@GRing.mul int_Ring (@GRing.exp int_Ring (@GRing.opp (GRing.Ring.zmodType int_Ring) (GRing.one int_Ring)) (nat_of_bool (@Num.Def.ltr int_numDomainType (floorC x) (GRing.zero (Num.NumDomain.zmodType int_numDomainType))))) (Posz (absz (floorC x))))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC (nat_divisor p)))) (dvdn p (absz (floorC x))) *)
by rewrite rmorphMsign rpredMsign dvdC_nat.
Qed.
Lemma eqCmod_refl e x : (x == x %[mod e])%C.
Proof.
(* Goal: is_true (eqCmod e x x) *)
by rewrite /eqCmod subrr rpred0.
Qed.
Hint Resolve eqCmod_refl eqCmodm0 : core.
Lemma eqCmod0 e x : (x == 0 %[mod e])%C = (e %| x)%C.
Proof.
(* Goal: @eq bool (eqCmod e x (GRing.zero Algebraics.Implementation.zmodType)) (@in_mem Algebraics.divisor x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) (dvdC e))) *)
by rewrite /eqCmod subr0.
Qed.
Lemma eqCmod_sym e x y : ((x == y %[mod e]) = (y == x %[mod e]))%C.
Proof.
(* Goal: @eq bool (eqCmod e x y) (eqCmod e y x) *)
by rewrite /eqCmod -opprB rpredN.
Qed.
Lemma eqCmod_trans e y x z :
(x == y %[mod e] -> y == z %[mod e] -> x == z %[mod e])%C.
Proof.
(* Goal: forall (_ : is_true (eqCmod e x y)) (_ : is_true (eqCmod e y z)), is_true (eqCmod e x z) *)
by move=> Exy Eyz; rewrite /eqCmod -[x](subrK y) -addrA rpredD.
Qed.
Lemma eqCmod_transl e x y z :
(x == y %[mod e])%C -> (x == z %[mod e])%C = (y == z %[mod e])%C.
Proof.
(* Goal: forall _ : is_true (eqCmod e x y), @eq bool (eqCmod e x z) (eqCmod e y z) *)
by move/(sym_left_transitive (eqCmod_sym e) (@eqCmod_trans e)).
Qed.
Lemma eqCmod_transr e x y z :
(x == y %[mod e])%C -> (z == x %[mod e])%C = (z == y %[mod e])%C.
Proof.
(* Goal: forall _ : is_true (eqCmod e x y), @eq bool (eqCmod e z x) (eqCmod e z y) *)
by move/(sym_right_transitive (eqCmod_sym e) (@eqCmod_trans e)).
Qed.
Lemma eqCmodN e x y : (- x == y %[mod e])%C = (x == - y %[mod e])%C.
Proof.
(* Goal: @eq bool (eqCmod e (@GRing.opp Algebraics.Implementation.zmodType x) y) (eqCmod e x (@GRing.opp Algebraics.Implementation.zmodType y)) *)
by rewrite eqCmod_sym /eqCmod !opprK addrC.
Qed.
Lemma eqCmodDr e x y z : (y + x == z + x %[mod e])%C = (y == z %[mod e])%C.
Proof.
(* Goal: @eq bool (eqCmod e (@GRing.add Algebraics.Implementation.zmodType y x) (@GRing.add Algebraics.Implementation.zmodType z x)) (eqCmod e y z) *)
by rewrite /eqCmod addrAC opprD !addrA subrK.
Qed.
Lemma eqCmodDl e x y z : (x + y == x + z %[mod e])%C = (y == z %[mod e])%C.
Proof.
(* Goal: @eq bool (eqCmod e (@GRing.add Algebraics.Implementation.zmodType x y) (@GRing.add Algebraics.Implementation.zmodType x z)) (eqCmod e y z) *)
by rewrite !(addrC x) eqCmodDr.
Qed.
Lemma eqCmodD e x1 x2 y1 y2 :
(x1 == x2 %[mod e] -> y1 == y2 %[mod e] -> x1 + y1 == x2 + y2 %[mod e])%C.
Proof.
(* Goal: forall (_ : is_true (eqCmod e x1 x2)) (_ : is_true (eqCmod e y1 y2)), is_true (eqCmod e (@GRing.add Algebraics.Implementation.zmodType x1 y1) (@GRing.add Algebraics.Implementation.zmodType x2 y2)) *)
by rewrite -(eqCmodDl e x2 y1) -(eqCmodDr e y1); apply: eqCmod_trans.
Qed.
Lemma eqCmod_nat (e m n : nat) : (m == n %[mod e])%C = (m == n %[mod e]).
Proof.
(* Goal: @eq bool (eqCmod (nat_divisor e) (nat_divisor m) (nat_divisor n)) (@eq_op nat_eqType (modn m e) (modn n e)) *)
without loss lenm: m n / (n <= m)%N.
(* Goal: @eq bool (eqCmod (nat_divisor e) (nat_divisor m) (nat_divisor n)) (@eq_op nat_eqType (modn m e) (modn n e)) *)
(* Goal: forall _ : forall (m n : nat) (_ : is_true (leq n m)), @eq bool (eqCmod (nat_divisor e) (nat_divisor m) (nat_divisor n)) (@eq_op nat_eqType (modn m e) (modn n e)), @eq bool (eqCmod (nat_divisor e) (nat_divisor m) (nat_divisor n)) (@eq_op nat_eqType (modn m e) (modn n e)) *)
by move=> IH; case/orP: (leq_total m n) => /IH //; rewrite eqCmod_sym eq_sym.
(* Goal: @eq bool (eqCmod (nat_divisor e) (nat_divisor m) (nat_divisor n)) (@eq_op nat_eqType (modn m e) (modn n e)) *)
by rewrite /eqCmod -natrB // dvdC_nat eqn_mod_dvd.
Qed.
Lemma eqCmod0_nat (e m : nat) : (m == 0 %[mod e])%C = (e %| m)%N.
Proof.
(* Goal: @eq bool (eqCmod (nat_divisor e) (nat_divisor m) (GRing.zero Algebraics.Implementation.zmodType)) (dvdn e m) *)
by rewrite eqCmod0 dvdC_nat.
Qed.
Lemma eqCmodMr e :
{in Cint, forall z x y, x == y %[mod e] -> x * z == y * z %[mod e]}%C.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun z : Algebraics.Implementation.type => forall (x y : Algebraics.Implementation.type) (_ : is_true (eqCmod e x y)), is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType x z) (@GRing.mul Algebraics.Implementation.ringType y z))) (inPhantom (forall (z x y : Algebraics.Implementation.type) (_ : is_true (eqCmod e x y)), is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType x z) (@GRing.mul Algebraics.Implementation.ringType y z)))) *)
by move=> z Zz x y; rewrite /eqCmod -mulrBl => /dvdC_mulr->.
Qed.
Lemma eqCmodMl e :
{in Cint, forall z x y, x == y %[mod e] -> z * x == z * y %[mod e]}%C.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun z : Algebraics.Implementation.type => forall (x y : Algebraics.Implementation.type) (_ : is_true (eqCmod e x y)), is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType z x) (@GRing.mul Algebraics.Implementation.ringType z y))) (inPhantom (forall (z x y : Algebraics.Implementation.type) (_ : is_true (eqCmod e x y)), is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType z x) (@GRing.mul Algebraics.Implementation.ringType z y)))) *)
by move=> z Zz x y Exy; rewrite !(mulrC z) eqCmodMr.
Qed.
Lemma eqCmodMl0 e : {in Cint, forall x, x * e == 0 %[mod e]}%C.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun x : Algebraics.Implementation.type => is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType x e) (GRing.zero Algebraics.Implementation.zmodType))) (inPhantom (forall x : Algebraics.Implementation.type, is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType x e) (GRing.zero Algebraics.Implementation.zmodType)))) *)
by move=> x Zx; rewrite -(mulr0 x) eqCmodMl.
Qed.
Lemma eqCmodMr0 e : {in Cint, forall x, e * x == 0 %[mod e]}%C.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun x : Algebraics.Implementation.type => is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType e x) (GRing.zero Algebraics.Implementation.zmodType))) (inPhantom (forall x : Algebraics.Implementation.type, is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType e x) (GRing.zero Algebraics.Implementation.zmodType)))) *)
by move=> x Zx; rewrite /= mulrC eqCmodMl0.
Qed.
Lemma eqCmod_addl_mul e : {in Cint, forall x y, x * e + y == y %[mod e]}%C.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun x : Algebraics.Implementation.type => forall y : Algebraics.Implementation.type, is_true (eqCmod e (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.mul Algebraics.Implementation.ringType x e) y) y)) (inPhantom (forall x y : Algebraics.Implementation.type, is_true (eqCmod e (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.mul Algebraics.Implementation.ringType x e) y) y))) *)
by move=> x Zx y; rewrite -{2}[y]add0r eqCmodDr eqCmodMl0.
Qed.
Lemma eqCmodM e : {in Cint & Cint, forall x1 y2 x2 y1,
x1 == x2 %[mod e] -> y1 == y2 %[mod e] -> x1 * y1 == x2 * y2 %[mod e]}%C.
Proof.
(* Goal: @prop_in11 Algebraics.Implementation.type Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun x1 y2 : Algebraics.Implementation.type => forall (x2 y1 : Algebraics.Implementation.type) (_ : is_true (eqCmod e x1 x2)) (_ : is_true (eqCmod e y1 y2)), is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType x1 y1) (@GRing.mul Algebraics.Implementation.ringType x2 y2))) (inPhantom (forall (x1 y2 x2 y1 : Algebraics.Implementation.type) (_ : is_true (eqCmod e x1 x2)) (_ : is_true (eqCmod e y1 y2)), is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType x1 y1) (@GRing.mul Algebraics.Implementation.ringType x2 y2)))) *)
move=> x1 y2 Zx1 Zy2 x2 y1 eq_x /(eqCmodMl Zx1)/eqCmod_trans-> //.
(* Goal: is_true (eqCmod e (@GRing.mul Algebraics.Implementation.ringType x1 y2) (@GRing.mul Algebraics.Implementation.ringType x2 y2)) *)
exact: eqCmodMr.
Qed.
Lemma ratCK : cancel QtoC CtoQ.
Proof.
(* Goal: @cancel Algebraics.Implementation.type rat (@ratr Algebraics.Implementation.unitRingType : forall _ : rat, Algebraics.Implementation.type) getCrat *)
by rewrite /getCrat; case: getCrat_subproof.
Qed.
Lemma getCratK : {in Crat, cancel CtoQ QtoC}.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat) (fun x : Algebraics.Implementation.type => @eq Algebraics.Implementation.type (@ratr Algebraics.Implementation.unitRingType (getCrat x)) x) (inPhantom (@cancel rat Algebraics.Implementation.type getCrat (@ratr Algebraics.Implementation.unitRingType : forall _ : rat, Algebraics.Implementation.type))) *)
by move=> x /eqP.
Qed.
Lemma Crat_rat (a : rat) : QtoC a \in Crat.
Proof.
(* Goal: is_true (@in_mem Algebraics.Implementation.type (@ratr Algebraics.Implementation.unitRingType a) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat)) *)
by rewrite unfold_in ratCK.
Qed.
Lemma CratP x : reflect (exists a, x = QtoC a) (x \in Crat).
Proof.
(* Goal: Bool.reflect (@ex rat (fun a : rat => @eq Algebraics.Implementation.type x (@ratr Algebraics.Implementation.unitRingType a))) (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat)) *)
by apply: (iffP eqP) => [<- | [a ->]]; [exists (CtoQ x) | rewrite ratCK].
Qed.
Lemma Crat1 : 1 \in Crat. Proof. by apply/CratP; exists 1; rewrite rmorph1. Qed.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat)) *)
by apply/CratP; exists 1; rewrite rmorph1.
Qed.
Fact Crat_divring_closed : divring_closed Crat.
Proof.
(* Goal: @GRing.divring_closed Algebraics.Implementation.unitRingType Crat *)
split=> // _ _ /CratP[x ->] /CratP[y ->].
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@ratr Algebraics.Implementation.unitRingType x) (@GRing.inv Algebraics.Implementation.unitRingType (@ratr Algebraics.Implementation.unitRingType y))) (@mem (GRing.UnitRing.sort Algebraics.Implementation.unitRingType) (predPredType (GRing.UnitRing.sort Algebraics.Implementation.unitRingType)) Crat)) *)
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.UnitRing.zmodType Algebraics.Implementation.unitRingType)) (@GRing.add (GRing.UnitRing.zmodType Algebraics.Implementation.unitRingType) (@ratr Algebraics.Implementation.unitRingType x) (@GRing.opp (GRing.UnitRing.zmodType Algebraics.Implementation.unitRingType) (@ratr Algebraics.Implementation.unitRingType y))) (@mem (GRing.Zmodule.sort (GRing.UnitRing.zmodType Algebraics.Implementation.unitRingType)) (predPredType (GRing.Zmodule.sort (GRing.UnitRing.zmodType Algebraics.Implementation.unitRingType))) Crat)) *)
by rewrite -rmorphB Crat_rat.
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@ratr Algebraics.Implementation.unitRingType x) (@GRing.inv Algebraics.Implementation.unitRingType (@ratr Algebraics.Implementation.unitRingType y))) (@mem (GRing.UnitRing.sort Algebraics.Implementation.unitRingType) (predPredType (GRing.UnitRing.sort Algebraics.Implementation.unitRingType)) Crat)) *)
by rewrite -fmorph_div Crat_rat.
Qed.
Canonical Crat_keyed := KeyedPred Crat_key.
Canonical Crat_opprPred := OpprPred Crat_divring_closed.
Canonical Crat_addrPred := AddrPred Crat_divring_closed.
Canonical Crat_mulrPred := MulrPred Crat_divring_closed.
Canonical Crat_zmodPred := ZmodPred Crat_divring_closed.
Canonical Crat_semiringPred := SemiringPred Crat_divring_closed.
Canonical Crat_smulrPred := SmulrPred Crat_divring_closed.
Canonical Crat_divrPred := DivrPred Crat_divring_closed.
Canonical Crat_subringPred := SubringPred Crat_divring_closed.
Canonical Crat_sdivrPred := SdivrPred Crat_divring_closed.
Canonical Crat_divringPred := DivringPred Crat_divring_closed.
Lemma rpred_Crat S (ringS : divringPred S) (kS : keyed_pred ringS) :
{subset Crat <= kS}.
Proof.
(* Goal: @sub_mem Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) S (@GRing.Pred.opp_key (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) S (@GRing.Pred.zmod_opp (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) S (@GRing.Pred.subring_zmod (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) S (@GRing.Pred.divring_ring Algebraics.Implementation.unitRingType S ringS)))) kS)) *)
by move=> _ /CratP[a ->]; apply: rpred_rat.
Qed.
Lemma conj_Crat z : z \in Crat -> z^* = z.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type z (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) z) z *)
by move/getCratK <-; rewrite fmorph_div !rmorph_int.
Qed.
Lemma Creal_Crat : {subset Crat <= Creal}.
Proof.
(* Goal: @sub_mem Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat) (@mem (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (predPredType (Num.NumDomain.sort Algebraics.Implementation.numDomainType)) (@has_quality O (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.Rreal Algebraics.Implementation.numDomainType))) *)
by move=> x /conj_Crat/CrealP.
Qed.
Lemma Cint_rat a : (QtoC a \in Cint) = (a \in Qint).
Lemma minCpolyP x :
{p | minCpoly x = pQtoC p /\ p \is monic
& forall q, root (pQtoC q) x = (p %| q)%R}.
Proof.
(* Goal: @sig2 (@poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring))) (fun p : @poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring)) => and (@eq (@poly_of Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type)) (minCpoly x) (@map_poly rat_Ring (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@ratr Algebraics.Implementation.unitRingType) p)) (is_true (@in_mem (@poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring))) p (@mem (@poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring))) (predPredType (@poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring)))) (@has_quality O (@poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring))) (@monic rat_Ring)))))) (fun p : @poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring)) => forall q : @poly_of rat_Ring (Phant (GRing.Ring.sort rat_Ring)), @eq bool (@root (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@map_poly rat_Ring (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@ratr Algebraics.Implementation.unitRingType) q) x) (Pdiv.Field.dvdp rat_iDomain p q)) *)
by rewrite /minCpoly; case: (minCpoly_subproof x) => p; exists p.
Qed.
Lemma minCpoly_monic x : minCpoly x \is monic.
Proof.
(* Goal: is_true (@in_mem (@poly_of Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type)) (minCpoly x) (@mem (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType))) (predPredType (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)))) (@has_quality O (@poly_of Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType))) (@monic Algebraics.Implementation.ringType)))) *)
by have [p [-> mon_p] _] := minCpolyP x; rewrite map_monic.
Qed.
Lemma minCpoly_eq0 x : (minCpoly x == 0) = false.
Proof.
(* Goal: @eq bool (@eq_op (poly_eqType Algebraics.Implementation.ringType) (minCpoly x) (GRing.zero (poly_zmodType Algebraics.Implementation.ringType))) false *)
exact/negbTE/monic_neq0/minCpoly_monic.
Qed.
Lemma root_minCpoly x : root (minCpoly x) x.
Proof.
(* Goal: is_true (@root Algebraics.Implementation.ringType (minCpoly x) x) *)
by have [p [-> _] ->] := minCpolyP x.
Qed.
Lemma size_minCpoly x : (1 < size (minCpoly x))%N.
Proof.
(* Goal: is_true (leq (S (S O)) (@size (GRing.Ring.sort Algebraics.Implementation.ringType) (@polyseq Algebraics.Implementation.ringType (minCpoly x)))) *)
by apply: root_size_gt1 (root_minCpoly x); rewrite ?minCpoly_eq0.
Qed.
Section AutC.
Implicit Type nu : {rmorphism algC -> algC}.
Lemma aut_Cnat nu : {in Cnat, nu =1 id}.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x) ((fun x0 : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => x0) x)) (inPhantom (@eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => x))) *)
by move=> _ /CnatP[n ->]; apply: rmorph_nat.
Qed.
Lemma aut_Cint nu : {in Cint, nu =1 id}.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x) ((fun x0 : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => x0) x)) (inPhantom (@eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => x))) *)
by move=> _ /CintP[m ->]; apply: rmorph_int.
Qed.
Lemma aut_Crat nu : {in Crat, nu =1 id}.
Proof.
(* Goal: @prop_in1 Algebraics.Implementation.type (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x) ((fun x0 : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => x0) x)) (inPhantom (@eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType) => x))) *)
by move=> _ /CratP[a ->]; apply: fmorph_rat.
Qed.
Lemma Cnat_aut nu x : (nu x \in Cnat) = (x \in Cnat).
Proof.
(* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by do [apply/idP/idP=> Nx; have:= aut_Cnat nu Nx] => [/fmorph_inj <- | ->].
Qed.
Lemma Cint_aut nu x : (nu x \in Cint) = (x \in Cint).
Proof.
(* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)) *)
by rewrite !CintE -rmorphN !Cnat_aut.
Qed.
Lemma Crat_aut nu x : (nu x \in Crat) = (x \in Crat).
Proof.
(* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat)) (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat)) *)
apply/idP/idP=> /CratP[a] => [|->]; last by rewrite fmorph_rat Crat_rat.
(* Goal: forall _ : @eq Algebraics.Implementation.type (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x) (@ratr Algebraics.Implementation.unitRingType a), is_true (@in_mem Algebraics.Implementation.type x (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Crat)) *)
by rewrite -(fmorph_rat nu) => /fmorph_inj->; apply: Crat_rat.
Qed.
Lemma algC_invaut_subproof nu x : {y | nu y = x}.
Definition algC_invaut nu x := sval (algC_invaut_subproof nu x).
Lemma algC_invautK nu : cancel (algC_invaut nu) nu.
Proof.
(* Goal: @cancel (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) Algebraics.Implementation.type (algC_invaut nu) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu) *)
by move=> x; rewrite /algC_invaut; case: algC_invaut_subproof.
Qed.
Lemma algC_autK nu : cancel nu (algC_invaut nu).
Proof.
(* Goal: @cancel (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu) (algC_invaut nu) *)
exact: inj_can_sym (algC_invautK nu) (fmorph_inj nu).
Qed.
Fact algC_invaut_is_rmorphism nu : rmorphism (algC_invaut nu).
Proof.
(* Goal: @GRing.RMorphism.class_of Algebraics.Implementation.ringType Algebraics.Implementation.ringType (algC_invaut nu) *)
exact: can2_rmorphism (algC_autK nu) (algC_invautK nu).
Qed.
Canonical algC_invaut_additive nu := Additive (algC_invaut_is_rmorphism nu).
Canonical algC_invaut_rmorphism nu := RMorphism (algC_invaut_is_rmorphism nu).
Lemma minCpoly_aut nu x : minCpoly (nu x) = minCpoly x.
Proof.
(* Goal: @eq (@poly_of Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type)) (minCpoly (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x)) (minCpoly x) *)
wlog suffices dvd_nu: nu x / (minCpoly x %| minCpoly (nu x))%R.
(* Goal: is_true (Pdiv.Field.dvdp Algebraics.Implementation.idomainType (minCpoly x) (minCpoly (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x))) *)
(* Goal: @eq (@poly_of Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type)) (minCpoly (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x)) (minCpoly x) *)
apply/eqP; rewrite -eqp_monic ?minCpoly_monic //; apply/andP; split=> //.
(* Goal: is_true (Pdiv.Field.dvdp Algebraics.Implementation.idomainType (minCpoly x) (minCpoly (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x))) *)
(* Goal: is_true (@dvdp Algebraics.Implementation.idomainType (minCpoly (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x)) (minCpoly x)) *)
by rewrite -{2}(algC_autK nu x) dvd_nu.
(* Goal: is_true (Pdiv.Field.dvdp Algebraics.Implementation.idomainType (minCpoly x) (minCpoly (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x))) *)
have [[q [Dq _] min_q] [q1 [Dq1 _] _]] := (minCpolyP x, minCpolyP (nu x)).
(* Goal: is_true (Pdiv.Field.dvdp Algebraics.Implementation.idomainType (minCpoly x) (minCpoly (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) nu x))) *)
rewrite Dq Dq1 dvdp_map -min_q -(fmorph_root nu) -map_poly_comp.
(* Goal: is_true (@root Algebraics.Implementation.ringType (@map_poly rat_Ring Algebraics.Implementation.ringType (@funcomp (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (GRing.Ring.sort rat_Ring) tt (@GRing.Additive.apply (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType)) (GRing.Ring.zmodType Algebraics.Implementation.ringType) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType), GRing.Ring.sort Algebraics.Implementation.ringType)) (@GRing.RMorphism.additive (GRing.Field.ringType Algebraics.Implementation.fieldType) Algebraics.Implementation.ringType (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType), GRing.Ring.sort Algebraics.Implementation.ringType)) nu)) (@ratr Algebraics.Implementation.unitRingType)) q1) (@GRing.RMorphism.apply (GRing.Field.ringType Algebraics.Implementation.fieldType) Algebraics.Implementation.ringType (Phant (forall _ : GRing.Field.sort Algebraics.Implementation.fieldType, GRing.Ring.sort Algebraics.Implementation.ringType)) nu x)) *)
by rewrite (eq_map_poly (fmorph_rat nu)) -Dq1 root_minCpoly.
Qed.
End AutC.
Section AutLmodC.
Variables (U V : lmodType algC) (f : {additive U -> V}).
Lemma raddfZ_Cnat a u : a \in Cnat -> f (a *: u) = a *: f u.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type a (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)), @eq (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (@GRing.Additive.apply (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) U) (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) (Phant (forall _ : @GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) U, @GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) f (@GRing.scale Algebraics.Implementation.ringType U a u)) (@GRing.scale Algebraics.Implementation.ringType V a (@GRing.Additive.apply (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) U) (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) (Phant (forall _ : @GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) U, @GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) f u)) *)
by case/CnatP=> n ->; apply: raddfZnat.
Qed.
Lemma raddfZ_Cint a u : a \in Cint -> f (a *: u) = a *: f u.
Proof.
(* Goal: forall _ : is_true (@in_mem Algebraics.Implementation.type a (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint)), @eq (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (@GRing.Additive.apply (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) U) (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) (Phant (forall _ : @GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) U, @GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) f (@GRing.scale Algebraics.Implementation.ringType U a u)) (@GRing.scale Algebraics.Implementation.ringType V a (@GRing.Additive.apply (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) U) (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) (Phant (forall _ : @GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) U, @GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) f u)) *)
by case/CintP=> m ->; rewrite !scaler_int raddfMz.
Qed.
End AutLmodC.
Section PredCmod.
Variable V : lmodType algC.
Lemma rpredZ_Cnat S (addS : @addrPred V S) (kS : keyed_pred addS) :
{in Cnat & kS, forall z u, z *: u \in kS}.
Proof.
(* Goal: @prop_in11 Algebraics.Implementation.type (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) S (@GRing.Pred.add_key (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S addS) kS)) (fun (z : Algebraics.Implementation.type) (u : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V)))) => is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V)))) (@GRing.scale Algebraics.Implementation.ringType V z u) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) S (@GRing.Pred.add_key (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S addS) kS)))) (inPhantom (forall (z : Algebraics.Implementation.type) (u : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V)))), is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V)))) (@GRing.scale Algebraics.Implementation.ringType V z u) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) S (@GRing.Pred.add_key (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S addS) kS))))) *)
by move=> _ u /CnatP[n ->]; apply: rpredZnat.
Qed.
Lemma rpredZ_Cint S (subS : @zmodPred V S) (kS : keyed_pred subS) :
{in Cint & kS, forall z u, z *: u \in kS}.
Proof.
(* Goal: @prop_in11 Algebraics.Implementation.type (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cint) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) S (@GRing.Pred.opp_key (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S (@GRing.Pred.zmod_opp (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S subS)) kS)) (fun (z : Algebraics.Implementation.type) (u : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V)))) => is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V)))) (@GRing.scale Algebraics.Implementation.ringType V z u) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) S (@GRing.Pred.opp_key (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S (@GRing.Pred.zmod_opp (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S subS)) kS)))) (inPhantom (forall (z : Algebraics.Implementation.type) (u : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V)))), is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) V)))) (@GRing.scale Algebraics.Implementation.ringType V z u) (@mem (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) (predPredType (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V))) (@unkey_pred (GRing.Zmodule.sort (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V)) S (@GRing.Pred.opp_key (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S (@GRing.Pred.zmod_opp (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant Algebraics.Implementation.type) V) S subS)) kS))))) *)
by move=> _ u /CintP[m ->]; apply: rpredZint.
Qed.
End PredCmod.
End AlgebraicsTheory.
Hint Resolve Creal0 Creal1 Cnat_nat Cnat0 Cnat1 Cint0 Cint1 floorC0 Crat0 Crat1 : core.
Hint Resolve dvdC0 dvdC_refl eqCmod_refl eqCmodm0 : core.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearorder.
Section Euclid.
Context `{Ax:euclidean_neutral}.
Lemma lemma_parallelNC :
forall A B C D,
Par A B C D ->
nCol A B C /\ nCol A C D /\ nCol B C D /\ nCol A B D.
Proof.
(* Goal: forall (A B C D : @Point Ax) (_ : @Par Ax A B C D), and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
intros.
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
let Tf:=fresh in assert (Tf:exists M a b c d, (neq A B /\ neq C D /\ Col A B a /\ Col A B b /\ neq a b /\ Col C D c /\ Col C D d /\ neq c d /\ ~ Meet A B C D /\ BetS a M d /\ BetS c M b)) by (conclude_def Par );destruct Tf as [M[a[b[c[d]]]]];spliter.
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
assert (~ Col A C D).
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
(* Goal: not (@Col Ax A C D) *)
{
(* Goal: not (@Col Ax A C D) *)
intro.
(* Goal: False *)
assert (Col C D A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (Col A B A) by (conclude_def Col ).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
}
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
assert (~ Col A B C).
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
(* Goal: not (@Col Ax A B C) *)
{
(* Goal: not (@Col Ax A B C) *)
intro.
(* Goal: False *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (Col C D C) by (conclude_def Col ).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
}
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
assert (~ Col B C D).
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
(* Goal: not (@Col Ax B C D) *)
{
(* Goal: not (@Col Ax B C D) *)
intro.
(* Goal: False *)
assert (Col C D B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (Col A B B) by (conclude_def Col ).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
}
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
assert (~ Col A B D).
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
(* Goal: not (@Col Ax A B D) *)
{
(* Goal: not (@Col Ax A B D) *)
intro.
(* Goal: False *)
assert (eq D D) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (Col C D D) by (conclude_def Col ).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
}
(* Goal: and (@nCol Ax A B C) (and (@nCol Ax A C D) (and (@nCol Ax B C D) (@nCol Ax A B D))) *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_lessthannotequal.
Require Export GeoCoq.Elements.OriginalProofs.lemma_together.
Require Export GeoCoq.Elements.OriginalProofs.lemma_ray5.
Require Export GeoCoq.Elements.OriginalProofs.lemma_subtractequals.
Require Export GeoCoq.Elements.OriginalProofs.lemma_ondiameter.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_togethera
: forall A B C D F G P Q a b c : Point,
TG A a B b C c ->
Cong D F A a ->
Cong F G B b ->
BetS D F G ->
Cong P Q C c -> Lt P Q D G.
Proof.
(* Goal: forall (A B C D F G P Q a b c : @Point Ax0) (_ : @TG Ax0 A a B b C c) (_ : @Cong Ax0 D F A a) (_ : @Cong Ax0 F G B b) (_ : @BetS Ax0 D F G) (_ : @Cong Ax0 P Q C c), @Lt Ax0 P Q D G *)
intros.
(* Goal: @Lt Ax0 P Q D G *)
apply (lemma_together A B C D F G P Q a b c);auto.
Qed.
Lemma proposition_22 :
forall A B C E F a b c,
TG A a B b C c -> TG A a C c B b -> TG B b C c A a -> neq F E ->
exists X Y, Cong F X B b /\ Cong F Y A a /\ Cong X Y C c /\ Out F E X /\ Triangle F X Y.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.euclidean_tactics.
Section Euclid.
Context `{Ax:euclidean_neutral}.
Lemma lemma_congruencesymmetric :
forall A B C D,
Cong B C A D ->
Cong A D B C.
Proof.
(* Goal: forall (A B C D : @Point Ax) (_ : @Cong Ax B C A D), @Cong Ax A D B C *)
intros.
(* Goal: @Cong Ax A D B C *)
assert (Cong B C B C) by (conclude cn_congruencereflexive).
(* Goal: @Cong Ax A D B C *)
assert (Cong A D B C) by (conclude cn_congruencetransitive).
(* Goal: @Cong Ax A D B C *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.proposition_20.
Require Export GeoCoq.Elements.OriginalProofs.lemma_TGsymmetric.
Require Export GeoCoq.Elements.OriginalProofs.lemma_TGflip.
Require Export GeoCoq.Elements.OriginalProofs.proposition_22.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_23 :
forall A B C D E,
neq A B -> nCol D C E ->
exists X Y, Out A B Y /\ CongA X A Y D C E.
Proof.
(* Goal: forall (A B C D E : @Point Ax0) (_ : @neq Ax0 A B) (_ : @nCol Ax0 D C E), @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (~ Col E C D).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
(* Goal: not (@Col Ax0 E C D) *)
{
(* Goal: not (@Col Ax0 E C D) *)
intro.
(* Goal: False *)
assert (Col D C E) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (~ Col C E D).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
(* Goal: not (@Col Ax0 C E D) *)
{
(* Goal: not (@Col Ax0 C E D) *)
intro.
(* Goal: False *)
assert (Col D C E) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Triangle D C E) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Triangle C E D) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Triangle E C D) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG C D D E C E) by (conclude proposition_20).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG C E E D C D) by (conclude proposition_20).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG E C C D E D) by (conclude proposition_20).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG C D E C E D) by (conclude lemma_TGsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG C D D E E C) by (forward_using lemma_TGflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG D E C D E C) by (conclude lemma_TGsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG E D C D E C) by (forward_using lemma_TGflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG C D E D E C) by (conclude lemma_TGsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (TG E C E D C D) by (forward_using lemma_TGflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
let Tf:=fresh in assert (Tf:exists G F, (Cong A G E C /\ Cong A F C D /\ Cong G F E D /\ Out A B G /\ Triangle A G F)) by (conclude proposition_22);destruct Tf as [G[F]];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Cong A G C E) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Cong F G D E) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (eq E E) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (eq D D) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (eq F F) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (~ eq C E).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
(* Goal: not (@eq Ax0 C E) *)
{
(* Goal: not (@eq Ax0 C E) *)
intro.
(* Goal: False *)
assert (Col D C E) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (~ eq C D).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
(* Goal: not (@eq Ax0 C D) *)
{
(* Goal: not (@eq Ax0 C D) *)
intro.
(* Goal: False *)
assert (Col C D E) by (conclude_def Col ).
(* Goal: False *)
assert (Col D C E) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Out C E E) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Out C D D) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (~ Col F A G).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
(* Goal: not (@Col Ax0 F A G) *)
{
(* Goal: not (@Col Ax0 F A G) *)
intro.
(* Goal: False *)
assert (Col A G F) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (nCol A G F) by (conclude_def Triangle ).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (~ eq A F).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
(* Goal: not (@eq Ax0 A F) *)
{
(* Goal: not (@eq Ax0 A F) *)
intro.
(* Goal: False *)
assert (Col A F G) by (conclude_def Col ).
(* Goal: False *)
assert (Col F A G) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Out A F F) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (~ eq A G).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
(* Goal: not (@eq Ax0 A G) *)
{
(* Goal: not (@eq Ax0 A G) *)
intro.
(* Goal: False *)
assert (Col A G F) by (conclude_def Col ).
(* Goal: False *)
assert (Col F A G) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (Out A G G) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
assert (CongA F A G D C E) by (conclude_def CongA ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (@CongA Ax0 X A Y D C E))) *)
close.
Qed.
End Euclid.
|
Require Import Arith List.
Require Import BellantoniCook.Lib BellantoniCook.MultiPoly BellantoniCook.Cobham BellantoniCook.CobhamLib.
Lemma Zero_correct n l:
length (Sem (Zero_e n) l) = 0.
Proof.
(* Goal: @eq nat (@length bool (Sem (Zero_e n) l)) O *)
trivial.
Qed.
Lemma One_correct n l:
length (Sem (One_e n) l) = 1.
Proof.
(* Goal: @eq nat (@length bool (Sem (One_e n) l)) (S O) *)
trivial.
Qed.
Definition Succ_e : Cobham :=
Comp 1 (Succ true) [Proj 1 0].
Lemma arity_Succ : arity Succ_e = ok_arity 1.
Proof.
(* Goal: @eq Arity (arity Succ_e) (ok_arity (S O)) *)
trivial.
Qed.
Lemma rec_bounded_Succ :
rec_bounded Succ_e.
Proof.
(* Goal: rec_bounded Succ_e *)
simpl; tauto.
Qed.
Lemma Succ_correct l :
length (Sem Succ_e l) = S (length (Sem (Proj 1 0) l)).
Proof.
(* Goal: @eq nat (@length bool (Sem Succ_e l)) (S (@length bool (Sem (Proj (S O) O) l))) *)
trivial.
Qed.
Opaque Succ_e.
Fixpoint Nat_e (n:nat) : Cobham :=
match n with
| 0 => Zero
| S n' => Comp 0 Succ_e [Nat_e n']
end.
Lemma arity_Nat n : arity (Nat_e n) = ok_arity 0.
Proof.
(* Goal: @eq Arity (arity (Nat_e n)) (ok_arity O) *)
induction n; trivial; simpl.
(* Goal: @eq Arity match arity Succ_e with | error_Rec a a0 a1 a2 => error_Comp (error_Rec a a0 a1 a2) (@cons Arity (arity (Nat_e n)) (@nil Arity)) | error_Comp a l => error_Comp (error_Comp a l) (@cons Arity (arity (Nat_e n)) (@nil Arity)) | error_Proj n0 n1 => error_Comp (error_Proj n0 n1) (@cons Arity (arity (Nat_e n)) (@nil Arity)) | ok_arity nh => if andb (Nat.eqb nh (S O)) (andb (arity_eq (arity (Nat_e n)) (ok_arity O)) true) then ok_arity O else error_Comp (ok_arity nh) (@cons Arity (arity (Nat_e n)) (@nil Arity)) end (ok_arity O) *)
rewrite arity_Succ, IHn; simpl; trivial.
Qed.
Lemma rec_bounded_Nat n :
rec_bounded (Nat_e n).
Proof.
(* Goal: rec_bounded (Nat_e n) *)
induction n; simpl; trivial; split; auto.
(* Goal: rec_bounded Succ_e *)
apply rec_bounded_Succ.
Qed.
Lemma Nat_correct : forall n l,
length (Sem (Nat_e n) l) = n.
Proof.
(* Goal: forall (n : nat) (l : list (list bool)), @eq nat (@length bool (Sem (Nat_e n) l)) n *)
induction n; simpl; intros; trivial.
(* Goal: @eq nat (@length bool (Sem Succ_e (@cons (list bool) (Sem (Nat_e n) l) (@nil (list bool))))) (S n) *)
rewrite Succ_correct; simpl; auto.
Qed.
Notation Plus_e := App_e.
Notation arity_Plus := arity_App.
Notation rec_bounded_Plus := rec_bounded_App.
Lemma Plus_correct : forall l,
length (Sem Plus_e l) = length (hd nil l) + length (hd nil (tl l)).
Proof.
(* Goal: forall l : list (list bool), @eq nat (@length bool (Sem App_e l)) (Init.Nat.add (@length bool (@hd (list bool) (@nil bool) l)) (@length bool (@hd (list bool) (@nil bool) (@tl (list bool) l)))) *)
intro l; rewrite App_correct.
(* Goal: @eq nat (@length bool (@app bool (@hd (list bool) (@nil bool) l) (@hd (list bool) (@nil bool) (@tl (list bool) l)))) (Init.Nat.add (@length bool (@hd (list bool) (@nil bool) l)) (@length bool (@hd (list bool) (@nil bool) (@tl (list bool) l)))) *)
apply app_length.
Qed.
Opaque Plus_e.
Fixpoint Plusl_e (ar:nat)(el:list Cobham) : Cobham :=
match el with
| nil => Zero_e ar
| e' :: el' => Comp ar Plus_e [e'; Plusl_e ar el']
end.
Lemma arity_Plusl ar el :
andl (fun e => arity e = ok_arity ar) el ->
arity (Plusl_e ar el) = ok_arity ar.
Proof.
(* Goal: forall _ : @andl Cobham (fun e : Cobham => @eq Arity (arity e) (ok_arity ar)) el, @eq Arity (arity (Plusl_e ar el)) (ok_arity ar) *)
induction el as [ | e' el' IH]; simpl; trivial; intros (H1, H2).
(* Goal: @eq Arity match arity App_e with | error_Rec a a0 a1 a2 => error_Comp (error_Rec a a0 a1 a2) (@cons Arity (arity e') (@cons Arity (arity (Plusl_e ar el')) (@nil Arity))) | error_Comp a l => error_Comp (error_Comp a l) (@cons Arity (arity e') (@cons Arity (arity (Plusl_e ar el')) (@nil Arity))) | error_Proj n n0 => error_Comp (error_Proj n n0) (@cons Arity (arity e') (@cons Arity (arity (Plusl_e ar el')) (@nil Arity))) | ok_arity nh => if andb (Nat.eqb nh (S (S O))) (andb (arity_eq (arity e') (ok_arity ar)) (andb (arity_eq (arity (Plusl_e ar el')) (ok_arity ar)) true)) then ok_arity ar else error_Comp (ok_arity nh) (@cons Arity (arity e') (@cons Arity (arity (Plusl_e ar el')) (@nil Arity))) end (ok_arity ar) *)
rewrite arity_Plus, IH, H1; simpl; trivial.
(* Goal: @eq Arity (if andb (Nat.eqb ar ar) (andb (Nat.eqb ar ar) true) then ok_arity ar else error_Comp (ok_arity (S (S O))) (@cons Arity (ok_arity ar) (@cons Arity (ok_arity ar) (@nil Arity)))) (ok_arity ar) *)
rewrite <- beq_nat_refl; simpl; trivial.
Qed.
Lemma rec_bounded_Plusl ar el :
andl rec_bounded el -> rec_bounded (Plusl_e ar el).
Proof.
(* Goal: forall _ : @andl Cobham rec_bounded el, rec_bounded (Plusl_e ar el) *)
induction el as [ | e' el' IH]; simpl; auto.
(* Goal: forall _ : and (rec_bounded e') (@andl Cobham rec_bounded el'), and (rec_bounded App_e) (and (rec_bounded e') (and (rec_bounded (Plusl_e ar el')) True)) *)
intros [H1 H2]; split.
(* Goal: and (rec_bounded e') (and (rec_bounded (Plusl_e ar el')) True) *)
(* Goal: rec_bounded App_e *)
apply rec_bounded_Plus.
(* Goal: and (rec_bounded e') (and (rec_bounded (Plusl_e ar el')) True) *)
tauto.
Qed.
Lemma Plusl_correct : forall ar el l,
length (Sem (Plusl_e ar el) l) = plusl (map (fun e => length (Sem e l)) el).
Proof.
(* Goal: forall (ar : nat) (el : list Cobham) (l : list (list bool)), @eq nat (@length bool (Sem (Plusl_e ar el) l)) (plusl (@map Cobham nat (fun e : Cobham => @length bool (Sem e l)) el)) *)
induction el as [ | e' el' IH]; simpl; trivial; intros.
(* Goal: @eq nat (@length bool (Sem App_e (@cons (list bool) (Sem e' l) (@cons (list bool) (Sem (Plusl_e ar el') l) (@nil (list bool)))))) (Init.Nat.add (@length bool (Sem e' l)) (plusl (@map Cobham nat (fun e : Cobham => @length bool (Sem e l)) el'))) *)
rewrite Plus_correct; simpl; f_equal; apply IH.
Qed.
Opaque Plusl_e.
Definition Mult_e : Cobham :=
Rec2
(Zero_e 1)
(Comp 3 Plus_e [Proj 3 1; Proj 3 2])
(Comp 2 Smash [
One_e 2;
Comp 2 Smash [Comp 2 (Succ true) [Proj 2 0]; Comp 2 (Succ true) [Proj 2 1] ] ] ).
Lemma arity_Mult : arity Mult_e = ok_arity 2.
Proof.
(* Goal: @eq Arity (arity Mult_e) (ok_arity (S (S O))) *)
trivial.
Qed.
Lemma rec_bounded_Mult : rec_bounded Mult_e.
Lemma Mult_correct : forall l,
length (Sem Mult_e l) = length (hd nil l) * length (hd nil (tl l)).
Proof.
(* Goal: forall l : list (list bool), @eq nat (@length bool (Sem Mult_e l)) (Init.Nat.mul (@length bool (@hd (list bool) (@nil bool) l)) (@length bool (@hd (list bool) (@nil bool) (@tl (list bool) l)))) *)
simpl; intros [ | v1 ]; simpl; trivial; intros.
(* Goal: @eq nat (@length bool (sem_Rec (fun _ : list (list bool) => @nil bool) (fun vl : list (list bool) => Sem App_e (@cons (list bool) (@nth (list bool) (S O) vl (@nil bool)) (@cons (list bool) (@nth (list bool) (S (S O)) vl (@nil bool)) (@nil (list bool))))) (fun vl : list (list bool) => Sem App_e (@cons (list bool) (@nth (list bool) (S O) vl (@nil bool)) (@cons (list bool) (@nth (list bool) (S (S O)) vl (@nil bool)) (@nil (list bool))))) v1 l)) (Init.Nat.mul (@length bool v1) (@length bool (@hd (list bool) (@nil bool) l))) *)
induction v1; simpl; trivial.
(* Goal: @eq nat (@length bool (if a then Sem App_e (@cons (list bool) (sem_Rec (fun _ : list (list bool) => @nil bool) (fun vl : list (list bool) => Sem App_e (@cons (list bool) (@nth (list bool) (S O) vl (@nil bool)) (@cons (list bool) (@nth (list bool) (S (S O)) vl (@nil bool)) (@nil (list bool))))) (fun vl : list (list bool) => Sem App_e (@cons (list bool) (@nth (list bool) (S O) vl (@nil bool)) (@cons (list bool) (@nth (list bool) (S (S O)) vl (@nil bool)) (@nil (list bool))))) v1 l) (@cons (list bool) (@nth (list bool) O l (@nil bool)) (@nil (list bool)))) else Sem App_e (@cons (list bool) (sem_Rec (fun _ : list (list bool) => @nil bool) (fun vl : list (list bool) => Sem App_e (@cons (list bool) (@nth (list bool) (S O) vl (@nil bool)) (@cons (list bool) (@nth (list bool) (S (S O)) vl (@nil bool)) (@nil (list bool))))) (fun vl : list (list bool) => Sem App_e (@cons (list bool) (@nth (list bool) (S O) vl (@nil bool)) (@cons (list bool) (@nth (list bool) (S (S O)) vl (@nil bool)) (@nil (list bool))))) v1 l) (@cons (list bool) (@nth (list bool) O l (@nil bool)) (@nil (list bool)))))) (Init.Nat.add (@length bool (@hd (list bool) (@nil bool) l)) (Init.Nat.mul (@length bool v1) (@length bool (@hd (list bool) (@nil bool) l)))) *)
case a; simpl; rewrite Plus_correct; simpl; rewrite IHv1; destruct l; simpl; omega.
Qed.
Opaque Mult_e.
Fixpoint Multl_e (ar:nat)(el:list Cobham) : Cobham :=
match el with
| nil => One_e ar
| e' :: el' => Comp ar Mult_e [e'; Multl_e ar el']
end.
Lemma arity_Multl ar el :
andl (fun e => arity e = ok_arity ar) el ->
arity (Multl_e ar el) = ok_arity ar.
Proof.
(* Goal: forall _ : @andl Cobham (fun e : Cobham => @eq Arity (arity e) (ok_arity ar)) el, @eq Arity (arity (Multl_e ar el)) (ok_arity ar) *)
induction el as [ | e' el' IH]; simpl; trivial; intros [H1 H2].
(* Goal: @eq Arity match arity Mult_e with | error_Rec a a0 a1 a2 => error_Comp (error_Rec a a0 a1 a2) (@cons Arity (arity e') (@cons Arity (arity (Multl_e ar el')) (@nil Arity))) | error_Comp a l => error_Comp (error_Comp a l) (@cons Arity (arity e') (@cons Arity (arity (Multl_e ar el')) (@nil Arity))) | error_Proj n n0 => error_Comp (error_Proj n n0) (@cons Arity (arity e') (@cons Arity (arity (Multl_e ar el')) (@nil Arity))) | ok_arity nh => if andb (Nat.eqb nh (S (S O))) (andb (arity_eq (arity e') (ok_arity ar)) (andb (arity_eq (arity (Multl_e ar el')) (ok_arity ar)) true)) then ok_arity ar else error_Comp (ok_arity nh) (@cons Arity (arity e') (@cons Arity (arity (Multl_e ar el')) (@nil Arity))) end (ok_arity ar) *)
rewrite arity_Mult, IH, H1; simpl; trivial; rewrite <- beq_nat_refl; simpl; trivial.
Qed.
Lemma rec_bounded_Multl ar el :
andl rec_bounded el -> rec_bounded (Multl_e ar el).
Proof.
(* Goal: forall _ : @andl Cobham rec_bounded el, rec_bounded (Multl_e ar el) *)
induction el as [ | e' el' IH]; simpl; auto; intros [H1 H2]; split.
(* Goal: and (rec_bounded e') (and (rec_bounded (Multl_e ar el')) True) *)
(* Goal: rec_bounded Mult_e *)
apply rec_bounded_Mult.
(* Goal: and (rec_bounded e') (and (rec_bounded (Multl_e ar el')) True) *)
tauto.
Qed.
Lemma Multl_correct : forall ar el l,
length (Sem (Multl_e ar el) l) =
multl (map (fun e => length (Sem e l)) el).
Proof.
(* Goal: forall (ar : nat) (el : list Cobham) (l : list (list bool)), @eq nat (@length bool (Sem (Multl_e ar el) l)) (multl (@map Cobham nat (fun e : Cobham => @length bool (Sem e l)) el)) *)
induction el as [ | e' el' IH]; simpl; trivial; intros.
(* Goal: @eq nat (@length bool (Sem Mult_e (@cons (list bool) (Sem e' l) (@cons (list bool) (Sem (Multl_e ar el') l) (@nil (list bool)))))) (Init.Nat.mul (@length bool (Sem e' l)) (multl (@map Cobham nat (fun e : Cobham => @length bool (Sem e l)) el'))) *)
rewrite Mult_correct; simpl; auto.
Qed.
Fixpoint Power_e (n:nat) : Cobham :=
match n with
| 0 => One_e 1
| S n' => Comp 1 Mult_e [Proj 1 0; Power_e n']
end.
Lemma arity_Power n : arity (Power_e n) = ok_arity 1.
Proof.
(* Goal: @eq Arity (arity (Power_e n)) (ok_arity (S O)) *)
induction n as [ | n' IH]; trivial; simpl.
(* Goal: @eq Arity match arity Mult_e with | error_Rec a a0 a1 a2 => error_Comp (error_Rec a a0 a1 a2) (@cons Arity (ok_arity (S O)) (@cons Arity (arity (Power_e n')) (@nil Arity))) | error_Comp a l => error_Comp (error_Comp a l) (@cons Arity (ok_arity (S O)) (@cons Arity (arity (Power_e n')) (@nil Arity))) | error_Proj n n0 => error_Comp (error_Proj n n0) (@cons Arity (ok_arity (S O)) (@cons Arity (arity (Power_e n')) (@nil Arity))) | ok_arity nh => if andb (Nat.eqb nh (S (S O))) (andb (arity_eq (arity (Power_e n')) (ok_arity (S O))) true) then ok_arity (S O) else error_Comp (ok_arity nh) (@cons Arity (ok_arity (S O)) (@cons Arity (arity (Power_e n')) (@nil Arity))) end (ok_arity (S O)) *)
rewrite arity_Mult, <- beq_nat_refl, IH; simpl; trivial.
Qed.
Lemma rec_bounded_Power n : rec_bounded (Power_e n).
Proof.
(* Goal: rec_bounded (Power_e n) *)
induction n as [ | n' IH]; simpl; intuition.
(* Goal: rec_bounded Mult_e *)
apply rec_bounded_Mult.
Qed.
Lemma Power_correct : forall n l,
length (Sem (Power_e n) l) = power (length (hd nil l)) n.
Proof.
(* Goal: forall (n : nat) (l : list (list bool)), @eq nat (@length bool (Sem (Power_e n) l)) (power (@length bool (@hd (list bool) (@nil bool) l)) n) *)
induction n as [ | n' IH]; simpl; intros; trivial.
(* Goal: @eq nat (@length bool (Sem Mult_e (@cons (list bool) (@nth (list bool) O l (@nil bool)) (@cons (list bool) (Sem (Power_e n') l) (@nil (list bool)))))) (Init.Nat.mul (@length bool (@hd (list bool) (@nil bool) l)) (power (@length bool (@hd (list bool) (@nil bool) l)) n')) *)
rewrite Mult_correct; simpl.
(* Goal: @eq nat (Init.Nat.mul (@length bool (@nth (list bool) O l (@nil bool))) (@length bool (Sem (Power_e n') l))) (Init.Nat.mul (@length bool (@hd (list bool) (@nil bool) l)) (power (@length bool (@hd (list bool) (@nil bool) l)) n')) *)
rewrite IH, hd_nth_0; trivial.
Qed.
Definition Poly_pow (ar:nat) (xn:pow) : Cobham :=
Comp ar (Power_e (snd xn)) [Proj ar (fst xn)].
Lemma arity_Poly_pow : forall ar xn,
pWF_pow ar xn -> arity (Poly_pow ar xn) = ok_arity ar.
Proof.
(* Goal: forall (ar : nat) (xn : pow) (_ : pWF_pow ar xn), @eq Arity (arity (Poly_pow ar xn)) (ok_arity ar) *)
unfold pWF_pow; intros ar [x n] H; simpl in *.
(* Goal: @eq Arity match arity (Power_e n) with | error_Rec a a0 a1 a2 => error_Comp (error_Rec a a0 a1 a2) (@cons Arity (if match ar with | O => false | S m' => Nat.leb x m' end then ok_arity ar else error_Proj ar x) (@nil Arity)) | error_Comp a l => error_Comp (error_Comp a l) (@cons Arity (if match ar with | O => false | S m' => Nat.leb x m' end then ok_arity ar else error_Proj ar x) (@nil Arity)) | error_Proj n n0 => error_Comp (error_Proj n n0) (@cons Arity (if match ar with | O => false | S m' => Nat.leb x m' end then ok_arity ar else error_Proj ar x) (@nil Arity)) | ok_arity nh => if andb (Nat.eqb nh (S O)) (andb (arity_eq (if match ar with | O => false | S m' => Nat.leb x m' end then ok_arity ar else error_Proj ar x) (ok_arity ar)) true) then ok_arity ar else error_Comp (ok_arity nh) (@cons Arity (if match ar with | O => false | S m' => Nat.leb x m' end then ok_arity ar else error_Proj ar x) (@nil Arity)) end (ok_arity ar) *)
rewrite arity_Power, <- beq_nat_refl; simpl.
(* Goal: @eq Arity (if andb (arity_eq (if match ar with | O => false | S m' => Nat.leb x m' end then ok_arity ar else error_Proj ar x) (ok_arity ar)) true then ok_arity ar else error_Comp (ok_arity (S O)) (@cons Arity (if match ar with | O => false | S m' => Nat.leb x m' end then ok_arity ar else error_Proj ar x) (@nil Arity))) (ok_arity ar) *)
destruct ar; simpl in *.
(* Goal: @eq Arity (if andb (arity_eq (if Nat.leb x ar then ok_arity (S ar) else error_Proj (S ar) x) (ok_arity (S ar))) true then ok_arity (S ar) else error_Comp (ok_arity (S O)) (@cons Arity (if Nat.leb x ar then ok_arity (S ar) else error_Proj (S ar) x) (@nil Arity))) (ok_arity (S ar)) *)
(* Goal: @eq Arity (error_Comp (ok_arity (S O)) (@cons Arity (error_Proj O x) (@nil Arity))) (ok_arity O) *)
contradict H; omega.
(* Goal: @eq Arity (if andb (arity_eq (if Nat.leb x ar then ok_arity (S ar) else error_Proj (S ar) x) (ok_arity (S ar))) true then ok_arity (S ar) else error_Comp (ok_arity (S O)) (@cons Arity (if Nat.leb x ar then ok_arity (S ar) else error_Proj (S ar) x) (@nil Arity))) (ok_arity (S ar)) *)
case_eq (leb x ar); simpl; intro H0.
(* Goal: @eq Arity (error_Comp (ok_arity (S O)) (@cons Arity (error_Proj (S ar) x) (@nil Arity))) (ok_arity (S ar)) *)
(* Goal: @eq Arity (if andb (Nat.eqb ar ar) true then ok_arity (S ar) else error_Comp (ok_arity (S O)) (@cons Arity (ok_arity (S ar)) (@nil Arity))) (ok_arity (S ar)) *)
rewrite <- beq_nat_refl; simpl; trivial.
(* Goal: @eq Arity (error_Comp (ok_arity (S O)) (@cons Arity (error_Proj (S ar) x) (@nil Arity))) (ok_arity (S ar)) *)
apply leb_complete_conv in H0.
(* Goal: @eq Arity (error_Comp (ok_arity (S O)) (@cons Arity (error_Proj (S ar) x) (@nil Arity))) (ok_arity (S ar)) *)
contradict H0; omega.
Qed.
Lemma rec_bounded_Poly_pow : forall ar xn,
rec_bounded (Poly_pow ar xn).
Proof.
(* Goal: forall (ar : nat) (xn : pow), rec_bounded (Poly_pow ar xn) *)
simpl; intros _ xn; split; auto.
(* Goal: rec_bounded (Power_e (@snd nat nat xn)) *)
apply rec_bounded_Power.
Qed.
Lemma Poly_pow_correct : forall ar xn l,
length (Sem (Poly_pow ar xn) l) = peval_pow xn (map (@length _) l).
Proof.
(* Goal: forall (ar : nat) (xn : pow) (l : list (list bool)), @eq nat (@length bool (Sem (Poly_pow ar xn) l)) (peval_pow xn (@map (list bool) nat (@length bool) l)) *)
intros ar [x n] l; simpl.
(* Goal: @eq nat (@length bool (Sem (Power_e n) (@cons (list bool) (@nth (list bool) x l (@nil bool)) (@nil (list bool))))) (peval_pow (@pair nat nat x n) (@map (list bool) nat (@length bool) l)) *)
rewrite Power_correct; unfold peval_pow; simpl.
(* Goal: @eq nat (power (@length bool (@nth (list bool) x l (@nil bool))) n) (power (@nth nat x (@map (list bool) nat (@length bool) l) O) n) *)
rewrite (@map_nth _ _ (@length _) l nil); trivial.
Qed.
Opaque Poly_pow.
Definition Poly_mon (ar:nat)(m:mon) : Cobham :=
Comp ar Mult_e [Comp ar (Nat_e (fst m)) nil; Multl_e ar (map (Poly_pow ar) (snd m))].
Lemma arity_Poly_mon : forall ar m,
pWF_mon ar m ->
arity (Poly_mon ar m) = ok_arity ar.
Proof.
(* Goal: forall (ar : nat) (m : mon) (_ : pWF_mon ar m), @eq Arity (arity (Poly_mon ar m)) (ok_arity ar) *)
unfold pWF_mon; intros ar [a xl] H; simpl.
(* Goal: @eq Arity match arity Mult_e with | error_Rec a0 a1 a2 a3 => error_Comp (error_Rec a0 a1 a2 a3) (@cons Arity match arity (Nat_e a) with | error_Rec a a4 a5 a6 => error_Comp (error_Rec a a4 a5 a6) (@nil Arity) | error_Comp a l => error_Comp (error_Comp a l) (@nil Arity) | error_Proj n n0 => error_Comp (error_Proj n n0) (@nil Arity) | ok_arity nh => if andb (Nat.eqb nh O) true then ok_arity ar else error_Comp (ok_arity nh) (@nil Arity) end (@cons Arity (arity (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) (@nil Arity))) | error_Comp a0 l => error_Comp (error_Comp a0 l) (@cons Arity match arity (Nat_e a) with | error_Rec a a1 a2 a3 => error_Comp (error_Rec a a1 a2 a3) (@nil Arity) | error_Comp a l0 => error_Comp (error_Comp a l0) (@nil Arity) | error_Proj n n0 => error_Comp (error_Proj n n0) (@nil Arity) | ok_arity nh => if andb (Nat.eqb nh O) true then ok_arity ar else error_Comp (ok_arity nh) (@nil Arity) end (@cons Arity (arity (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) (@nil Arity))) | error_Proj n n0 => error_Comp (error_Proj n n0) (@cons Arity match arity (Nat_e a) with | error_Rec a a0 a1 a2 => error_Comp (error_Rec a a0 a1 a2) (@nil Arity) | error_Comp a l => error_Comp (error_Comp a l) (@nil Arity) | error_Proj n1 n2 => error_Comp (error_Proj n1 n2) (@nil Arity) | ok_arity nh => if andb (Nat.eqb nh O) true then ok_arity ar else error_Comp (ok_arity nh) (@nil Arity) end (@cons Arity (arity (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) (@nil Arity))) | ok_arity nh => if andb (Nat.eqb nh (S (S O))) (andb (arity_eq match arity (Nat_e a) with | error_Rec a a0 a1 a2 => error_Comp (error_Rec a a0 a1 a2) (@nil Arity) | error_Comp a l => error_Comp (error_Comp a l) (@nil Arity) | error_Proj n n0 => error_Comp (error_Proj n n0) (@nil Arity) | ok_arity nh0 => if andb (Nat.eqb nh0 O) true then ok_arity ar else error_Comp (ok_arity nh0) (@nil Arity) end (ok_arity ar)) (andb (arity_eq (arity (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) (ok_arity ar)) true)) then ok_arity ar else error_Comp (ok_arity nh) (@cons Arity match arity (Nat_e a) with | error_Rec a a0 a1 a2 => error_Comp (error_Rec a a0 a1 a2) (@nil Arity) | error_Comp a l => error_Comp (error_Comp a l) (@nil Arity) | error_Proj n n0 => error_Comp (error_Proj n n0) (@nil Arity) | ok_arity nh0 => if andb (Nat.eqb nh0 O) true then ok_arity ar else error_Comp (ok_arity nh0) (@nil Arity) end (@cons Arity (arity (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) (@nil Arity))) end (ok_arity ar) *)
rewrite arity_Mult, arity_Nat, arity_Multl; simpl.
(* Goal: @andl Cobham (fun e : Cobham => @eq Arity (arity e) (ok_arity ar)) (@map pow Cobham (Poly_pow ar) xl) *)
(* Goal: @eq Arity (if andb (Nat.eqb ar ar) (andb (Nat.eqb ar ar) true) then ok_arity ar else error_Comp (ok_arity (S (S O))) (@cons Arity (ok_arity ar) (@cons Arity (ok_arity ar) (@nil Arity)))) (ok_arity ar) *)
rewrite <- beq_nat_refl; simpl; trivial.
(* Goal: @andl Cobham (fun e : Cobham => @eq Arity (arity e) (ok_arity ar)) (@map pow Cobham (Poly_pow ar) xl) *)
induction xl; simpl in *; trivial; split; try tauto.
(* Goal: @eq Arity (arity (Poly_pow ar a0)) (ok_arity ar) *)
apply arity_Poly_pow; tauto.
Qed.
Lemma rec_bounded_Poly_mon : forall ar m,
rec_bounded (Poly_mon ar m).
Proof.
(* Goal: forall (ar : nat) (m : mon), rec_bounded (Poly_mon ar m) *)
intros ar [a xl]; simpl; split.
(* Goal: and (and (rec_bounded (Nat_e a)) True) (and (rec_bounded (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) True) *)
(* Goal: rec_bounded Mult_e *)
apply rec_bounded_Mult.
(* Goal: and (and (rec_bounded (Nat_e a)) True) (and (rec_bounded (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) True) *)
split.
(* Goal: and (rec_bounded (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) True *)
(* Goal: and (rec_bounded (Nat_e a)) True *)
split; trivial.
(* Goal: and (rec_bounded (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) True *)
(* Goal: rec_bounded (Nat_e a) *)
apply rec_bounded_Nat.
(* Goal: and (rec_bounded (Multl_e ar (@map pow Cobham (Poly_pow ar) xl))) True *)
split; trivial.
(* Goal: rec_bounded (Multl_e ar (@map pow Cobham (Poly_pow ar) xl)) *)
apply rec_bounded_Multl.
(* Goal: @andl Cobham rec_bounded (@map pow Cobham (Poly_pow ar) xl) *)
rewrite <- forall_andl; intros.
(* Goal: rec_bounded x *)
rewrite in_map_iff in H.
(* Goal: rec_bounded x *)
destruct H as [xn [H _] ]; subst.
(* Goal: rec_bounded (Poly_pow ar xn) *)
apply rec_bounded_Poly_pow.
Qed.
Lemma Poly_mon_correct : forall ar m l,
length (Sem (Poly_mon ar m) l) = peval_mon m (map (@length _) l).
Proof.
(* Goal: forall (ar : nat) (m : mon) (l : list (list bool)), @eq nat (@length bool (Sem (Poly_mon ar m) l)) (peval_mon m (@map (list bool) nat (@length bool) l)) *)
intros ar [a xl] l; simpl.
(* Goal: @eq nat (@length bool (Sem Mult_e (@cons (list bool) (Sem (Nat_e a) (@nil (list bool))) (@cons (list bool) (Sem (Multl_e ar (@map pow Cobham (Poly_pow ar) xl)) l) (@nil (list bool)))))) (peval_mon (@pair nat (list pow) a xl) (@map (list bool) nat (@length bool) l)) *)
rewrite Mult_correct; simpl.
(* Goal: @eq nat (Init.Nat.mul (@length bool (Sem (Nat_e a) (@nil (list bool)))) (@length bool (Sem (Multl_e ar (@map pow Cobham (Poly_pow ar) xl)) l))) (peval_mon (@pair nat (list pow) a xl) (@map (list bool) nat (@length bool) l)) *)
rewrite Nat_correct, Multl_correct; unfold peval_mon; simpl.
(* Goal: @eq nat (Init.Nat.mul a (multl (@map Cobham nat (fun e : Cobham => @length bool (Sem e l)) (@map pow Cobham (Poly_pow ar) xl)))) (Init.Nat.mul a (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) l)) xl))) *)
rewrite map_map.
(* Goal: @eq nat (Init.Nat.mul a (multl (@map pow nat (fun x : pow => @length bool (Sem (Poly_pow ar x) l)) xl))) (Init.Nat.mul a (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) l)) xl))) *)
induction xl; simpl; trivial.
(* Goal: @eq nat (Init.Nat.mul a (Init.Nat.mul (@length bool (Sem (Poly_pow ar a0) l)) (multl (@map pow nat (fun x : pow => @length bool (Sem (Poly_pow ar x) l)) xl)))) (Init.Nat.mul a (Init.Nat.mul (peval_pow a0 (@map (list bool) nat (@length bool) l)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) l)) xl)))) *)
rewrite Poly_pow_correct.
(* Goal: @eq nat (Init.Nat.mul a (Init.Nat.mul (peval_pow a0 (@map (list bool) nat (@length bool) l)) (multl (@map pow nat (fun x : pow => @length bool (Sem (Poly_pow ar x) l)) xl)))) (Init.Nat.mul a (Init.Nat.mul (peval_pow a0 (@map (list bool) nat (@length bool) l)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) l)) xl)))) *)
unfold peval_pow in *.
(* Goal: @eq nat (Init.Nat.mul a (Init.Nat.mul (power (@nth nat (@fst nat nat a0) (@map (list bool) nat (@length bool) l) O) (@snd nat nat a0)) (multl (@map pow nat (fun x : pow => @length bool (Sem (Poly_pow ar x) l)) xl)))) (Init.Nat.mul a (Init.Nat.mul (power (@nth nat (@fst nat nat a0) (@map (list bool) nat (@length bool) l) O) (@snd nat nat a0)) (multl (@map pow nat (fun x : pow => power (@nth nat (@fst nat nat x) (@map (list bool) nat (@length bool) l) O) (@snd nat nat x)) xl)))) *)
rewrite (@map_nth _ _ (@length _) l nil).
(* Goal: @eq nat (Init.Nat.mul a (Init.Nat.mul (power (@length bool (@nth (list bool) (@fst nat nat a0) l (@nil bool))) (@snd nat nat a0)) (multl (@map pow nat (fun x : pow => @length bool (Sem (Poly_pow ar x) l)) xl)))) (Init.Nat.mul a (Init.Nat.mul (power (@length bool (@nth (list bool) (@fst nat nat a0) l (@nil bool))) (@snd nat nat a0)) (multl (@map pow nat (fun x : pow => power (@nth nat (@fst nat nat x) (@map (list bool) nat (@length bool) l) O) (@snd nat nat x)) xl)))) *)
ring [IHxl].
Qed.
Opaque Poly_mon.
Definition Poly (p : pol) : Cobham :=
Plusl_e (fst p) (map (Poly_mon (fst p)) (snd p)).
Lemma arity_Poly : forall p,
pWF p ->
arity (Poly p) = ok_arity (parity p).
Proof.
(* Goal: forall (p : pol) (_ : pWF p), @eq Arity (arity (Poly p)) (ok_arity (@fst nat (list mon) p)) *)
unfold pWF, pWF', pWF_mon, pWF_pow; intros [ar ml] H.
(* Goal: @eq Arity (arity (Poly (@pair nat (list mon) ar ml))) (ok_arity (@fst nat (list mon) (@pair nat (list mon) ar ml))) *)
unfold Poly.
(* Goal: @eq Arity (arity (Plusl_e (@fst nat (list mon) (@pair nat (list mon) ar ml)) (@map mon Cobham (Poly_mon (@fst nat (list mon) (@pair nat (list mon) ar ml))) (@snd nat (list mon) (@pair nat (list mon) ar ml))))) (ok_arity (@fst nat (list mon) (@pair nat (list mon) ar ml))) *)
rewrite arity_Plusl; trivial.
(* Goal: @andl Cobham (fun e : Cobham => @eq Arity (arity e) (ok_arity (@fst nat (list mon) (@pair nat (list mon) ar ml)))) (@map mon Cobham (Poly_mon (@fst nat (list mon) (@pair nat (list mon) ar ml))) (@snd nat (list mon) (@pair nat (list mon) ar ml))) *)
induction ml; simpl in *; trivial.
(* Goal: and (@eq Arity (arity (Poly_mon ar a)) (ok_arity ar)) (@andl Cobham (fun e : Cobham => @eq Arity (arity e) (ok_arity ar)) (@map mon Cobham (Poly_mon ar) ml)) *)
split; try tauto.
(* Goal: @eq Arity (arity (Poly_mon ar a)) (ok_arity ar) *)
apply arity_Poly_mon; tauto.
Qed.
Lemma rec_bounded_Poly : forall p,
rec_bounded (Poly p).
Proof.
(* Goal: forall p : pol, rec_bounded (Poly p) *)
intros [ar ml]; unfold Poly; simpl.
(* Goal: rec_bounded (Plusl_e ar (@map mon Cobham (Poly_mon ar) ml)) *)
apply rec_bounded_Plusl.
(* Goal: @andl Cobham rec_bounded (@map mon Cobham (Poly_mon ar) ml) *)
rewrite <- forall_andl; intros e He.
(* Goal: rec_bounded e *)
rewrite in_map_iff in He.
(* Goal: rec_bounded e *)
destruct He as [m [He _] ]; subst.
(* Goal: rec_bounded (Poly_mon ar m) *)
apply rec_bounded_Poly_mon.
Qed.
Lemma Poly_correct : forall p l,
length (Sem (Poly p) l) = peval p (map (@length _) l).
Proof.
(* Goal: forall (p : pol) (l : list (list bool)), @eq nat (@length bool (Sem (Poly p) l)) (peval p (@map (list bool) nat (@length bool) l)) *)
unfold Poly; intros [ar ml] l; simpl.
(* Goal: @eq nat (@length bool (Sem (Plusl_e ar (@map mon Cobham (Poly_mon ar) ml)) l)) (peval (@pair nat (list mon) ar ml) (@map (list bool) nat (@length bool) l)) *)
rewrite Plusl_correct; unfold peval; simpl.
(* Goal: @eq nat (plusl (@map Cobham nat (fun e : Cobham => @length bool (Sem e l)) (@map mon Cobham (Poly_mon ar) ml))) (plusl (@map mon nat (fun m : mon => peval_mon m (@map (list bool) nat (@length bool) l)) ml)) *)
rewrite map_map.
(* Goal: @eq nat (plusl (@map mon nat (fun x : mon => @length bool (Sem (Poly_mon ar x) l)) ml)) (plusl (@map mon nat (fun m : mon => peval_mon m (@map (list bool) nat (@length bool) l)) ml)) *)
induction ml; simpl; trivial.
(* Goal: @eq nat (Init.Nat.add (@length bool (Sem (Poly_mon ar a) l)) (plusl (@map mon nat (fun x : mon => @length bool (Sem (Poly_mon ar x) l)) ml))) (Init.Nat.add (peval_mon a (@map (list bool) nat (@length bool) l)) (plusl (@map mon nat (fun m : mon => peval_mon m (@map (list bool) nat (@length bool) l)) ml))) *)
rewrite Poly_mon_correct.
(* Goal: @eq nat (Init.Nat.add (peval_mon a (@map (list bool) nat (@length bool) l)) (plusl (@map mon nat (fun x : mon => @length bool (Sem (Poly_mon ar x) l)) ml))) (Init.Nat.add (peval_mon a (@map (list bool) nat (@length bool) l)) (plusl (@map mon nat (fun m : mon => peval_mon m (@map (list bool) nat (@length bool) l)) ml))) *)
unfold peval_mon in *.
(* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (@fst nat (list pow) a) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) l)) (@snd nat (list pow) a)))) (plusl (@map mon nat (fun x : mon => @length bool (Sem (Poly_mon ar x) l)) ml))) (Init.Nat.add (Init.Nat.mul (@fst nat (list pow) a) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) l)) (@snd nat (list pow) a)))) (plusl (@map mon nat (fun m : mon => Init.Nat.mul (@fst nat (list pow) m) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) l)) (@snd nat (list pow) m)))) ml))) *)
rewrite IHml; trivial.
Qed.
Opaque Poly.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_equalitysymmetric.
Section Euclid.
Context `{Ax:euclidean_neutral}.
Lemma lemma_inequalitysymmetric :
forall A B,
neq A B ->
neq B A.
Proof.
(* Goal: forall (A B : @Point Ax) (_ : @neq Ax A B), @neq Ax B A *)
intros.
(* Goal: @neq Ax B A *)
assert (~ eq B A).
(* Goal: @neq Ax B A *)
(* Goal: not (@eq Ax B A) *)
{
(* Goal: not (@eq Ax B A) *)
intro.
(* Goal: False *)
assert (eq A B) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
contradict.
(* BG Goal: @neq Ax B A *)
}
(* Goal: @neq Ax B A *)
close.
Qed.
End Euclid.
|
Require Import Eqdep_dec.
Require Export Field.
Require Export Q_order.
Lemma Q_Ring_Theory :
ring_theory Zero Qone Qplus Qmult Qminus Qopp (eq(A:=Q)).
Proof.
(* Goal: @ring_theory Q Zero Qone Qplus Qmult Qminus Qopp (@eq Q) *)
split; intros n m p || intros n m || intros n; solve [ first [ apply Qplus_sym | apply Qplus_assoc | apply Qmult_sym | apply Qmult_assoc | apply Qplus_zero_left | apply Qmult_one_left | apply Q_opp_def | apply Q_distr_left | reflexivity ]].
Qed.
Lemma Qinv_defT : forall n : Q, n <> Zero -> Qmult (Qinv n) n = Qone.
Proof.
(* Goal: forall (n : Q) (_ : not (@eq Q n Zero)), @eq Q (Qmult (Qinv n) n) Qone *)
intros n Hn; rewrite Qmult_sym; apply Qinv_def; intro; apply Hn; assumption.
Qed.
Lemma QField :
field_theory Zero Qone Qplus Qmult Qminus Qopp Qdiv Qinv (eq(A:=Q)).
Proof.
(* Goal: @field_theory Q Zero Qone Qplus Qmult Qminus Qopp Qdiv Qinv (@eq Q) *)
constructor.
(* Goal: forall (p : Q) (_ : not (@eq Q p Zero)), @eq Q (Qmult (Qinv p) p) Qone *)
(* Goal: forall p q : Q, @eq Q (Qdiv p q) (Qmult p (Qinv q)) *)
(* Goal: not (@eq Q Qone Zero) *)
(* Goal: @ring_theory Q Zero Qone Qplus Qmult Qminus Qopp (@eq Q) *)
apply Q_Ring_Theory.
(* Goal: forall (p : Q) (_ : not (@eq Q p Zero)), @eq Q (Qmult (Qinv p) p) Qone *)
(* Goal: forall p q : Q, @eq Q (Qdiv p q) (Qmult p (Qinv q)) *)
(* Goal: not (@eq Q Qone Zero) *)
discriminate.
(* Goal: forall (p : Q) (_ : not (@eq Q p Zero)), @eq Q (Qmult (Qinv p) p) Qone *)
(* Goal: forall p q : Q, @eq Q (Qdiv p q) (Qmult p (Qinv q)) *)
reflexivity.
(* Goal: forall (p : Q) (_ : not (@eq Q p Zero)), @eq Q (Qmult (Qinv p) p) Qone *)
exact Qinv_defT.
Qed.
Ltac isQcst t :=
match t with
Zero => true
| Qpos ?p => isQcst p
| Qneg ?p => isQcst p
| nR ?p => isQcst p
| dL ?p => isQcst p
| One => true
| Qone => true
| _ => false
end.
Ltac Qcst t :=
match isQcst t with
| true => t
| _ => InitialRing.NotConstant
end.
Add Field Qfield : QField (decidable Q_eq_prop, constants [Qcst]).
Definition not_eq2eqT (A : Set) (x y : A) (H1 : x <> y) :
x <> y := fun H2 : x = y => H1 (H2).
Ltac Field := field.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Monoid_cat.
Require Export Sgroup_facts.
Require Export Monoid_facts.
Require Export Monoid_util.
Require Export Abelian_group_facts.
Section Free_abelian_monoid_def.
Variable V : SET.
Inductive FaM : Type :=
| Var : V -> FaM
| Law : FaM -> FaM -> FaM
| Unit : FaM.
Inductive eqFaM : FaM -> FaM -> Prop :=
| eqFaM_Var : forall x y : V, Equal x y -> (eqFaM (Var x) (Var y):Prop)
| eqFaM_law :
forall x x' y y' : FaM,
eqFaM x x' -> eqFaM y y' -> (eqFaM (Law x y) (Law x' y'):Prop)
| eqFaM_law_assoc :
forall x y z : FaM, eqFaM (Law (Law x y) z) (Law x (Law y z)):Prop
| eqFaM_law0r : forall x : FaM, eqFaM (Law x Unit) x:Prop
| eqFaM_law0l : forall x : FaM, eqFaM (Law Unit x) x:Prop
| eqFaM_refl : forall x : FaM, eqFaM x x:Prop
| eqFaM_sym : forall x y : FaM, eqFaM x y -> (eqFaM y x:Prop)
| eqFaM_trans :
forall x y z : FaM, eqFaM x y -> eqFaM y z -> (eqFaM x z:Prop)
| eqFaM_com : forall x y : FaM, eqFaM (Law x y) (Law y x).
Hint Resolve eqFaM_Var eqFaM_law eqFaM_law_assoc eqFaM_law0r eqFaM_law0l
eqFaM_refl eqFaM_com: algebra.
Hint Immediate eqFaM_sym: algebra.
Lemma eqFaM_Equiv : equivalence eqFaM.
Proof.
(* Goal: @equivalence FaM eqFaM *)
red in |- *.
(* Goal: and (@reflexive FaM eqFaM) (@partial_equivalence FaM eqFaM) *)
split; [ try assumption | idtac ].
(* Goal: @partial_equivalence FaM eqFaM *)
(* Goal: @reflexive FaM eqFaM *)
exact eqFaM_refl.
(* Goal: @partial_equivalence FaM eqFaM *)
red in |- *.
(* Goal: and (@transitive FaM eqFaM) (@symmetric FaM eqFaM) *)
split; [ try assumption | idtac ].
(* Goal: @symmetric FaM eqFaM *)
(* Goal: @transitive FaM eqFaM *)
exact eqFaM_trans.
(* Goal: @symmetric FaM eqFaM *)
exact eqFaM_sym.
Qed.
Definition FaM_set := Build_Setoid eqFaM_Equiv.
Definition FreeAbelianMonoid : ABELIAN_MONOID.
Proof.
(* Goal: Ob ABELIAN_MONOID *)
apply (BUILD_ABELIAN_MONOID (E:=FaM_set) (genlaw:=Law) (e:=Unit)).
(* Goal: forall x y : Carrier FaM_set, @Equal FaM_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaM_set, @Equal FaM_set (Law Unit x) x *)
(* Goal: forall x : Carrier FaM_set, @Equal FaM_set (Law x Unit) x *)
(* Goal: forall x y z : Carrier FaM_set, @Equal FaM_set (Law (Law x y) z) (Law x (Law y z)) *)
(* Goal: forall (x x' y y' : Carrier FaM_set) (_ : @Equal FaM_set x x') (_ : @Equal FaM_set y y'), @Equal FaM_set (Law x y) (Law x' y') *)
exact eqFaM_law.
(* Goal: forall x y : Carrier FaM_set, @Equal FaM_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaM_set, @Equal FaM_set (Law Unit x) x *)
(* Goal: forall x : Carrier FaM_set, @Equal FaM_set (Law x Unit) x *)
(* Goal: forall x y z : Carrier FaM_set, @Equal FaM_set (Law (Law x y) z) (Law x (Law y z)) *)
exact eqFaM_law_assoc.
(* Goal: forall x y : Carrier FaM_set, @Equal FaM_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaM_set, @Equal FaM_set (Law Unit x) x *)
(* Goal: forall x : Carrier FaM_set, @Equal FaM_set (Law x Unit) x *)
exact eqFaM_law0r.
(* Goal: forall x y : Carrier FaM_set, @Equal FaM_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaM_set, @Equal FaM_set (Law Unit x) x *)
exact eqFaM_law0l.
(* Goal: forall x y : Carrier FaM_set, @Equal FaM_set (Law x y) (Law y x) *)
exact eqFaM_com.
Qed.
Section Universal_prop.
Variable M : ABELIAN_MONOID.
Variable f : Hom V M.
Fixpoint FaM_lift_fun (p : FreeAbelianMonoid) : M :=
match p with
| Var v => f v
| Law p1 p2 => sgroup_law _ (FaM_lift_fun p1) (FaM_lift_fun p2)
| Unit => monoid_unit M
end.
Definition FaM_lift : Hom FreeAbelianMonoid M.
Proof.
(* Goal: Carrier (@Hom ABELIAN_MONOID FreeAbelianMonoid M) *)
apply (BUILD_HOM_MONOID (G:=FreeAbelianMonoid) (G':=M) (ff:=FaM_lift_fun)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (@monoid_unit (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) (monoid_on_def (abelian_monoid_monoid FreeAbelianMonoid)))) (@monoid_unit (monoid_sgroup (abelian_monoid_monoid M)) (monoid_on_def (abelian_monoid_monoid M))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))), @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (sgroup_law (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) x y)) (sgroup_law (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x) (FaM_lift_fun y)) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)))) (_ : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))) x y), @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x) (FaM_lift_fun y) *)
intros x y H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (@monoid_unit (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) (monoid_on_def (abelian_monoid_monoid FreeAbelianMonoid)))) (@monoid_unit (monoid_sgroup (abelian_monoid_monoid M)) (monoid_on_def (abelian_monoid_monoid M))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))), @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (sgroup_law (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) x y)) (sgroup_law (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x) (FaM_lift_fun y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x) (FaM_lift_fun y) *)
elim H'; simpl in |- *; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (@monoid_unit (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) (monoid_on_def (abelian_monoid_monoid FreeAbelianMonoid)))) (@monoid_unit (monoid_sgroup (abelian_monoid_monoid M)) (monoid_on_def (abelian_monoid_monoid M))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))), @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (sgroup_law (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) x y)) (sgroup_law (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x) (FaM_lift_fun y)) *)
(* Goal: forall (x y z : FaM) (_ : eqFaM x y) (_ : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x) (FaM_lift_fun y)) (_ : eqFaM y z) (_ : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun y) (FaM_lift_fun z)), @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x) (FaM_lift_fun z) *)
intros x0 y0 z H'0 H'1 H'2 H'3; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (@monoid_unit (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) (monoid_on_def (abelian_monoid_monoid FreeAbelianMonoid)))) (@monoid_unit (monoid_sgroup (abelian_monoid_monoid M)) (monoid_on_def (abelian_monoid_monoid M))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))), @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (sgroup_law (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) x y)) (sgroup_law (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x) (FaM_lift_fun y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x0) (FaM_lift_fun z) *)
apply Trans with (FaM_lift_fun y0); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (@monoid_unit (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) (monoid_on_def (abelian_monoid_monoid FreeAbelianMonoid)))) (@monoid_unit (monoid_sgroup (abelian_monoid_monoid M)) (monoid_on_def (abelian_monoid_monoid M))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))), @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (sgroup_law (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) x y)) (sgroup_law (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x) (FaM_lift_fun y)) *)
simpl in |- *; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun (@monoid_unit (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) (monoid_on_def (abelian_monoid_monoid FreeAbelianMonoid)))) (@monoid_unit (monoid_sgroup (abelian_monoid_monoid M)) (monoid_on_def (abelian_monoid_monoid M))) *)
simpl in |- *; auto with algebra.
Qed.
Definition FaM_var : Hom V FreeAbelianMonoid.
Proof.
(* Goal: Carrier (@Hom SET V (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)))) *)
apply (Build_Map (A:=V) (B:=FreeAbelianMonoid) (Ap:=Var)).
(* Goal: @fun_compatible V (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))) Var *)
red in |- *.
(* Goal: forall (x y : Carrier V) (_ : @Equal V x y), @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))) (Var x) (Var y) *)
simpl in |- *; auto with algebra.
Qed.
Lemma FaM_comp_prop :
Equal f (comp_hom (FaM_lift:Hom (FreeAbelianMonoid:SET) M) FaM_var).
Proof.
(* Goal: @Equal (@Hom SET V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M)))) f (@comp_hom SET V (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid))) (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (@sgroup_map (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) (monoid_sgroup (abelian_monoid_monoid M)) (@monoid_sgroup_hom (abelian_monoid_monoid FreeAbelianMonoid) (abelian_monoid_monoid M) FaM_lift) : Carrier (@Hom SET (sgroup_set (monoid_sgroup (abelian_monoid_monoid FreeAbelianMonoid)) : Ob SET) (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))))) FaM_var) *)
simpl in |- *.
(* Goal: @Map_eq V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) f (@comp_hom SET V FaM_set (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (@f2 (@Monoid_util.M FaM_set Law Unit eqFaM_law eqFaM_law_assoc eqFaM_law0r eqFaM_law0l) (abelian_monoid_monoid M) FaM_lift_fun (fun (x y : FaM) (H' : eqFaM x y) => @eqFaM_ind (fun x0 y0 : FaM => @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x0) (FaM_lift_fun y0)) (fun (x0 y0 : Carrier V) (H : @Equal V x0 y0) => @Ap_comp V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) f f x0 y0 H (@Refl (MAP V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M)))) f)) (fun (x0 x' y0 y' : FaM) (_ : eqFaM x0 x') (H0 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x0) (FaM_lift_fun x')) (_ : eqFaM y0 y') (H2 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun y0) (FaM_lift_fun y')) => @SGROUP_comp (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x0) (FaM_lift_fun x') (FaM_lift_fun y0) (FaM_lift_fun y') H0 H2) (fun x0 y0 z : FaM => @SGROUP_assoc (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x0) (FaM_lift_fun y0) (FaM_lift_fun z)) (fun x0 : FaM => @MONOID_unit_r (abelian_monoid_monoid M) (FaM_lift_fun x0)) (fun x0 : FaM => @MONOID_unit_l (abelian_monoid_monoid M) (FaM_lift_fun x0)) (fun x0 : FaM => @Refl (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x0)) (fun (x0 y0 : FaM) (_ : eqFaM x0 y0) (H0 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x0) (FaM_lift_fun y0)) => @Sym (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x0) (FaM_lift_fun y0) H0) (fun (x0 y0 z : FaM) (_ : eqFaM x0 y0) (H'1 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x0) (FaM_lift_fun y0)) (_ : eqFaM y0 z) (H'3 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun y0) (FaM_lift_fun z)) => @Trans (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x0) (FaM_lift_fun y0) (FaM_lift_fun z) H'1 H'3) (fun x0 y0 : FaM => @ABELIAN_MONOID_com M (FaM_lift_fun x0) (FaM_lift_fun y0)) x y H')) FaM_var) *)
red in |- *.
(* Goal: forall x : Carrier V, @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (@Ap V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) f x) (@Ap V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (@comp_hom SET V FaM_set (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (@f2 (@Monoid_util.M FaM_set Law Unit eqFaM_law eqFaM_law_assoc eqFaM_law0r eqFaM_law0l) (abelian_monoid_monoid M) FaM_lift_fun (fun (x0 y : FaM) (H' : eqFaM x0 y) => @eqFaM_ind (fun x1 y0 : FaM => @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x1) (FaM_lift_fun y0)) (fun (x1 y0 : Carrier V) (H : @Equal V x1 y0) => @Ap_comp V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) f f x1 y0 H (@Refl (MAP V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M)))) f)) (fun (x1 x' y0 y' : FaM) (_ : eqFaM x1 x') (H0 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x1) (FaM_lift_fun x')) (_ : eqFaM y0 y') (H2 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun y0) (FaM_lift_fun y')) => @SGROUP_comp (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x1) (FaM_lift_fun x') (FaM_lift_fun y0) (FaM_lift_fun y') H0 H2) (fun x1 y0 z : FaM => @SGROUP_assoc (monoid_sgroup (abelian_monoid_monoid M)) (FaM_lift_fun x1) (FaM_lift_fun y0) (FaM_lift_fun z)) (fun x1 : FaM => @MONOID_unit_r (abelian_monoid_monoid M) (FaM_lift_fun x1)) (fun x1 : FaM => @MONOID_unit_l (abelian_monoid_monoid M) (FaM_lift_fun x1)) (fun x1 : FaM => @Refl (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x1)) (fun (x1 y0 : FaM) (_ : eqFaM x1 y0) (H0 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x1) (FaM_lift_fun y0)) => @Sym (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x1) (FaM_lift_fun y0) H0) (fun (x1 y0 z : FaM) (_ : eqFaM x1 y0) (H'1 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x1) (FaM_lift_fun y0)) (_ : eqFaM y0 z) (H'3 : @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun y0) (FaM_lift_fun z)) => @Trans (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (FaM_lift_fun x1) (FaM_lift_fun y0) (FaM_lift_fun z) H'1 H'3) (fun x1 y0 : FaM => @ABELIAN_MONOID_com M (FaM_lift_fun x1) (FaM_lift_fun y0)) x0 y H')) FaM_var) x) *)
simpl in |- *.
(* Goal: forall x : Carrier V, @Equal (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) (@Ap V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) f x) (@Ap V (sgroup_set (monoid_sgroup (abelian_monoid_monoid M))) f x) *)
auto with algebra.
Qed.
End Universal_prop.
End Free_abelian_monoid_def.
Hint Resolve FaM_comp_prop: algebra. |
Require Import Omega.
Require Import Zcomplements.
Require Import Zpower.
Require Import Zlogarithm.
Require Import Diadic.
Require Import IEEE754_def.
Section basic_verifs.
Lemma max_abstract_wf :
forall (b : bool) (t : float_type), abstract_wf t (max_abstract t b).
Proof.
(* Goal: forall (b : bool) (t : float_type), abstract_wf t (max_abstract t b) *)
simple induction b; simple induction t; compute in |- *; split; split; trivial || discriminate.
Qed.
End basic_verifs. |
Require Import List.
Import ListNotations.
Require Import StructTact.StructTactics.
Require Import StructTact.ListTactics.
Fixpoint before_all {A : Type} (x : A) y l : Prop :=
match l with
| [] => True
| a :: l' =>
~ In x l' \/
(y <> a /\ before_all x y l')
end.
Section before_all.
Variable A : Type.
Lemma before_all_head_not_in :
forall l (x y : A),
x <> y ->
before_all x y (y :: l) ->
~ In x l.
Proof.
(* Goal: forall (l : list A) (x y : A) (_ : not (@eq A x y)) (_ : @before_all A x y (@cons A y l)), not (@In A x l) *)
intros.
(* Goal: not (@In A x l) *)
simpl in *.
(* Goal: not (@In A x l) *)
break_or_hyp; auto.
(* Goal: not (@In A x l) *)
break_and.
(* Goal: not (@In A x l) *)
auto.
Qed.
Lemma before_all_neq_append :
forall l (x y a : A),
a <> x ->
before_all x y l ->
before_all x y (l ++ [a]).
Proof.
(* Goal: forall (l : list A) (x y a : A) (_ : not (@eq A a x)) (_ : @before_all A x y l), @before_all A x y (@app A l (@cons A a (@nil A))) *)
induction l.
(* Goal: forall (x y a0 : A) (_ : not (@eq A a0 x)) (_ : @before_all A x y (@cons A a l)), @before_all A x y (@app A (@cons A a l) (@cons A a0 (@nil A))) *)
(* Goal: forall (x y a : A) (_ : not (@eq A a x)) (_ : @before_all A x y (@nil A)), @before_all A x y (@app A (@nil A) (@cons A a (@nil A))) *)
-
(* Goal: forall (x y a : A) (_ : not (@eq A a x)) (_ : @before_all A x y (@nil A)), @before_all A x y (@app A (@nil A) (@cons A a (@nil A))) *)
intros; left; auto.
(* BG Goal: forall (x y a0 : A) (_ : not (@eq A a0 x)) (_ : @before_all A x y (@cons A a l)), @before_all A x y (@app A (@cons A a l) (@cons A a0 (@nil A))) *)
-
(* Goal: forall (x y a0 : A) (_ : not (@eq A a0 x)) (_ : @before_all A x y (@cons A a l)), @before_all A x y (@app A (@cons A a l) (@cons A a0 (@nil A))) *)
intros; simpl in *.
(* Goal: or (not (@In A x (@app A l (@cons A a0 (@nil A))))) (and (not (@eq A y a)) (@before_all A x y (@app A l (@cons A a0 (@nil A))))) *)
break_or_hyp.
(* Goal: or (not (@In A x (@app A l (@cons A a0 (@nil A))))) (and (not (@eq A y a)) (@before_all A x y (@app A l (@cons A a0 (@nil A))))) *)
(* Goal: or (not (@In A x (@app A l (@cons A a0 (@nil A))))) (and (not (@eq A y a)) (@before_all A x y (@app A l (@cons A a0 (@nil A))))) *)
*
(* Goal: or (not (@In A x (@app A l (@cons A a0 (@nil A))))) (and (not (@eq A y a)) (@before_all A x y (@app A l (@cons A a0 (@nil A))))) *)
left.
(* Goal: not (@In A x (@app A l (@cons A a0 (@nil A)))) *)
intro H_in.
(* Goal: False *)
do_in_app.
(* Goal: False *)
break_or_hyp; auto.
(* Goal: False *)
simpl in *.
(* Goal: False *)
break_or_hyp; auto.
(* BG Goal: or (not (@In A x (@app A l (@cons A a0 (@nil A))))) (and (not (@eq A y a)) (@before_all A x y (@app A l (@cons A a0 (@nil A))))) *)
*
(* Goal: or (not (@In A x (@app A l (@cons A a0 (@nil A))))) (and (not (@eq A y a)) (@before_all A x y (@app A l (@cons A a0 (@nil A))))) *)
break_and.
(* Goal: or (not (@In A x (@app A l (@cons A a0 (@nil A))))) (and (not (@eq A y a)) (@before_all A x y (@app A l (@cons A a0 (@nil A))))) *)
right.
(* Goal: and (not (@eq A y a)) (@before_all A x y (@app A l (@cons A a0 (@nil A)))) *)
split; auto.
Qed.
Lemma before_all_not_in_1 :
forall l (x y : A),
~ In x l ->
before_all x y l.
Proof.
(* Goal: forall (l : list A) (x y : A) (_ : not (@In A x l)), @before_all A x y l *)
intros.
(* Goal: @before_all A x y l *)
destruct l; simpl in *; auto.
Qed.
Lemma before_all_not_in_2 :
forall l (x y : A),
~ In y l ->
before_all x y l.
Proof.
(* Goal: forall (l : list A) (x y : A) (_ : not (@In A y l)), @before_all A x y l *)
induction l.
(* Goal: forall (x y : A) (_ : not (@In A y (@cons A a l))), @before_all A x y (@cons A a l) *)
(* Goal: forall (x y : A) (_ : not (@In A y (@nil A))), @before_all A x y (@nil A) *)
-
(* Goal: forall (x y : A) (_ : not (@In A y (@nil A))), @before_all A x y (@nil A) *)
intros.
(* Goal: @before_all A x y (@nil A) *)
simpl in *.
(* Goal: True *)
auto.
(* BG Goal: forall (x y : A) (_ : not (@In A y (@cons A a l))), @before_all A x y (@cons A a l) *)
-
(* Goal: forall (x y : A) (_ : not (@In A y (@cons A a l))), @before_all A x y (@cons A a l) *)
intros.
(* Goal: @before_all A x y (@cons A a l) *)
simpl in *.
(* Goal: or (not (@In A x l)) (and (not (@eq A y a)) (@before_all A x y l)) *)
assert (H_neq: y <> a); auto.
(* Goal: or (not (@In A x l)) (and (not (@eq A y a)) (@before_all A x y l)) *)
assert (H_in: ~ In y l); auto.
Qed.
End before_all.
|
Require Export Relation_Definitions.
Require Export Relation_Operators.
Require Export Operators_Properties.
Require Export Inclusion.
Require Export Transitive_Closure.
Require Export Union.
Require Export Inverse_Image.
Require Export Lexicographic_Product.
Hint Resolve rt_step rt_refl rst_step rst_refl t_step: core.
Hint Unfold transp union reflexive transitive: core.
Hint Immediate rst_sym: core.
Lemma clos_refl_trans_ind_right :
forall (A : Set) (R : relation A) (M : A) (P : A -> Prop),
P M ->
(forall P0 N : A, R N P0 -> clos_refl_trans A R P0 M -> P P0 -> P N) ->
forall a : A, clos_refl_trans A R a M -> P a.
Proof.
(* Goal: forall (A : Set) (R : relation A) (M : A) (P : forall _ : A, Prop) (_ : P M) (_ : forall (P0 N : A) (_ : R N P0) (_ : clos_refl_trans A R P0 M) (_ : P P0), P N) (a : A) (_ : clos_refl_trans A R a M), P a *)
intros.
(* Goal: P a *)
generalize H H0.
(* Goal: forall (_ : P M) (_ : forall (P0 N : A) (_ : R N P0) (_ : clos_refl_trans A R P0 M) (_ : P P0), P N), P a *)
elim H1; intros; auto.
(* Goal: P x *)
(* Goal: P x *)
apply H4 with y; auto.
(* Goal: P x *)
apply H3; intros.
(* Goal: P N *)
(* Goal: P y *)
apply H5; intros; auto.
(* Goal: P N *)
(* Goal: P N *)
apply H7 with P0; auto.
(* Goal: P N *)
apply H7 with P0; auto.
(* Goal: clos_refl_trans A R P0 z *)
apply rt_trans with y; auto.
Qed.
Hint Resolve left_sym right_sym sp_swap sp_noswap: core. |
Require Export GeoCoq.Elements.OriginalProofs.lemma_8_2.
Section Euclid.
Context `{Ax1:euclidean_neutral_ruler_compass}.
Lemma lemma_squareflip :
forall A B C D,
SQ A B C D ->
SQ B A D C.
Proof.
(* Goal: forall (A B C D : @Point Ax) (_ : @SQ Ax A B C D), @SQ Ax B A D C *)
intros.
(* Goal: @SQ Ax B A D C *)
assert ((Cong A B C D /\ Cong A B B C /\ Cong A B D A /\ Per D A B /\ Per A B C /\ Per B C D /\ Per C D A)) by (conclude_def SQ ).
(* Goal: @SQ Ax B A D C *)
assert (Cong B A D C) by (forward_using lemma_congruenceflip).
(* Goal: @SQ Ax B A D C *)
assert (Cong B A A D) by (forward_using lemma_congruenceflip).
(* Goal: @SQ Ax B A D C *)
assert (Cong B A C B) by (forward_using lemma_congruenceflip).
(* Goal: @SQ Ax B A D C *)
assert (Per C B A) by (conclude lemma_8_2).
(* Goal: @SQ Ax B A D C *)
assert (Per B A D) by (conclude lemma_8_2).
(* Goal: @SQ Ax B A D C *)
assert (Per A D C) by (conclude lemma_8_2).
(* Goal: @SQ Ax B A D C *)
assert (Per D C B) by (conclude lemma_8_2).
(* Goal: @SQ Ax B A D C *)
assert (SQ B A D C) by (conclude_def SQ ).
(* Goal: @SQ Ax B A D C *)
close.
Qed.
End Euclid.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq path div choice.
From mathcomp
Require Import fintype tuple finfun bigop prime ssralg poly polydiv finset.
From mathcomp
Require Import fingroup morphism perm automorphism quotient finalg action zmodp.
From mathcomp
Require Import commutator cyclic center pgroup matrix mxalgebra mxpoly.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope GRing.Theory.
Local Open Scope ring_scope.
Reserved Notation "''n_' i" (at level 8, i at level 2, format "''n_' i").
Reserved Notation "''R_' i" (at level 8, i at level 2, format "''R_' i").
Reserved Notation "''e_' i" (at level 8, i at level 2, format "''e_' i").
Delimit Scope irrType_scope with irr.
Section RingRepr.
Variable R : comUnitRingType.
Section OneRepresentation.
Variable gT : finGroupType.
Definition mx_repr (G : {set gT}) n (r : gT -> 'M[R]_n) :=
r 1%g = 1%:M /\ {in G &, {morph r : x y / (x * y)%g >-> x *m y}}.
Structure mx_representation G n :=
MxRepresentation { repr_mx :> gT -> 'M_n; _ : mx_repr G repr_mx }.
Variables (G : {group gT}) (n : nat) (rG : mx_representation G n).
Arguments rG _%group_scope : extra scopes.
Lemma repr_mx1 : rG 1 = 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@gval gT G) n rG (oneg (FinGroup.base gT))) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) *)
by case: rG => r [].
Qed.
Lemma repr_mxM : {in G &, {morph rG : x y / (x * y)%g >-> x *m y}}.
Proof.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@gval gT G) n rG ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x0 y0) x y)) ((fun x0 y0 : matrix (GRing.ComUnitRing.sort R) n n => @mulmx (GRing.ComUnitRing.ringType R) n n n x0 y0) (@repr_mx (@gval gT G) n rG x) (@repr_mx (@gval gT G) n rG y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base gT)) (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@gval gT G) n rG) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x y) (fun x y : matrix (GRing.ComUnitRing.sort R) n n => @mulmx (GRing.ComUnitRing.ringType R) n n n x y))) *)
by case: rG => r [].
Qed.
Lemma repr_mxK m x :
x \in G -> cancel ((@mulmx R m n n)^~ (rG x)) (mulmx^~ (rG x^-1)).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @cancel (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (fun x0 : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n => @mulmx (GRing.ComUnitRing.ringType R) m n n x0 (@repr_mx (@gval gT G) n rG x)) (fun x0 : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n => @mulmx (GRing.ComUnitRing.ringType R) m n n x0 (@repr_mx (@gval gT G) n rG (@invg (FinGroup.base gT) x))) *)
by move=> Gx U; rewrite -mulmxA -repr_mxM ?groupV // mulgV repr_mx1 mulmx1.
Qed.
Lemma repr_mxKV m x :
x \in G -> cancel ((@mulmx R m n n)^~ (rG x^-1)) (mulmx^~ (rG x)).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @cancel (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (fun x0 : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n => @mulmx (GRing.ComUnitRing.ringType R) m n n x0 (@repr_mx (@gval gT G) n rG (@invg (FinGroup.base gT) x))) (fun x0 : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n => @mulmx (GRing.ComUnitRing.ringType R) m n n x0 (@repr_mx (@gval gT G) n rG x)) *)
by rewrite -groupV -{3}[x]invgK; apply: repr_mxK.
Qed.
Lemma repr_mx_unit x : x \in G -> rG x \in unitmx.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@in_mem (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@gval gT G) n rG x) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) (@unitmx R n))) *)
by move=> Gx; case/mulmx1_unit: (repr_mxKV Gx 1%:M).
Qed.
Lemma repr_mxV : {in G, {morph rG : x / x^-1%g >-> invmx x}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@gval gT G) n rG ((fun x0 : FinGroup.arg_sort (FinGroup.base gT) => @invg (FinGroup.base gT) x0) x)) ((fun x0 : matrix (GRing.ComUnitRing.sort R) n n => @invmx R n x0) (@repr_mx (@gval gT G) n rG x))) (inPhantom (@morphism_1 (FinGroup.arg_sort (FinGroup.base gT)) (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@gval gT G) n rG) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @invg (FinGroup.base gT) x) (fun x : matrix (GRing.ComUnitRing.sort R) n n => @invmx R n x))) *)
by move=> x Gx /=; rewrite -[rG x^-1](mulKmx (repr_mx_unit Gx)) mulmxA repr_mxK.
Qed.
Definition enveloping_algebra_mx := \matrix_(i < #|G|) mxvec (rG (enum_val i)).
Section Stabiliser.
Variables (m : nat) (U : 'M[R]_(m, n)).
Definition rstab := [set x in G | U *m rG x == U].
Lemma rstab_sub : rstab \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)) rstab)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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/subsetP=> x; case/setIdP.
Qed.
Lemma rstab_group_set : group_set rstab.
Proof.
(* Goal: is_true (@group_set gT rstab) *)
apply/group_setP; rewrite inE group1 repr_mx1 mulmx1; split=> //= x y.
(* Goal: forall (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) rstab)))) (_ : is_true (@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)) rstab)))), is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) x 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)) rstab))) *)
case/setIdP=> Gx cUx; case/setIdP=> Gy cUy; rewrite inE repr_mxM ?groupM //.
(* Goal: is_true (andb true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) m n) (@mulmx (GRing.ComUnitRing.ringType R) m n n U (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx (@gval gT G) n rG x) (@repr_mx (@gval gT G) n rG y))) U)) *)
by rewrite mulmxA (eqP cUx).
Qed.
Canonical rstab_group := Group rstab_group_set.
End Stabiliser.
Section CentHom.
Variable f : 'M[R]_n.
Definition rcent := [set x in G | f *m rG x == rG x *m f].
Lemma rcent_sub : rcent \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)) rcent)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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/subsetP=> x; case/setIdP.
Qed.
Lemma rcent_group_set : group_set rcent.
Proof.
(* Goal: is_true (@group_set gT rcent) *)
apply/group_setP; rewrite inE group1 repr_mx1 mulmx1 mul1mx; split=> //= x y.
(* Goal: forall (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) rcent)))) (_ : is_true (@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)) rcent)))), is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) x 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)) rcent))) *)
case/setIdP=> Gx; move/eqP=> cfx; case/setIdP=> Gy; move/eqP=> cfy.
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) x 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)) rcent))) *)
by rewrite inE repr_mxM ?groupM //= -mulmxA -cfy !mulmxA cfx.
Qed.
Canonical rcent_group := Group rcent_group_set.
Definition centgmx := G \subset rcent.
Lemma centgmxP : reflect (forall x, x \in G -> f *m rG x = rG x *m f) centgmx.
Proof.
(* Goal: Bool.reflect (forall (x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n f (@repr_mx (@gval gT G) n rG x)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx (@gval gT G) n rG x) f)) centgmx *)
apply: (iffP subsetP) => cGf x Gx; by have:= cGf x Gx; rewrite !inE Gx /=; move/eqP.
Qed.
End CentHom.
Definition rker := rstab 1%:M.
Canonical rker_group := Eval hnf in [group of rker].
Lemma rkerP x : reflect (x \in G /\ rG x = 1%:M) (x \in rker).
Proof.
(* Goal: Bool.reflect (and (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@gval gT G) n rG x) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))))) (@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)) rker))) *)
by apply: (iffP setIdP) => [] [->]; move/eqP; rewrite mul1mx.
Qed.
Lemma rker_norm : G \subset 'N(rker).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT rker)))) *)
apply/subsetP=> x Gx; rewrite inE sub_conjg; apply/subsetP=> y.
(* 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)) rker))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT rker (@invg (FinGroup.base gT) x))))) *)
case/rkerP=> Gy ry1; rewrite mem_conjgV !inE groupJ //=.
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@repr_mx (@gval gT G) n rG (@conjg gT y x))) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R)))) *)
by rewrite !repr_mxM ?groupM ?groupV // ry1 !mulmxA mulmx1 repr_mxKV.
Qed.
Lemma rker_normal : rker <| G.
Proof.
(* Goal: is_true (@normal gT rker (@gval gT G)) *)
by rewrite /normal rstab_sub rker_norm.
Qed.
Definition mx_faithful := rker \subset [1].
Lemma mx_faithful_inj : mx_faithful -> {in G &, injective rG}.
Proof.
(* Goal: forall _ : is_true mx_faithful, @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x1 x2 : FinGroup.arg_sort (FinGroup.base gT) => forall _ : @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@gval gT G) n rG x1) (@repr_mx (@gval gT G) n rG x2), @eq (FinGroup.arg_sort (FinGroup.base gT)) x1 x2) (inPhantom (@injective (matrix (GRing.ComUnitRing.sort R) n n) (FinGroup.arg_sort (FinGroup.base gT)) (@repr_mx (@gval gT G) n rG))) *)
move=> ffulG x y Gx Gy eq_rGxy; apply/eqP; rewrite eq_mulgV1 -in_set1.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) x (@invg (FinGroup.base gT) y)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))) *)
rewrite (subsetP ffulG) // inE groupM ?repr_mxM ?groupV //= eq_rGxy.
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx (@gval gT G) n rG y) (@repr_mx (@gval gT G) n rG (@invg (FinGroup.base gT) y)))) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R)))) *)
by rewrite mulmxA repr_mxK.
Qed.
Lemma rker_linear : n = 1%N -> G^`(1)%g \subset rker.
Proof.
(* Goal: forall _ : @eq nat n (S O), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) rker))) *)
move=> n1; rewrite gen_subG; apply/subsetP=> xy; case/imset2P=> x y Gx Gy ->.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@commg gT x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT rker_group)))) *)
rewrite !inE groupR //= /commg mulgA -invMg repr_mxM ?groupV ?groupM //.
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx (@gval gT G) n rG (@invg (FinGroup.base gT) (@mulg (FinGroup.base gT) y x))) (@repr_mx (@gval gT G) n rG (@mulg (FinGroup.base gT) x y)))) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R)))) *)
rewrite mulmxA (can2_eq (repr_mxK _) (repr_mxKV _)) ?groupM //.
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@repr_mx (@gval gT G) n rG (@invg (FinGroup.base gT) (@mulg (FinGroup.base gT) y x)))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@repr_mx (@gval gT G) n rG (@invg (FinGroup.base gT) (@mulg (FinGroup.base gT) x y))))) *)
rewrite !repr_mxV ?repr_mxM ?groupM //; move: (rG x) (rG y).
(* Goal: forall repr_mx repr_mx0 : matrix (GRing.ComUnitRing.sort R) n n, is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@invmx R n (@mulmx (GRing.ComUnitRing.ringType R) n n n repr_mx0 repr_mx))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@invmx R n (@mulmx (GRing.ComUnitRing.ringType R) n n n repr_mx repr_mx0)))) *)
by rewrite n1 => rx ry; rewrite (mx11_scalar rx) scalar_mxC.
Qed.
Definition rcenter := [set g in G | is_scalar_mx (rG g)].
Fact rcenter_group_set : group_set rcenter.
Proof.
(* Goal: is_true (@group_set gT rcenter) *)
apply/group_setP; split=> [|x y].
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) rcenter)))) (_ : 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)) rcenter)))), 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)) rcenter))) *)
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) rcenter))) *)
by rewrite inE group1 repr_mx1 scalar_mx_is_scalar.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) rcenter)))) (_ : 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)) rcenter)))), 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)) rcenter))) *)
move=> /setIdP[Gx /is_scalar_mxP[a defx]] /setIdP[Gy /is_scalar_mxP[b defy]].
(* Goal: 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)) rcenter))) *)
by rewrite !inE groupM ?repr_mxM // defx defy -scalar_mxM ?scalar_mx_is_scalar.
Qed.
Canonical rcenter_group := Group rcenter_group_set.
Lemma rcenter_normal : rcenter <| G.
Proof.
(* Goal: is_true (@normal gT rcenter (@gval gT G)) *)
rewrite /normal /rcenter {1}setIdE subsetIl; apply/subsetP=> x Gx; rewrite inE.
(* Goal: is_true (@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 (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun g : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@is_scalar_mx (GRing.ComUnitRing.ringType R) n (@repr_mx (@gval gT G) n rG g)))) x))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun g : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@is_scalar_mx (GRing.ComUnitRing.ringType R) n (@repr_mx (@gval gT G) n rG g))))))) *)
apply/subsetP=> _ /imsetP[y /setIdP[Gy /is_scalar_mxP[c rGy]] ->].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (@conjg gT y x) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun g : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@is_scalar_mx (GRing.ComUnitRing.ringType R) n (@repr_mx (@gval gT G) n rG g))))))) *)
rewrite inE !repr_mxM ?groupM ?groupV //= mulmxA rGy scalar_mxC repr_mxKV //.
(* Goal: is_true (@is_scalar_mx (GRing.ComUnitRing.ringType R) n (@scalar_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n c)) *)
exact: scalar_mx_is_scalar.
Qed.
End OneRepresentation.
Arguments rkerP {gT G n rG x}.
Section Proper.
Variables (gT : finGroupType) (G : {group gT}) (n' : nat).
Local Notation n := n'.+1.
Variable rG : mx_representation G n.
Lemma repr_mxMr : {in G &, {morph rG : x y / (x * y)%g >-> x * y}}.
Proof.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@repr_mx gT (@gval gT G) (S n') rG ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x0 y0) x y)) ((fun x0 y0 : matrix (GRing.ComUnitRing.sort R) (S n') (S n') => @GRing.mul (matrix_ringType (GRing.ComUnitRing.ringType R) n') x0 y0) (@repr_mx gT (@gval gT G) (S n') rG x) (@repr_mx gT (@gval gT G) (S n') rG y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base gT)) (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@repr_mx gT (@gval gT G) (S n') rG) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x y) (fun x y : matrix (GRing.ComUnitRing.sort R) (S n') (S n') => @GRing.mul (matrix_ringType (GRing.ComUnitRing.ringType R) n') x y))) *)
exact: repr_mxM.
Qed.
Lemma repr_mxVr : {in G, {morph rG : x / (x^-1)%g >-> x^-1}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@repr_mx gT (@gval gT G) (S n') rG ((fun x0 : FinGroup.arg_sort (FinGroup.base gT) => @invg (FinGroup.base gT) x0) x)) ((fun x0 : matrix (GRing.ComUnitRing.sort R) (S n') (S n') => @GRing.inv (matrix_unitRing R n') x0) (@repr_mx gT (@gval gT G) (S n') rG x))) (inPhantom (@morphism_1 (FinGroup.arg_sort (FinGroup.base gT)) (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@repr_mx gT (@gval gT G) (S n') rG) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @invg (FinGroup.base gT) x) (fun x : matrix (GRing.ComUnitRing.sort R) (S n') (S n') => @GRing.inv (matrix_unitRing R n') x))) *)
exact: repr_mxV.
Qed.
Lemma repr_mx_unitr x : x \in G -> rG x \is a GRing.unit.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@in_mem (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@repr_mx gT (@gval gT G) (S n') rG x) (@mem (GRing.UnitRing.sort (matrix_unitRing R n')) (predPredType (GRing.UnitRing.sort (matrix_unitRing R n'))) (@has_quality (S O) (GRing.UnitRing.sort (matrix_unitRing R n')) (@GRing.unit (matrix_unitRing R n'))))) *)
exact: repr_mx_unit.
Qed.
Lemma repr_mxX m : {in G, {morph rG : x / (x ^+ m)%g >-> x ^+ m}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@repr_mx gT (@gval gT G) (S n') rG ((fun x0 : FinGroup.arg_sort (FinGroup.base gT) => @expgn (FinGroup.base gT) x0 m) x)) ((fun x0 : matrix (GRing.ComUnitRing.sort R) (S n') (S n') => @GRing.exp (matrix_ringType (GRing.ComUnitRing.ringType R) n') x0 m) (@repr_mx gT (@gval gT G) (S n') rG x))) (inPhantom (@morphism_1 (FinGroup.arg_sort (FinGroup.base gT)) (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@repr_mx gT (@gval gT G) (S n') rG) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @expgn (FinGroup.base gT) x m) (fun x : matrix (GRing.ComUnitRing.sort R) (S n') (S n') => @GRing.exp (matrix_ringType (GRing.ComUnitRing.ringType R) n') x m))) *)
elim: m => [|m IHm] x Gx; rewrite /= ?repr_mx1 // expgS exprS -IHm //.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@repr_mx gT (@gval gT G) (S n') rG (@mulg (FinGroup.base gT) x (@expgn (FinGroup.base gT) x m))) (@GRing.mul (matrix_ringType (GRing.ComUnitRing.ringType R) n') (@repr_mx gT (@gval gT G) (S n') rG x) (@repr_mx gT (@gval gT G) (S n') rG (@expgn (FinGroup.base gT) x m))) *)
by rewrite repr_mxM ?groupX.
Qed.
End Proper.
Section ChangeGroup.
Variables (gT : finGroupType) (G H : {group gT}) (n : nat).
Variables (rG : mx_representation G n).
Section SubGroup.
Hypothesis sHG : H \subset G.
Lemma subg_mx_repr : mx_repr H rG.
Proof.
(* Goal: @mx_repr gT (@gval gT H) n (@repr_mx gT (@gval gT G) n rG) *)
by split=> [|x y Hx Hy]; rewrite (repr_mx1, repr_mxM) ?(subsetP sHG).
Qed.
Definition subg_repr := MxRepresentation subg_mx_repr.
Local Notation rH := subg_repr.
Lemma rcent_subg U : rcent rH U = H :&: rcent rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rcent gT H n subg_repr U) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@rcent gT G n rG U)) *)
by apply/setP=> x; rewrite !inE andbA -in_setI (setIidPl sHG).
Qed.
Section Stabiliser.
Variables (m : nat) (U : 'M[R]_(m, n)).
Lemma rstab_subg : rstab rH U = H :&: rstab rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstab gT H n subg_repr m U) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@rstab gT G n rG m U)) *)
by apply/setP=> x; rewrite !inE andbA -in_setI (setIidPl sHG).
Qed.
Lemma subg_mx_faithful : mx_faithful rG -> mx_faithful rH.
Proof.
(* Goal: forall _ : is_true (@mx_faithful gT G n rG), is_true (@mx_faithful gT H n subg_repr) *)
by apply: subset_trans; rewrite rker_subg subsetIr.
Qed.
Definition eqg_repr := subg_repr eqg_repr_proof.
Local Notation rH := eqg_repr.
Lemma rcent_eqg U : rcent rH U = rcent rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rcent gT H n eqg_repr U) (@rcent gT G n rG U) *)
by rewrite rcent_subg -(eqP eqGH) (setIidPr _) ?rcent_sub.
Qed.
Section Stabiliser.
Variables (m : nat) (U : 'M[R]_(m, n)).
Lemma rstab_eqg : rstab rH U = rstab rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstab gT H n eqg_repr m U) (@rstab gT G n rG m U) *)
by rewrite rstab_subg -(eqP eqGH) (setIidPr _) ?rstab_sub.
Qed.
Lemma eqg_mx_faithful : mx_faithful rH = mx_faithful rG.
Proof.
(* Goal: @eq bool (@mx_faithful gT H n eqg_repr) (@mx_faithful gT G n rG) *)
by rewrite /mx_faithful rker_eqg.
Qed.
End SameGroup.
End ChangeGroup.
Section Morphpre.
Variables (aT rT : finGroupType) (D : {group aT}) (f : {morphism D >-> rT}).
Variables (G : {group rT}) (n : nat) (rG : mx_representation G n).
Lemma morphpre_mx_repr : mx_repr (f @*^-1 G) (rG \o f).
Proof.
(* Goal: @mx_repr aT (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval rT G)) n (@funcomp (matrix (GRing.ComUnitRing.sort R) n n) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base aT)) tt (@repr_mx rT (@gval rT G) n rG) (@mfun aT rT (@gval aT D) f)) *)
split=> [|x y]; first by rewrite /= morph1 repr_mx1.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval rT 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)) (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval rT G)))))), @eq (matrix (GRing.ComUnitRing.sort R) n n) (@funcomp (matrix (GRing.ComUnitRing.sort R) n n) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base aT)) tt (@repr_mx rT (@gval rT G) n rG) (@mfun aT rT (@gval aT D) f) (@mulg (FinGroup.base aT) x y)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@funcomp (matrix (GRing.ComUnitRing.sort R) n n) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base aT)) tt (@repr_mx rT (@gval rT G) n rG) (@mfun aT rT (@gval aT D) f) x) (@funcomp (matrix (GRing.ComUnitRing.sort R) n n) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base aT)) tt (@repr_mx rT (@gval rT G) n rG) (@mfun aT rT (@gval aT D) f) y)) *)
case/morphpreP=> Dx Gfx; case/morphpreP=> Dy Gfy.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@funcomp (matrix (GRing.ComUnitRing.sort R) n n) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base aT)) tt (@repr_mx rT (@gval rT G) n rG) (@mfun aT rT (@gval aT D) f) (@mulg (FinGroup.base aT) x y)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@funcomp (matrix (GRing.ComUnitRing.sort R) n n) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base aT)) tt (@repr_mx rT (@gval rT G) n rG) (@mfun aT rT (@gval aT D) f) x) (@funcomp (matrix (GRing.ComUnitRing.sort R) n n) (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base aT)) tt (@repr_mx rT (@gval rT G) n rG) (@mfun aT rT (@gval aT D) f) y)) *)
by rewrite /= morphM ?repr_mxM.
Qed.
Canonical morphpre_repr := MxRepresentation morphpre_mx_repr.
Local Notation rGf := morphpre_repr.
Section Stabiliser.
Variables (m : nat) (U : 'M[R]_(m, n)).
Lemma rstab_morphpre : rstab rGf U = f @*^-1 (rstab rG U).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@rstab aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n morphpre_repr m U) (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@rstab rT G n rG m U)) *)
by apply/setP=> x; rewrite !inE andbA.
Qed.
End Stabiliser.
Lemma rker_morphpre : rker rGf = f @*^-1 (rker rG).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@rker aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n morphpre_repr) (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@rker rT G n rG)) *)
exact: rstab_morphpre.
Qed.
End Morphpre.
Section Morphim.
Variables (aT rT : finGroupType) (G D : {group aT}) (f : {morphism D >-> rT}).
Variables (n : nat) (rGf : mx_representation (f @* G) n).
Definition morphim_mx of G \subset D := fun x => rGf (f x).
Let sG_f'fG : G \subset f @*^-1 (f @* G).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@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)) (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
by rewrite -sub_morphim_pre.
Qed.
Lemma morphim_mx_repr : mx_repr G (morphim_mx sGD).
Proof.
(* Goal: @mx_repr aT (@gval aT G) n (morphim_mx sGD) *)
exact: subg_mx_repr (morphpre_repr f rGf) sG_f'fG.
Qed.
Canonical morphim_repr := MxRepresentation morphim_mx_repr.
Local Notation rG := morphim_repr.
Section Stabiliser.
Variables (m : nat) (U : 'M[R]_(m, n)).
Lemma rstab_morphim : rstab rG U = G :&: f @*^-1 rstab rGf U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@rstab aT G n morphim_repr m U) (@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)) (@rstab rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf m U))) *)
by rewrite -rstab_morphpre -(rstab_subg _ sG_f'fG).
Qed.
End Stabiliser.
Lemma rker_morphim : rker rG = G :&: f @*^-1 (rker rGf).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@rker aT G n morphim_repr) (@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)) (@rker rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf))) *)
exact: rstab_morphim.
Qed.
End Morphim.
Section Conjugate.
Variables (gT : finGroupType) (G : {group gT}) (n : nat).
Variables (rG : mx_representation G n) (B : 'M[R]_n).
Definition rconj_mx of B \in unitmx := fun x => B *m rG x *m invmx B.
Hypothesis uB : B \in unitmx.
Lemma rconj_mx_repr : mx_repr G (rconj_mx uB).
Proof.
(* Goal: @mx_repr gT (@gval gT G) n (rconj_mx uB) *)
split=> [|x y Gx Gy]; rewrite /rconj_mx ?repr_mx1 ?mulmx1 ?mulmxV ?repr_mxM //.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx gT (@gval gT G) n rG x) (@repr_mx gT (@gval gT G) n rG y))) (@invmx R n B)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@repr_mx gT (@gval gT G) n rG x)) (@invmx R n B)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@repr_mx gT (@gval gT G) n rG y)) (@invmx R n B))) *)
by rewrite !mulmxA mulmxKV.
Qed.
Canonical rconj_repr := MxRepresentation rconj_mx_repr.
Local Notation rGB := rconj_repr.
Lemma rconj_mxE x : rGB x = B *m rG x *m invmx B.
Proof.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx gT (@gval gT G) n rconj_repr x) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@repr_mx gT (@gval gT G) n rG x)) (@invmx R n B)) *)
by [].
Qed.
Lemma rconj_mxJ m (W : 'M_(m, n)) x : W *m rGB x *m B = W *m B *m rG x.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (@mulmx (GRing.ComUnitRing.ringType R) m n n (@mulmx (GRing.ComUnitRing.ringType R) m n n W (@repr_mx gT (@gval gT G) n rconj_repr x)) B) (@mulmx (GRing.ComUnitRing.ringType R) m n n (@mulmx (GRing.ComUnitRing.ringType R) m n n W B) (@repr_mx gT (@gval gT G) n rG x)) *)
by rewrite !mulmxA mulmxKV.
Qed.
Lemma rcent_conj A : rcent rGB A = rcent rG (invmx B *m A *m B).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rcent gT G n rconj_repr A) (@rcent gT G n rG (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n n (@invmx R n B) A) B)) *)
apply/setP=> x; rewrite !inE /= rconj_mxE !mulmxA.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n A B) (@repr_mx gT (@gval gT G) n rG x)) (@invmx R n B)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@repr_mx gT (@gval gT G) n rG x)) (@invmx R n B)) A))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n n (@invmx R n B) A) B) (@repr_mx gT (@gval gT G) n rG x)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx gT (@gval gT G) n rG x) (@invmx R n B)) A) B))) *)
rewrite (can2_eq (mulmxKV uB) (mulmxK uB)) -!mulmxA.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n A (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@repr_mx gT (@gval gT G) n rG x))) (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx gT (@gval gT G) n rG x) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@invmx R n B) (@mulmx (GRing.ComUnitRing.ringType R) n n n A B)))))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@invmx R n B) (@mulmx (GRing.ComUnitRing.ringType R) n n n A (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@repr_mx gT (@gval gT G) n rG x)))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx gT (@gval gT G) n rG x) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@invmx R n B) (@mulmx (GRing.ComUnitRing.ringType R) n n n A B))))) *)
by rewrite -(can2_eq (mulKVmx uB) (mulKmx uB)).
Qed.
Lemma rstab_conj m (U : 'M_(m, n)) : rstab rGB U = rstab rG (U *m B).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstab gT G n rconj_repr m U) (@rstab gT G n rG m (@mulmx (GRing.ComUnitRing.ringType R) m n n U B)) *)
apply/setP=> x; rewrite !inE /= rconj_mxE !mulmxA.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) m n) (@mulmx (GRing.ComUnitRing.ringType R) m n n (@mulmx (GRing.ComUnitRing.ringType R) m n n (@mulmx (GRing.ComUnitRing.ringType R) m n n U B) (@repr_mx gT (@gval gT G) n rG x)) (@invmx R n B)) U)) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) m n) (@mulmx (GRing.ComUnitRing.ringType R) m n n (@mulmx (GRing.ComUnitRing.ringType R) m n n U B) (@repr_mx gT (@gval gT G) n rG x)) (@mulmx (GRing.ComUnitRing.ringType R) m n n U B))) *)
by rewrite (can2_eq (mulmxKV uB) (mulmxK uB)).
Qed.
Lemma rker_conj : rker rGB = rker rG.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rker gT G n rconj_repr) (@rker gT G n rG) *)
apply/setP=> x; rewrite !inE /= mulmxA (can2_eq (mulmxKV uB) (mulmxK uB)).
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@mulmx (GRing.ComUnitRing.ringType R) n n n B (@repr_mx gT (@gval gT G) n rG x))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) B))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) (@repr_mx gT (@gval gT G) n rG x)) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))))) *)
by rewrite mul1mx -scalar_mxC (inj_eq (can_inj (mulKmx uB))) mul1mx.
Qed.
Lemma conj_mx_faithful : mx_faithful rGB = mx_faithful rG.
Proof.
(* Goal: @eq bool (@mx_faithful gT G n rconj_repr) (@mx_faithful gT G n rG) *)
by rewrite /mx_faithful rker_conj.
Qed.
End Conjugate.
Section Quotient.
Variables (gT : finGroupType) (G : {group gT}) (n : nat).
Variable rG : mx_representation G n.
Definition quo_mx (H : {set gT}) of H \subset rker rG & G \subset 'N(H) :=
fun Hx : coset_of H => rG (repr Hx).
Section SubQuotient.
Variable H : {group gT}.
Hypotheses (krH : H \subset rker rG) (nHG : G \subset 'N(H)).
Let nHGs := subsetP nHG.
Lemma quo_mx_coset x : x \in G -> quo_mx krH nHG (coset H x) = rG x.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (matrix (GRing.ComUnitRing.sort R) n n) (@quo_mx (@gval gT H) krH nHG (@coset gT (@gval gT H) x)) (@repr_mx gT (@gval gT G) n rG x) *)
move=> Gx; rewrite /quo_mx val_coset ?nHGs //; case: repr_rcosetP => z Hz.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx gT (@gval gT G) n rG (@mulg (FinGroup.base gT) z x)) (@repr_mx gT (@gval gT G) n rG x) *)
by case/rkerP: (subsetP krH z Hz) => Gz rz1; rewrite repr_mxM // rz1 mul1mx.
Qed.
Lemma quo_mx_repr : mx_repr (G / H)%g (quo_mx krH nHG).
Proof.
(* Goal: @mx_repr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) n (@quo_mx (@gval gT H) krH nHG) *)
split=> [|Hx Hy]; first by rewrite /quo_mx repr_coset1 repr_mx1.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hx (@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)))) (@quotient gT (@gval gT G) (@gval gT H)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hy (@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)))) (@quotient gT (@gval gT G) (@gval gT H)))))), @eq (matrix (GRing.ComUnitRing.sort R) n n) (@quo_mx (@gval gT H) krH nHG (@mulg (FinGroup.base (@coset_groupType gT (@gval gT H))) Hx Hy)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@quo_mx (@gval gT H) krH nHG Hx) (@quo_mx (@gval gT H) krH nHG Hy)) *)
case/morphimP=> x Nx Gx ->{Hx}; case/morphimP=> y Ny Gy ->{Hy}.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@quo_mx (@gval gT H) krH nHG (@mulg (FinGroup.base (@coset_groupType gT (@gval gT H))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) y))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@quo_mx (@gval gT H) krH nHG (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x)) (@quo_mx (@gval gT H) krH nHG (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) y))) *)
by rewrite -morphM // !quo_mx_coset ?groupM ?repr_mxM.
Qed.
Canonical quo_repr := MxRepresentation quo_mx_repr.
Local Notation rGH := quo_repr.
Lemma quo_repr_coset x : x \in G -> rGH (coset H x) = rG x.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) n quo_repr (@coset gT (@gval gT H) x)) (@repr_mx gT (@gval gT G) n rG x) *)
exact: quo_mx_coset.
Qed.
Lemma rcent_quo A : rcent rGH A = (rcent rG A / H)%g.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))))) (@rcent (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n quo_repr A) (@quotient gT (@rcent gT G n rG A) (@gval gT H)) *)
apply/setP=> Hx; rewrite !inE.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hx (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n A (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr Hx)) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr Hx) A))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hx (@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)))) (@quotient gT (@rcent gT G n rG A) (@gval gT H))))) *)
apply/andP/idP=> [[]|]; case/morphimP=> x Nx Gx ->{Hx}.
(* Goal: and (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n A (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x)) A))) *)
(* Goal: forall _ : is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n A (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x)) A)), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@quotient gT (@rcent gT G n rG A) (@gval gT H))))) *)
by rewrite quo_repr_coset // => cAx; rewrite mem_morphim // inE Gx.
(* Goal: and (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n A (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x)) A))) *)
by case/setIdP: Gx => Gx cAx; rewrite quo_repr_coset ?mem_morphim.
Qed.
Lemma rstab_quo m (U : 'M_(m, n)) : rstab rGH U = (rstab rG U / H)%g.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))))) (@rstab (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n quo_repr m U) (@quotient gT (@rstab gT G n rG m U) (@gval gT H)) *)
apply/setP=> Hx; rewrite !inE.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hx (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) m n) (@mulmx (GRing.ComUnitRing.ringType R) m n n U (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr Hx)) U)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hx (@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)))) (@quotient gT (@rstab gT G n rG m U) (@gval gT H))))) *)
apply/andP/idP=> [[]|]; case/morphimP=> x Nx Gx ->{Hx}.
(* Goal: and (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) m n) (@mulmx (GRing.ComUnitRing.ringType R) m n n U (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) U)) *)
(* Goal: forall _ : is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) m n) (@mulmx (GRing.ComUnitRing.ringType R) m n n U (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) U), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@quotient gT (@rstab gT G n rG m U) (@gval gT H))))) *)
by rewrite quo_repr_coset // => nUx; rewrite mem_morphim // inE Gx.
(* Goal: and (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) m n) (@mulmx (GRing.ComUnitRing.ringType R) m n n U (@repr_mx (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n quo_repr (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) U)) *)
by case/setIdP: Gx => Gx nUx; rewrite quo_repr_coset ?mem_morphim.
Qed.
Lemma rker_quo : rker rGH = (rker rG / H)%g.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))))) (@rker (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n quo_repr) (@quotient gT (@rker gT G n rG) (@gval gT H)) *)
exact: rstab_quo.
Qed.
End SubQuotient.
Definition kquo_mx := quo_mx (subxx (rker rG)) (rker_norm rG).
Lemma kquo_mxE : kquo_mx = quo_mx (subxx (rker rG)) (rker_norm rG).
Proof.
(* Goal: @eq (forall _ : @coset_of gT (@rker gT G n rG), matrix (GRing.ComUnitRing.sort R) n n) kquo_mx (@quo_mx (@rker gT G n rG) (@subxx (FinGroup.arg_finType (FinGroup.base gT)) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@rker gT G n rG))) (@rker_norm gT G n rG)) *)
by [].
Qed.
Canonical kquo_repr := @MxRepresentation _ _ _ kquo_mx (quo_mx_repr _ _).
Lemma kquo_repr_coset x :
x \in G -> kquo_repr (coset (rker rG) x) = rG x.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx (@coset_groupType gT (@rker gT G n rG)) (@quotient gT (@gval gT G) (@gval gT (@rker_group gT G n rG))) n kquo_repr (@coset gT (@rker gT G n rG) x)) (@repr_mx gT (@gval gT G) n rG x) *)
exact: quo_repr_coset.
Qed.
Lemma kquo_mx_faithful : mx_faithful kquo_repr.
Proof.
(* Goal: is_true (@mx_faithful (@coset_groupType gT (@rker gT G n rG)) (@quotient_group gT G (@rker gT G n rG)) n kquo_repr) *)
by rewrite /mx_faithful rker_quo trivg_quotient.
Qed.
End Quotient.
Section Regular.
Variables (gT : finGroupType) (G : {group gT}).
Local Notation nG := #|pred_of_set (gval G)|.
Definition gring_index (x : gT) := enum_rank_in (group1 G) x.
Lemma gring_valK : cancel enum_val gring_index.
Proof.
(* Goal: @cancel (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (ordinal (@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)))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x)))) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) gring_index *)
exact: enum_valK_in.
Qed.
Lemma gring_indexK : {in G, cancel gring_index enum_val}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.arg_sort (FinGroup.base gT)) (@enum_val (FinGroup.finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) (gring_index x)) x) (inPhantom (@cancel (@sub_sort nat (fun x : nat => leq (S x) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x0 : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x0)))) (ordinal_subType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))))) (FinGroup.arg_sort (FinGroup.base gT)) gring_index (@enum_val (FinGroup.finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
exact: enum_rankK_in.
Qed.
Definition regular_mx x : 'M[R]_nG :=
\matrix_i delta_mx 0 (gring_index (enum_val i * x)).
Lemma regular_mx_repr : mx_repr G regular_mx.
Proof.
(* Goal: @mx_repr gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_mx *)
split=> [|x y Gx Gy]; apply/row_matrixP=> i; rewrite !rowK.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@delta_mx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (gring_index (@mulg (FinGroup.base gT) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i) (@mulg (FinGroup.base gT) x y)))) (@row (GRing.ComUnitRing.sort R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) i (@mulmx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (regular_mx x) (regular_mx y))) *)
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@delta_mx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (gring_index (@mulg (FinGroup.base gT) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i) (oneg (FinGroup.base gT))))) (@row (GRing.ComUnitRing.sort R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) i (@scalar_mx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.ComUnitRing.ringType R)))) *)
by rewrite mulg1 row1 gring_valK.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@delta_mx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (gring_index (@mulg (FinGroup.base gT) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i) (@mulg (FinGroup.base gT) x y)))) (@row (GRing.ComUnitRing.sort R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) i (@mulmx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (regular_mx x) (regular_mx y))) *)
by rewrite row_mul rowK -rowE rowK mulgA gring_indexK // groupM ?enum_valP.
Qed.
Canonical regular_repr := MxRepresentation regular_mx_repr.
Local Notation aG := regular_repr.
Definition group_ring := enveloping_algebra_mx aG.
Local Notation R_G := group_ring.
Definition gring_row : 'M[R]_nG -> 'rV_nG := row (gring_index 1).
Canonical gring_row_linear := [linear of gring_row].
Lemma gring_row_mul A B : gring_row (A *m B) = gring_row A *m B.
Proof.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (gring_row (@mulmx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A B)) (@mulmx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (gring_row A) B) *)
exact: row_mul.
Qed.
Definition gring_proj x := row (gring_index x) \o trmx \o gring_row.
Canonical gring_proj_linear x := [linear of gring_proj x].
Lemma gring_projE : {in G &, forall x y, gring_proj x (aG y) = (x == y)%:R}.
Proof.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.ComUnitRing.sort R) (S O) (S O)) (gring_proj x (@repr_mx gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr y)) (@GRing.natmul (GRing.Ring.zmodType (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (GRing.one (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x y)))) (inPhantom (forall x y : FinGroup.arg_sort (FinGroup.base gT), @eq (matrix (GRing.ComUnitRing.sort R) (S O) (S O)) (gring_proj x (@repr_mx gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr y)) (@GRing.natmul (GRing.Ring.zmodType (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (GRing.one (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x y))))) *)
move=> x y Gx Gy; rewrite /gring_proj /= /gring_row rowK gring_indexK //=.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (S O)) (@row (GRing.ComUnitRing.sort R) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (S O) (gring_index x) (@trmx (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (@delta_mx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (gring_index (@mulg (FinGroup.base gT) (oneg (FinGroup.base gT)) y))))) (@GRing.natmul (GRing.Ring.zmodType (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (GRing.one (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x y))) *)
rewrite mul1g trmx_delta rowE mul_delta_mx_cond [delta_mx 0 0]mx11_scalar !mxE.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (S O)) (@GRing.natmul (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) (S O) (S O)) (@scalar_mx (GRing.ComUnitRing.ringType R) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) (GRing.one (GRing.ComUnitRing.ringType R)) (nat_of_bool (andb (@eq_op (Finite.eqType (ordinal_finType (S O))) (GRing.zero (Zp_zmodType O)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O)))) (@eq_op (Finite.eqType (ordinal_finType (S O))) (GRing.zero (Zp_zmodType O)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O)))))))) (nat_of_bool (@eq_op (ordinal_eqType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x)))) (gring_index x) (gring_index y)))) (@GRing.natmul (GRing.Ring.zmodType (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (GRing.one (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x y))) *)
by rewrite /= -(inj_eq (can_inj gring_valK)) !gring_indexK.
Qed.
Lemma regular_mx_faithful : mx_faithful aG.
Proof.
(* Goal: is_true (@mx_faithful gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr) *)
apply/subsetP=> x /setIdP[Gx].
(* Goal: forall _ : is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@scalar_mx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.ComUnitRing.ringType R))) (@repr_mx gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr x)) (@scalar_mx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.ComUnitRing.ringType R)))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) *)
rewrite mul1mx inE => /eqP/(congr1 (gring_proj 1%g)).
(* Goal: forall _ : @eq (matrix (GRing.ComUnitRing.sort R) (S O) (S O)) (gring_proj (oneg (FinGroup.base gT)) (@repr_mx gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr x)) (gring_proj (oneg (FinGroup.base gT)) (@scalar_mx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.ComUnitRing.ringType R)))), is_true (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
rewrite -(repr_mx1 aG) !gring_projE ?group1 // eqxx eq_sym.
(* Goal: forall _ : @eq (matrix (GRing.ComUnitRing.sort R) (S O) (S O)) (@GRing.natmul (GRing.Ring.zmodType (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (GRing.one (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x (oneg (FinGroup.base gT))))) (@GRing.natmul (GRing.Ring.zmodType (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (GRing.one (matrix_ringType (GRing.ComUnitRing.ringType R) O)) (nat_of_bool true)), is_true (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
by case: (x == _) => // /eqP; rewrite eq_sym oner_eq0.
Qed.
Section GringMx.
Variables (n : nat) (rG : mx_representation G n).
Definition gring_mx := vec_mx \o mulmxr (enveloping_algebra_mx rG).
Canonical gring_mx_linear := [linear of gring_mx].
Lemma gring_mxJ a x :
x \in G -> gring_mx (a *m aG x) = gring_mx a *m rG x.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (gring_mx (@mulmx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (@repr_mx gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr x))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (gring_mx a) (@repr_mx gT (@gval gT G) n rG x)) *)
move=> Gx; rewrite /gring_mx /= ![a *m _]mulmx_sum_row.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@vec_mx (GRing.ComUnitRing.sort R) n n (@mulmx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (index_enum (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (fun i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) true (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.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)))) i (regular_mx x))))) (@enveloping_algebra_mx gT G n rG))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@vec_mx (GRing.ComUnitRing.sort R) n n (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)))))) (index_enum (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (fun i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)))))) true (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) i (@enveloping_algebra_mx gT G n rG)))))) (@repr_mx gT (@gval gT G) n rG x)) *)
rewrite !(mulmx_suml, linear_sum); apply: eq_bigr => i _.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n))) (vec_mx_linear (GRing.ComUnitRing.ringType R) n n) (@mulmx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.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)))) i (regular_mx x))) (@enveloping_algebra_mx gT G n rG))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n))) (vec_mx_linear (GRing.ComUnitRing.ringType R) n n) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) i (@enveloping_algebra_mx gT G n rG)))) (@repr_mx gT (@gval gT G) n rG x)) *)
rewrite linearZ -!scalemxAl linearZ /=; congr (_ *: _) => {a}.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n))))) (@vec_mx (GRing.ComUnitRing.sort R) n n (@mulmx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@row (GRing.ComUnitRing.sort R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) i (regular_mx x)) (@enveloping_algebra_mx gT G n rG))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@vec_mx (GRing.ComUnitRing.sort R) n n (@row (GRing.ComUnitRing.sort R) (@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)))) (muln n n) i (@enveloping_algebra_mx gT G n rG))) (@repr_mx gT (@gval gT G) n rG x)) *)
rewrite !rowK /= !mxvecK -rowE rowK mxvecK.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@repr_mx gT (@gval gT G) n rG (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) (gring_index (@mulg (FinGroup.base gT) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i) x)))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@repr_mx gT (@gval gT G) n rG (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i)) (@repr_mx gT (@gval gT G) n rG x)) *)
by rewrite gring_indexK ?groupM ?repr_mxM ?enum_valP.
Qed.
End GringMx.
Lemma gring_mxK : cancel (gring_mx aG) gring_row.
Proof.
(* Goal: @cancel (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@gring_mx (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr) gring_row *)
move=> a; rewrite /gring_mx /= mulmx_sum_row !linear_sum.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.ComUnitRing.zmodType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (index_enum (ordinal_finType (@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)))))) (fun i : Finite.sort (ordinal_finType (@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))))) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.ComUnitRing.zmodType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (ordinal_finType (@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)))))) i (@GRing.add (matrix_zmodType (GRing.ComUnitRing.zmodType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.ComUnitRing.zmodType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.ComUnitRing.zmodType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) gring_row_linear (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (vec_mx_linear (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@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)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) i (@enveloping_algebra_mx gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr))))))) a *)
rewrite {2}[a]row_sum_delta; apply: eq_bigr => i _.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.ComUnitRing.zmodType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.ComUnitRing.zmodType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) gring_row_linear (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (vec_mx_linear (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@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)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) i (@enveloping_algebra_mx gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@delta_mx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)) *)
rewrite !linearZ /= /gring_row !(rowK, mxvecK).
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@fun_of_matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@delta_mx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (gring_index (@mulg (FinGroup.base gT) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) (gring_index (oneg (FinGroup.base gT)))) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@fun_of_matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (GRing.zero (Zp_zmodType O)) i) (@delta_mx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)) *)
by rewrite gring_indexK // mul1g gring_valK.
Qed.
Section GringOp.
Variables (n : nat) (rG : mx_representation G n).
Definition gring_op := gring_mx rG \o gring_row.
Canonical gring_op_linear := [linear of gring_op].
Lemma gring_opE a : gring_op a = gring_mx rG (gring_row a).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (gring_op a) (@gring_mx n rG (gring_row a)) *)
by [].
Qed.
Lemma gring_opG x : x \in G -> gring_op (aG x) = rG x.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (gring_op (@repr_mx gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr x)) (@repr_mx gT (@gval gT G) n rG x) *)
move=> Gx; rewrite gring_opE /gring_row rowK gring_indexK // mul1g.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@gring_mx n rG (@delta_mx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (gring_index x))) (@repr_mx gT (@gval gT G) n rG x) *)
by rewrite /gring_mx /= -rowE rowK mxvecK gring_indexK.
Qed.
Lemma gring_op1 : gring_op 1%:M = 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (gring_op (@scalar_mx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.ComUnitRing.ringType R)))) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) *)
by rewrite -(repr_mx1 aG) gring_opG ?repr_mx1.
Qed.
Lemma gring_opJ A b :
gring_op (A *m gring_mx aG b) = gring_op A *m gring_mx rG b.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (gring_op (@mulmx (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (@gring_mx (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr b))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (gring_op A) (@gring_mx n rG b)) *)
rewrite /gring_mx /= ![b *m _]mulmx_sum_row !linear_sum.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n)) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n)) (index_enum (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (fun i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n)) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n)) true (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n))) gring_op_linear (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))) (@GRing.scale (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))))) (@mulmx_linear (GRing.ComUnitRing.comRingType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (vec_mx_linear (GRing.ComUnitRing.ringType R) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) b (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) i (@enveloping_algebra_mx gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr)))))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n))))) (index_enum (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (fun i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n))))) true (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)))) (@GRing.scale (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n)))))) (@mulmx_linear (GRing.ComUnitRing.comRingType R) n n n (gring_op A)) (@GRing.Linear.apply (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType R)) n n))) (vec_mx_linear (GRing.ComUnitRing.ringType R) n n) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) (S O) (muln n n)) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) b (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) i (@enveloping_algebra_mx gT G n rG))))))) *)
apply: eq_bigr => i _; rewrite !linearZ /= !rowK !mxvecK.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n) (@fun_of_matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) b (GRing.zero (Zp_zmodType O)) i) (gring_op (@mulmx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (@repr_mx gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))))) (@GRing.scale (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n) (@fun_of_matrix (GRing.ComUnitRing.sort R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) b (GRing.zero (Zp_zmodType O)) i) (@mulmx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n n n (gring_op A) (@repr_mx gT (@gval gT G) n rG (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i)))) *)
by rewrite gring_opE gring_row_mul gring_mxJ ?enum_valP.
Qed.
Lemma gring_op_mx b : gring_op (gring_mx aG b) = gring_mx rG b.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (gring_op (@gring_mx (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr b)) (@gring_mx n rG b) *)
by rewrite -[_ b]mul1mx gring_opJ gring_op1 mul1mx.
Qed.
Lemma gring_mxA a b :
gring_mx rG (a *m gring_mx aG b) = gring_mx rG a *m gring_mx rG b.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@gring_mx n rG (@mulmx (GRing.ComUnitRing.ringType R) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a (@gring_mx (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) regular_repr b))) (@mulmx (GRing.ComUnitRing.ringType R) n n n (@gring_mx n rG a) (@gring_mx n rG b)) *)
by rewrite -(gring_op_mx a) -gring_opJ gring_opE gring_row_mul gring_mxK.
Qed.
End GringOp.
End Regular.
End RingRepr.
Arguments mx_representation R {gT} G%g n%N.
Arguments mx_repr {R gT} G%g {n%N} r.
Arguments group_ring R {gT} G%g.
Arguments regular_repr R {gT} G%g.
Arguments centgmxP {R gT G n rG f}.
Arguments rkerP {R gT G n rG x}.
Arguments repr_mxK {R gT G%G n%N} rG {m%N} [x%g] Gx.
Arguments repr_mxKV {R gT G%G n%N} rG {m%N} [x%g] Gx.
Arguments gring_valK {gT G%G} i%R : rename.
Arguments gring_indexK {gT G%G} x%g.
Arguments gring_mxK {R gT G%G} v%R : rename.
Section ChangeOfRing.
Variables (aR rR : comUnitRingType) (f : {rmorphism aR -> rR}).
Local Notation "A ^f" := (map_mx (GRing.RMorphism.apply f) A) : ring_scope.
Variables (gT : finGroupType) (G : {group gT}).
Lemma map_regular_mx x : (regular_mx aR G x)^f = regular_mx rR G x.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_mx aR gT G x)) (@regular_mx rR gT G x) *)
by apply/matrixP=> i j; rewrite !mxE rmorph_nat.
Qed.
Lemma map_gring_row (A : 'M_#|G|) : (gring_row A)^f = gring_row A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row aR gT G A)) (@gring_row rR gT G (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A)) *)
by rewrite map_row.
Qed.
Lemma map_gring_proj x (A : 'M_#|G|) : (gring_proj x A)^f = gring_proj x A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (S O) (S O)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (S O) (S O) (@gring_proj aR gT G x A)) (@gring_proj rR gT G x (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A)) *)
by rewrite map_row -map_trmx map_gring_row.
Qed.
Section OneRepresentation.
Variables (n : nat) (rG : mx_representation aR G n).
Definition map_repr_mx (f0 : aR -> rR) rG0 (g : gT) : 'M_n := map_mx f0 (rG0 g).
Lemma map_mx_repr : mx_repr G (map_repr_mx f rG).
Proof.
(* Goal: @mx_repr rR gT (@gval gT G) n (map_repr_mx (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@repr_mx aR gT (@gval gT G) n rG)) *)
split=> [|x y Gx Gy]; first by rewrite /map_repr_mx repr_mx1 map_mx1.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort rR) n n) (map_repr_mx (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@repr_mx aR gT (@gval gT G) n rG) (@mulg (FinGroup.base gT) x y)) (@mulmx (GRing.ComUnitRing.ringType rR) n n n (map_repr_mx (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@repr_mx aR gT (@gval gT G) n rG) x) (map_repr_mx (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@repr_mx aR gT (@gval gT G) n rG) y)) *)
by rewrite -map_mxM -repr_mxM.
Qed.
Lemma map_reprJ m (A : 'M_(m, n)) x : (A *m rG x)^f = A^f *m rGf x.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) m n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) m n (@mulmx (GRing.ComUnitRing.ringType aR) m n n A (@repr_mx aR gT (@gval gT G) n rG x))) (@mulmx (GRing.ComUnitRing.ringType rR) m n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) m n A) (@repr_mx rR gT (@gval gT G) n map_repr x)) *)
exact: map_mxM.
Qed.
Lemma map_enveloping_algebra_mx :
(enveloping_algebra_mx rG)^f = enveloping_algebra_mx rGf.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@enveloping_algebra_mx aR gT G n rG)) (@enveloping_algebra_mx rR gT G n map_repr) *)
by apply/row_matrixP=> i; rewrite -map_row !rowK map_mxvec.
Qed.
Lemma map_gring_mx a : (gring_mx rG a)^f = gring_mx rGf a^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) n n (@gring_mx aR gT G n rG a)) (@gring_mx rR gT G n map_repr (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a)) *)
by rewrite map_vec_mx map_mxM map_enveloping_algebra_mx.
Qed.
Lemma map_gring_op A : (gring_op rG A)^f = gring_op rGf A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) n n (@gring_op aR gT G n rG A)) (@gring_op rR gT G n map_repr (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A)) *)
by rewrite map_gring_mx map_gring_row.
Qed.
End OneRepresentation.
Lemma map_regular_repr : map_repr (regular_repr aR G) =1 regular_repr rR G.
Proof.
(* Goal: @eqfun (matrix (GRing.ComUnitRing.sort rR) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (FinGroup.arg_sort (FinGroup.base gT)) (@repr_mx rR gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_repr (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr aR gT G))) (@repr_mx rR gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr rR gT G)) *)
exact: map_regular_mx.
Qed.
Lemma map_group_ring : (group_ring aR G)^f = group_ring rR G.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComUnitRing.ringType aR) (GRing.ComUnitRing.ringType rR) (Phant (forall _ : GRing.ComUnitRing.sort aR, GRing.ComUnitRing.sort rR)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@group_ring aR gT G)) (@group_ring rR gT G) *)
rewrite map_enveloping_algebra_mx; apply/row_matrixP=> i.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@row (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) i (@enveloping_algebra_mx rR gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_repr (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr aR gT G)))) (@row (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rR))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) i (@group_ring rR gT G)) *)
by rewrite !rowK map_regular_repr.
Qed.
End ChangeOfRing.
Section FieldRepr.
Variable F : fieldType.
Section OneRepresentation.
Variable gT : finGroupType.
Variables (G : {group gT}) (n : nat) (rG : mx_representation F G n).
Arguments rG _%group_scope : extra scopes.
Local Notation E_G := (enveloping_algebra_mx rG).
Lemma repr_mx_free x : x \in G -> row_free (rG x).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@row_free F n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by move=> Gx; rewrite row_free_unit repr_mx_unit.
Qed.
Section Stabilisers.
Variables (m : nat) (U : 'M[F]_(m, n)).
Definition rstabs := [set x in G | U *m rG x <= U]%MS.
Lemma rstabs_sub : rstabs \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)) rstabs)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.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/subsetP=> x /setIdP[].
Qed.
Lemma rstabs_group_set : group_set rstabs.
Proof.
(* Goal: is_true (@group_set gT rstabs) *)
apply/group_setP; rewrite inE group1 repr_mx1 mulmx1.
(* Goal: and (is_true (andb true (@submx F m m n U U))) (@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)) rstabs)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) rstabs)) (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)) rstabs)))) (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)) rstabs)))))) *)
split=> //= x y /setIdP[Gx nUx] /setIdP[Gy]; rewrite inE repr_mxM ?groupM //.
(* Goal: forall _ : is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) U), is_true (andb true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y))) U)) *)
by apply: submx_trans; rewrite mulmxA submxMr.
Qed.
Canonical rstabs_group := Group rstabs_group_set.
Lemma rstab_act x m1 (W : 'M_(m1, n)) :
x \in rstab rG U -> (W <= U)%MS -> W *m rG x = W.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m U))))) (_ : is_true (@submx F m1 m n W U)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m1 n) (@mulmx (GRing.Field.ringType F) m1 n n W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) W *)
by case/setIdP=> _ /eqP cUx /submxP[w ->]; rewrite -mulmxA cUx.
Qed.
Lemma rstabs_act x m1 (W : 'M_(m1, n)) :
x \in rstabs -> (W <= U)%MS -> (W *m rG x <= U)%MS.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) rstabs)))) (_ : is_true (@submx F m1 m n W U)), is_true (@submx F m1 m n (@mulmx (GRing.Field.ringType F) m1 n n W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U) *)
by case/setIdP=> [_ nUx] sWU; apply: submx_trans nUx; apply: submxMr.
Qed.
Definition mxmodule := G \subset rstabs.
Lemma mxmoduleP : reflect {in G, forall x, U *m rG x <= U}%MS mxmodule.
Proof.
(* Goal: Bool.reflect (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U)))) mxmodule *)
by apply: (iffP subsetP) => modU x Gx; have:= modU x Gx; rewrite !inE ?Gx.
Qed.
End Stabilisers.
Arguments mxmoduleP {m U}.
Lemma rstabS m1 m2 (U : 'M_(m1, n)) (V : 'M_(m2, n)) :
(U <= V)%MS -> rstab rG V \subset rstab rG U.
Proof.
(* Goal: forall _ : is_true (@submx F m1 m2 n U V), 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)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m2 V))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m1 U)))) *)
case/submxP=> u ->; apply/subsetP=> x.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m2 V)))), 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)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m1 (@mulmx (GRing.Field.ringType F) m1 m2 n u V))))) *)
by rewrite !inE => /andP[-> /= /eqP cVx]; rewrite -mulmxA cVx.
Qed.
Lemma eqmx_rstab m1 m2 (U : 'M_(m1, n)) (V : 'M_(m2, n)) :
(U :=: V)%MS -> rstab rG U = rstab rG V.
Proof.
(* Goal: forall _ : @eqmx F m1 m2 n U V, @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m1 U) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m2 V) *)
by move=> eqUV; apply/eqP; rewrite eqEsubset !rstabS ?eqUV.
Qed.
Lemma eqmx_rstabs m1 m2 (U : 'M_(m1, n)) (V : 'M_(m2, n)) :
(U :=: V)%MS -> rstabs U = rstabs V.
Proof.
(* Goal: forall _ : @eqmx F m1 m2 n U V, @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstabs m1 U) (@rstabs m2 V) *)
by move=> eqUV; apply/setP=> x; rewrite !inE eqUV (eqmxMr _ eqUV).
Qed.
Lemma eqmx_module m1 m2 (U : 'M_(m1, n)) (V : 'M_(m2, n)) :
(U :=: V)%MS -> mxmodule U = mxmodule V.
Proof.
(* Goal: forall _ : @eqmx F m1 m2 n U V, @eq bool (@mxmodule m1 U) (@mxmodule m2 V) *)
by move=> eqUV; rewrite /mxmodule (eqmx_rstabs eqUV).
Qed.
Lemma mxmodule0 m : mxmodule (0 : 'M_(m, n)).
Proof.
(* Goal: is_true (@mxmodule m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n) : matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) m n)) *)
by apply/mxmoduleP=> x _; rewrite mul0mx.
Qed.
Lemma mxmodule1 : mxmodule 1%:M.
Proof.
(* Goal: is_true (@mxmodule n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) *)
by apply/mxmoduleP=> x _; rewrite submx1.
Qed.
Lemma mxmodule_trans m1 m2 (U : 'M_(m1, n)) (W : 'M_(m2, n)) x :
mxmodule U -> x \in G -> (W <= U -> W *m rG x <= U)%MS.
Proof.
(* Goal: forall (_ : is_true (@mxmodule m1 U)) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@submx F m2 m1 n W U)), is_true (@submx F m2 m1 n (@mulmx (GRing.Field.ringType F) m2 n n W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U) *)
by move=> modU Gx sWU; apply: submx_trans (mxmoduleP modU x Gx); apply: submxMr.
Qed.
Lemma mxmodule_eigenvector m (U : 'M_(m, n)) :
mxmodule U -> \rank U = 1%N ->
{u : 'rV_n & {a | (U :=: u)%MS & {in G, forall x, u *m rG x = a x *: u}}}.
Proof.
(* Goal: forall (_ : is_true (@mxmodule m U)) (_ : @eq nat (@mxrank F m n U) (S O)), @sigT (matrix (GRing.Field.sort F) (S O) n) (fun u : matrix (GRing.Field.sort F) (S O) n => @sig2 (forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F)) (fun _ : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @eqmx F m (S O) n U u) (fun a : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u))))) *)
move=> modU linU; set u := nz_row U; exists u.
(* Goal: @sig2 (forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F)) (fun _ : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @eqmx F m (S O) n U u) (fun a : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)))) *)
have defU: (U :=: u)%MS.
(* Goal: @sig2 (forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F)) (fun _ : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @eqmx F m (S O) n U u) (fun a : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)))) *)
(* Goal: @eqmx F m (S O) n U u *)
apply/eqmxP; rewrite andbC -(geq_leqif (mxrank_leqif_eq _)) ?nz_row_sub //.
(* Goal: @sig2 (forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F)) (fun _ : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @eqmx F m (S O) n U u) (fun a : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)))) *)
(* Goal: is_true (leq (@mxrank F m n U) (@mxrank F (S O) n u)) *)
by rewrite linU lt0n mxrank_eq0 nz_row_eq0 -mxrank_eq0 linU.
(* Goal: @sig2 (forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F)) (fun _ : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @eqmx F m (S O) n U u) (fun a : forall _ : FinGroup.arg_sort (FinGroup.base gT), GRing.Ring.sort (GRing.Field.ringType F) => @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u)))) *)
pose a x := (u *m rG x *m pinvmx u) 0 0; exists a => // x Gx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) (a x) u) *)
by rewrite -mul_scalar_mx -mx11_scalar mulmxKpV // -defU mxmodule_trans ?defU.
Qed.
Lemma addsmx_module m1 m2 U V :
@mxmodule m1 U -> @mxmodule m2 V -> mxmodule (U + V)%MS.
Proof.
(* Goal: forall (_ : is_true (@mxmodule m1 U)) (_ : is_true (@mxmodule m2 V)), is_true (@mxmodule n (@addsmx F m1 m2 n U V)) *)
move=> modU modV; apply/mxmoduleP=> x Gx.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (@addsmx F m1 m2 n U V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@addsmx F m1 m2 n U V)) *)
by rewrite addsmxMr addsmxS ?(mxmoduleP _ x Gx).
Qed.
Lemma sumsmx_module I r (P : pred I) U :
(forall i, P i -> mxmodule (U i)) -> mxmodule (\sum_(i <- r | P i) U i)%MS.
Proof.
(* Goal: forall _ : forall (i : I) (_ : is_true (P i)), is_true (@mxmodule n (U i)), is_true (@mxmodule n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) I (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) r (fun i : I => @BigBody (matrix (GRing.Field.sort F) n n) I i (@addsmx F n n n) (P i) (U i)))) *)
by move=> modU; elim/big_ind: _; [apply: mxmodule0 | apply: addsmx_module | ].
Qed.
Lemma capmx_module m1 m2 U V :
@mxmodule m1 U -> @mxmodule m2 V -> mxmodule (U :&: V)%MS.
Proof.
(* Goal: forall (_ : is_true (@mxmodule m1 U)) (_ : is_true (@mxmodule m2 V)), is_true (@mxmodule n (@capmx F m1 m2 n U V)) *)
move=> modU modV; apply/mxmoduleP=> x Gx.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (@capmx F m1 m2 n U V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@capmx F m1 m2 n U V)) *)
by rewrite sub_capmx !mxmodule_trans ?capmxSl ?capmxSr.
Qed.
Lemma bigcapmx_module I r (P : pred I) U :
(forall i, P i -> mxmodule (U i)) -> mxmodule (\bigcap_(i <- r | P i) U i)%MS.
Proof.
(* Goal: forall _ : forall (i : I) (_ : is_true (P i)), is_true (@mxmodule n (U i)), is_true (@mxmodule n (@BigOp.bigop (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) I (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) r (fun i : I => @BigBody (matrix (GRing.Field.sort F) n n) I i (@capmx F n n n) (P i) (U i)))) *)
by move=> modU; elim/big_ind: _; [apply: mxmodule1 | apply: capmx_module | ].
Qed.
Section Submodule.
Variable U : 'M[F]_n.
Definition val_submod m : 'M_(m, \rank U) -> 'M_(m, n) := mulmxr (row_base U).
Definition in_submod m : 'M_(m, n) -> 'M_(m, \rank U) :=
mulmxr (invmx (row_ebase U) *m pid_mx (\rank U)).
Canonical val_submod_linear m := [linear of @val_submod m].
Canonical in_submod_linear m := [linear of @in_submod m].
Lemma val_submodE m W : @val_submod m W = W *m val_submod 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@val_submod m W) (@mulmx (GRing.Field.ringType F) m (@mxrank F n n U) n W (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F))))) *)
by rewrite mulmxA mulmx1.
Qed.
Lemma in_submodE m W : @in_submod m W = W *m in_submod 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U)) (@in_submod m W) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m n (@mxrank F n n U) W (@in_submod n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))))))) *)
by rewrite mulmxA mulmx1.
Qed.
Lemma val_submod1 : (val_submod 1%:M :=: U)%MS.
Proof.
(* Goal: @eqmx F (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) U *)
by rewrite /val_submod /= mul1mx; apply: eq_row_base.
Qed.
Lemma val_submodP m W : (@val_submod m W <= U)%MS.
Proof.
(* Goal: is_true (@submx F m n n (@val_submod m W) U) *)
by rewrite mulmx_sub ?eq_row_base.
Qed.
Lemma val_submodK m : cancel (@val_submod m) (@in_submod m).
Proof.
(* Goal: @cancel (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (@mxrank F n n U)) (@val_submod m) (@in_submod m) *)
move=> W; rewrite /in_submod /= -!mulmxA mulKVmx ?row_ebase_unit //.
(* Goal: @eq (matrix (GRing.Field.sort F) m (@mxrank F n n U)) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m (@mxrank F n n U) (@mxrank F n n U) W (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) n (@mxrank F n n U) (@pid_mx (GRing.Field.ringType F) (@mxrank F n n U) n (@mxrank F n n U)) (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U)))) W *)
by rewrite pid_mx_id ?rank_leq_row // pid_mx_1 mulmx1.
Qed.
Lemma val_submod_inj m : injective (@val_submod m).
Proof.
(* Goal: @injective (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (@mxrank F n n U)) (@val_submod m) *)
exact: can_inj (@val_submodK m).
Qed.
Lemma val_submodS m1 m2 (V : 'M_(m1, \rank U)) (W : 'M_(m2, \rank U)) :
(val_submod V <= val_submod W)%MS = (V <= W)%MS.
Proof.
(* Goal: @eq bool (@submx F m1 m2 n (@val_submod m1 V) (@val_submod m2 W)) (@submx F m1 m2 (@mxrank F n n U) V W) *)
apply/idP/idP=> sVW; last exact: submxMr.
(* Goal: is_true (@submx F m1 m2 (@mxrank F n n U) V W) *)
by rewrite -[V]val_submodK -[W]val_submodK submxMr.
Qed.
Lemma in_submodK m W : (W <= U)%MS -> val_submod (@in_submod m W) = W.
Proof.
(* Goal: forall _ : is_true (@submx F m n n W U), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@val_submod m (@in_submod m W)) W *)
case/submxP=> w ->; rewrite /val_submod /= -!mulmxA.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@mulmx (GRing.Field.ringType F) m n n w (@mulmx (GRing.Field.ringType F) n n n U (@mulmx (GRing.Field.ringType F) n n n (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U)) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) n (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U)) (@row_base F n n U))))) (@mulmx (GRing.Field.ringType F) m n n w U) *)
congr (_ *m _); rewrite -{1}[U]mulmx_ebase !mulmxA mulmxK ?row_ebase_unit //.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) n (@mulmx (GRing.Field.ringType F) n n (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) n n n (@col_ebase F n n U) (@pid_mx (GRing.Field.ringType F) n n (@mxrank F n n U))) (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U))) (@pid_mx (GRing.Field.ringType F) (@mxrank F n n U) n (@mxrank F n n U))) (@row_ebase F n n U)) U *)
by rewrite -2!(mulmxA (col_ebase U)) !pid_mx_id ?rank_leq_row // mulmx_ebase.
Qed.
Lemma val_submod_eq0 m W : (@val_submod m W == 0) = (W == 0).
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m n) (@val_submod m W) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m (@mxrank F n n U)) W (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (@mxrank F n n U)))) *)
by rewrite -!submx0 -val_submodS linear0 !(submx0, eqmx0).
Qed.
Lemma in_submod_eq0 m W : (@in_submod m W == 0) = (W <= U^C)%MS.
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U)) (@in_submod m W) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U)))) (@submx F m n n W (@complmx F n n U)) *)
apply/eqP/submxP=> [W_U0 | [w ->{W}]].
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) (@in_submod m (@mulmx (GRing.Field.ringType F) m n n w (@complmx F n n U))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) *)
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (fun D : matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n => @eq (matrix (GRing.Field.sort F) m n) W (@mulmx (GRing.Field.ringType F) m n n D (@complmx F n n U))) *)
exists (W *m invmx (row_ebase U)).
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) (@in_submod m (@mulmx (GRing.Field.ringType F) m n n w (@complmx F n n U))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) *)
(* Goal: @eq (matrix (GRing.Field.sort F) m n) W (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m n n W (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U))) (@complmx F n n U)) *)
rewrite mulmxA mulmxBr mulmx1 -(pid_mx_id _ _ _ (leqnn _)).
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) (@in_submod m (@mulmx (GRing.Field.ringType F) m n n w (@complmx F n n U))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) *)
(* Goal: @eq (matrix (GRing.Field.sort F) m n) W (@mulmx (GRing.Field.ringType F) m n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m n n W (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m n n W (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U))) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) n (@pid_mx (GRing.Field.ringType F) n (@mxrank F n n U) (@mxrank F n n U)) (@pid_mx (GRing.Field.ringType F) (@mxrank F n n U) n (@mxrank F n n U)))))) (@row_ebase F n n U)) *)
rewrite mulmxA -(mulmxA W) [W *m (_ *m _)]W_U0 mul0mx subr0.
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) (@in_submod m (@mulmx (GRing.Field.ringType F) m n n w (@complmx F n n U))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) *)
(* Goal: @eq (matrix (GRing.Field.sort F) m n) W (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m n n W (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U))) (@row_ebase F n n U)) *)
by rewrite mulmxKV ?row_ebase_unit.
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) (@in_submod m (@mulmx (GRing.Field.ringType F) m n n w (@complmx F n n U))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) *)
rewrite /in_submod /= -!mulmxA mulKVmx ?row_ebase_unit //.
(* Goal: @eq (matrix (GRing.Field.sort F) m (@mxrank F n n U)) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m n (@mxrank F n n U) w (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n n (@mxrank F n n U) (@copid_mx (GRing.Field.ringType F) n (@mxrank F n n U)) (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) m (@mxrank F n n U))) *)
by rewrite mul_copid_mx_pid ?rank_leq_row ?mulmx0.
Qed.
Lemma mxrank_in_submod m (W : 'M_(m, n)) :
(W <= U)%MS -> \rank (in_submod W) = \rank W.
Proof.
(* Goal: forall _ : is_true (@submx F m n n W U), @eq nat (@mxrank F m (@mxrank F n n U) (@in_submod m W)) (@mxrank F m n W) *)
by move=> sWU; apply/eqP; rewrite eqn_leq -{3}(in_submodK sWU) !mxrankM_maxl.
Qed.
Definition val_factmod m : _ -> 'M_(m, n) :=
mulmxr (row_base (cokermx U) *m row_ebase U).
Definition in_factmod m : 'M_(m, n) -> _ := mulmxr (col_base (cokermx U)).
Canonical val_factmod_linear m := [linear of @val_factmod m].
Canonical in_factmod_linear m := [linear of @in_factmod m].
Lemma val_factmodE m W : @val_factmod m W = W *m val_factmod 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@val_factmod m W) (@mulmx (GRing.Field.ringType F) m (@mxrank F n n (@cokermx F n n U)) n W (@val_factmod (@mxrank F n n (@cokermx F n n U)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n (@cokermx F n n U)) (GRing.one (GRing.Field.ringType F))))) *)
by rewrite mulmxA mulmx1.
Qed.
Lemma in_factmodE m W : @in_factmod m W = W *m in_factmod 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (@mxrank F n n (@cokermx F n n U))) (@in_factmod m W) (@mulmx (GRing.Field.ringType F) m n (@mxrank F n n (@cokermx F n n U)) W (@in_factmod n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
by rewrite mulmxA mulmx1.
Qed.
Lemma val_factmodP m W : (@val_factmod m W <= U^C)%MS.
Proof.
(* Goal: is_true (@submx F m n n (@val_factmod m W) (@complmx F n n U)) *)
by rewrite mulmx_sub {m W}// (eqmxMr _ (eq_row_base _)) -mulmxA submxMl.
Qed.
Lemma val_factmodK m : cancel (@val_factmod m) (@in_factmod m).
Proof.
(* Goal: @cancel (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (@mxrank F n n (@cokermx F n n U))) (@val_factmod m) (@in_factmod m) *)
move=> W /=; rewrite /in_factmod /=; set Uc := cokermx U.
(* Goal: @eq (matrix (GRing.Field.sort F) m (@mxrank F n n Uc)) (@mulmx (GRing.Field.ringType F) m n (@mxrank F n n Uc) (@val_factmod m W) (@col_base F n n Uc)) W *)
apply: (row_free_inj (row_base_free Uc)); rewrite -mulmxA mulmx_base.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n (@val_factmod m W) Uc) (@mulmx (GRing.Field.ringType F) m (@mxrank F n n Uc) n W (@row_base F n n Uc)) *)
rewrite /val_factmod /= 2!mulmxA -/Uc mulmxK ?row_ebase_unit //.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m (@mxrank F n n Uc) n W (@row_base F n n Uc)) (@copid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U))) (@mulmx (GRing.Field.ringType F) m (@mxrank F n n Uc) n W (@row_base F n n Uc)) *)
have /submxP[u ->]: (row_base Uc <= Uc)%MS by rewrite eq_row_base.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m (@mxrank F n n Uc) n W (@mulmx (GRing.Field.ringType F) (@mxrank F n n Uc) n n u Uc)) (@copid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U))) (@mulmx (GRing.Field.ringType F) m (@mxrank F n n Uc) n W (@mulmx (GRing.Field.ringType F) (@mxrank F n n Uc) n n u Uc)) *)
by rewrite -!mulmxA copid_mx_id ?rank_leq_row.
Qed.
Lemma val_factmod_inj m : injective (@val_factmod m).
Proof.
(* Goal: @injective (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (@mxrank F n n (@cokermx F n n U))) (@val_factmod m) *)
exact: can_inj (@val_factmodK m).
Qed.
Lemma val_factmodS m1 m2 (V : 'M_(m1, _)) (W : 'M_(m2, _)) :
(val_factmod V <= val_factmod W)%MS = (V <= W)%MS.
Proof.
(* Goal: @eq bool (@submx F m1 m2 n (@val_factmod m1 V) (@val_factmod m2 W)) (@submx F m1 m2 (@mxrank F n n (@cokermx F n n U)) V W) *)
apply/idP/idP=> sVW; last exact: submxMr.
(* Goal: is_true (@submx F m1 m2 (@mxrank F n n (@cokermx F n n U)) V W) *)
by rewrite -[V]val_factmodK -[W]val_factmodK submxMr.
Qed.
Lemma val_factmod_eq0 m W : (@val_factmod m W == 0) = (W == 0).
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m n) (@val_factmod m W) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m (@mxrank F n n (@cokermx F n n U))) W (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (@mxrank F n n (@cokermx F n n U))))) *)
by rewrite -!submx0 -val_factmodS linear0 !(submx0, eqmx0).
Qed.
Lemma in_factmod_eq0 m (W : 'M_(m, n)) : (in_factmod W == 0) = (W <= U)%MS.
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m (@mxrank F n n (@cokermx F n n U))) (@in_factmod m W) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (@mxrank F n n (@cokermx F n n U))))) (@submx F m n n W U) *)
rewrite submxE -!mxrank_eq0 -{2}[_ U]mulmx_base mulmxA.
(* Goal: @eq bool (@eq_op nat_eqType (@mxrank F m (@mxrank F n n (@cokermx F n n U)) (@in_factmod m W)) O) (@eq_op nat_eqType (@mxrank F m n (@mulmx (GRing.Field.ringType F) m (@mxrank F n n (@cokermx F n n U)) n (@mulmx (GRing.Field.ringType F) m n (@mxrank F n n (@cokermx F n n U)) W (@col_base F n n (@cokermx F n n U))) (@row_base F n n (@cokermx F n n U)))) O) *)
by rewrite (mxrankMfree _ (row_base_free _)).
Qed.
Lemma in_factmodK m (W : 'M_(m, n)) :
(W <= U^C)%MS -> val_factmod (in_factmod W) = W.
Proof.
(* Goal: forall _ : is_true (@submx F m n n W (@complmx F n n U)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@val_factmod m (@in_factmod m W)) W *)
case/submxP=> w ->{W}; rewrite /val_factmod /= -2!mulmxA.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@mulmx (GRing.Field.ringType F) m n n w (@mulmx (GRing.Field.ringType F) n n n (@complmx F n n U) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n (@cokermx F n n U)) n (@col_base F n n (@cokermx F n n U)) (@mulmx (GRing.Field.ringType F) (@mxrank F n n (@cokermx F n n U)) n n (@row_base F n n (@cokermx F n n U)) (@row_ebase F n n U))))) (@mulmx (GRing.Field.ringType F) m n n w (@complmx F n n U)) *)
congr (_ *m _); rewrite (mulmxA (col_base _)) mulmx_base -2!mulmxA.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n (@copid_mx (GRing.Field.ringType F) n (@mxrank F n n U)) (@mulmx (GRing.Field.ringType F) n n n (@row_ebase F n n U) (@mulmx (GRing.Field.ringType F) n n n (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U)) (@mulmx (GRing.Field.ringType F) n n n (@copid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U)) (@row_ebase F n n U))))) (@complmx F n n U) *)
by rewrite mulKVmx ?row_ebase_unit // mulmxA copid_mx_id ?rank_leq_row.
Qed.
Lemma in_factmod_addsK m (W : 'M_(m, n)) :
(in_factmod (U + W)%MS :=: in_factmod W)%MS.
Lemma add_sub_fact_mod m (W : 'M_(m, n)) :
val_submod (in_submod W) + val_factmod (in_factmod W) = W.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@val_submod m (@in_submod m W)) (@val_factmod m (@in_factmod m W))) W *)
rewrite /val_submod /val_factmod /= -!mulmxA -mulmxDr.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@mulmx (GRing.Field.ringType F) m n n W (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U)) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) n (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U)) (@row_base F n n U))) (@mulmx (GRing.Field.ringType F) n n n (@col_ebase F n n (@cokermx F n n U)) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n (@cokermx F n n U)) n (@pid_mx (GRing.Field.ringType F) n (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n (@cokermx F n n U)) n n (@pid_mx (GRing.Field.ringType F) (@mxrank F n n (@cokermx F n n U)) n (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.Field.ringType F) n n n (@row_ebase F n n (@cokermx F n n U)) (@row_ebase F n n U))))))) W *)
rewrite addrC (mulmxA (pid_mx _)) pid_mx_id // (mulmxA (col_ebase _)).
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@mulmx (GRing.Field.ringType F) m n n W (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n (@col_ebase F n n (@cokermx F n n U)) (@pid_mx (GRing.Field.ringType F) n n (@mxrank F n n (@cokermx F n n U)))) (@mulmx (GRing.Field.ringType F) n n n (@row_ebase F n n (@cokermx F n n U)) (@row_ebase F n n U))) (@mulmx (GRing.Field.ringType F) n n n (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U)) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) n (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U)) (@row_base F n n U))))) W *)
rewrite (mulmxA _ _ (row_ebase _)) mulmx_ebase.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@mulmx (GRing.Field.ringType F) m n n W (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n (@cokermx F n n U) (@row_ebase F n n U)) (@mulmx (GRing.Field.ringType F) n n n (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U)) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) n (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U)) (@row_base F n n U))))) W *)
rewrite (mulmxA (pid_mx _)) pid_mx_id // mulmxA -mulmxDl -mulmxDr.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@mulmx (GRing.Field.ringType F) m n n W (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@copid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U)) (@pid_mx (GRing.Field.ringType F) n n (@mxrank F n n U)))) (@row_ebase F n n U))) W *)
by rewrite subrK mulmx1 mulmxA mulmxKV ?row_ebase_unit.
Qed.
Lemma proj_factmodS m (W : 'M_(m, n)) :
(val_factmod (in_factmod W) <= U + W)%MS.
Proof.
(* Goal: is_true (@submx F m n n (@val_factmod m (@in_factmod m W)) (@addsmx F n m n U W)) *)
by rewrite -{2}[W]add_sub_fact_mod addsmx_addKl ?val_submodP ?addsmxSr.
Qed.
Lemma in_factmodsK m (W : 'M_(m, n)) :
(U <= W)%MS -> (U + val_factmod (in_factmod W) :=: W)%MS.
Lemma mxrank_in_factmod m (W : 'M_(m, n)) :
(\rank (in_factmod W) + \rank U)%N = \rank (U + W).
Definition submod_mx of mxmodule U :=
fun x => in_submod (val_submod 1%:M *m rG x).
Definition factmod_mx of mxmodule U :=
fun x => in_factmod (val_factmod 1%:M *m rG x).
Hypothesis Umod : mxmodule U.
Lemma in_submodJ m (W : 'M_(m, n)) x :
(W <= U)%MS -> in_submod (W *m rG x) = in_submod W *m submod_mx Umod x.
Lemma val_submodJ m (W : 'M_(m, \rank U)) x :
x \in G -> val_submod (W *m submod_mx Umod x) = val_submod W *m rG x.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@val_submod m (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m (@mxrank F n n U) (@mxrank F n n U) W (submod_mx Umod x))) (@mulmx (GRing.Field.ringType F) m n n (@val_submod m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
move=> Gx; rewrite 2!(mulmxA W) -val_submodE in_submodK //.
(* Goal: is_true (@submx F m n n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) m n n (@val_submod m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U) *)
by rewrite mxmodule_trans ?val_submodP.
Qed.
Lemma submod_mx_repr : mx_repr G (submod_mx Umod).
Proof.
(* Goal: @mx_repr (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (submod_mx Umod) *)
rewrite /submod_mx; split=> [|x y Gx Gy /=].
(* Goal: @eq (matrix (GRing.Field.sort F) (@mxrank F n n U) (@mxrank F n n U)) (@in_submod (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@mulg (FinGroup.base gT) x y)))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F n n U) (@in_submod (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@in_submod (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)))) *)
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U)) (@in_submod (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (oneg (FinGroup.base gT))))) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) *)
by rewrite repr_mx1 mulmx1 val_submodK.
(* Goal: @eq (matrix (GRing.Field.sort F) (@mxrank F n n U) (@mxrank F n n U)) (@in_submod (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@mulg (FinGroup.base gT) x y)))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F n n U) (@in_submod (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@in_submod (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)))) *)
rewrite -in_submodJ; first by rewrite repr_mxM ?mulmxA.
(* Goal: is_true (@submx F (@mxrank F n n U) n n (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U) *)
by rewrite mxmodule_trans ?val_submodP.
Qed.
Canonical submod_repr := MxRepresentation submod_mx_repr.
Lemma in_factmodJ m (W : 'M_(m, n)) x :
x \in G -> in_factmod (W *m rG x) = in_factmod W *m factmod_mx Umod x.
Lemma val_factmodJ m (W : 'M_(m, \rank (cokermx U))) x :
x \in G ->
val_factmod (W *m factmod_mx Umod x) =
val_factmod (in_factmod (val_factmod W *m rG x)).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@val_factmod m (@mulmx (GRing.Field.ringType F) m (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) W (factmod_mx Umod x))) (@val_factmod m (@in_factmod m (@mulmx (GRing.Field.ringType F) m n n (@val_factmod m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) *)
by move=> Gx; rewrite -{1}[W]val_factmodK -in_factmodJ.
Qed.
Lemma factmod_mx_repr : mx_repr G (factmod_mx Umod).
Proof.
(* Goal: @mx_repr (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (factmod_mx Umod) *)
split=> [|x y Gx Gy /=].
(* Goal: @eq (matrix (GRing.Field.sort F) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U))) (factmod_mx Umod (@mulg (FinGroup.base gT) x y)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (factmod_mx Umod x) (factmod_mx Umod y)) *)
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U))) (factmod_mx Umod (oneg (FinGroup.base gT))) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@cokermx F n n U)) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) *)
by rewrite /factmod_mx repr_mx1 mulmx1 val_factmodK.
(* Goal: @eq (matrix (GRing.Field.sort F) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U))) (factmod_mx Umod (@mulg (FinGroup.base gT) x y)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (factmod_mx Umod x) (factmod_mx Umod y)) *)
by rewrite -in_factmodJ // -mulmxA -repr_mxM.
Qed.
Canonical factmod_repr := MxRepresentation factmod_mx_repr.
Lemma mxtrace_sub_fact_mod x :
\tr (submod_repr x) + \tr (factmod_repr x) = \tr (rG x).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) submod_repr x)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) factmod_repr x))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
rewrite -[submod_repr x]mulmxA mxtrace_mulC -val_submodE addrC.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) factmod_repr x)) (@mxtrace (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@val_submod n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n n (@mxrank F n n U) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n n (@mxrank F n n U) (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U)) (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U))))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
rewrite -[factmod_repr x]mulmxA mxtrace_mulC -val_factmodE addrC.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@val_submod n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n n (@mxrank F n n U) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n n (@mxrank F n n U) (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase F n n U)) (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n U)))))) (@mxtrace (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@val_factmod n (@mulmx (GRing.Field.ringType F) n n (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x) (@col_base F n n (@cokermx F n n U)))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by rewrite -mxtraceD add_sub_fact_mod.
Qed.
End Submodule.
Lemma envelop_mx_id x : x \in G -> (rG x \in E_G)%MS.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
by move=> Gx; rewrite (eq_row_sub (enum_rank_in Gx x)) // rowK enum_rankK_in.
Qed.
Lemma envelop_mx1 : (1%:M \in E_G)%MS.
Proof.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
by rewrite -(repr_mx1 rG) envelop_mx_id.
Qed.
Lemma envelop_mxP A :
reflect (exists a, A = \sum_(x in G) a x *: rG x) (A \in E_G)%MS.
Lemma envelop_mxM A B : (A \in E_G -> B \in E_G -> A *m B \in E_G)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (_ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n B) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))), is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A B)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
case/envelop_mxP=> a ->{A}; case/envelop_mxP=> b ->{B}.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (b x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
rewrite mulmx_suml !linear_sum summx_sub //= => x Gx.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) n n n (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) n n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) n n) (@Choice.Class (matrix (GRing.Field.sort F) n n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))))) n n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) n n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @BigBody (matrix (GRing.Field.sort F) n n) (FinGroup.arg_sort (FinGroup.base gT)) x (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) n n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) n n) (@Choice.Class (matrix (GRing.Field.sort F) n n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))))) n n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) n n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (b x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
rewrite !linear_sum summx_sub //= => y Gy.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n n (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (b y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
rewrite -scalemxAl !(linearZ, scalemx_sub) //= -repr_mxM //.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@mulg (FinGroup.base gT) x y))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
by rewrite envelop_mx_id ?groupM.
Qed.
Lemma mxmodule_envelop m1 m2 (U : 'M_(m1, n)) (W : 'M_(m2, n)) A :
(mxmodule U -> mxvec A <= E_G -> W <= U -> W *m A <= U)%MS.
Proof.
(* Goal: forall (_ : is_true (@mxmodule m1 U)) (_ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (_ : is_true (@submx F m2 m1 n W U)), is_true (@submx F m2 m1 n (@mulmx (GRing.Field.ringType F) m2 n n W A) U) *)
move=> modU /envelop_mxP[a ->] sWU; rewrite linear_sum summx_sub // => x Gx.
(* Goal: is_true (@submx F m2 m1 n (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m2 n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m2 n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m2 n)))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m2 n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m2 n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m2 n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m2 n)))))) (@mulmx_linear (GRing.Field.comRingType F) m2 n n W) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) U) *)
by rewrite linearZ scalemx_sub ?mxmodule_trans.
Qed.
Definition dom_hom_mx f : 'M_n :=
kermx (lin1_mx (mxvec \o mulmx (cent_mx_fun E_G f) \o lin_mul_row)).
Lemma hom_mxP m f (W : 'M_(m, n)) :
reflect (forall x, x \in G -> W *m rG x *m f = W *m f *m rG x)
(W <= dom_hom_mx f)%MS.
Arguments hom_mxP {m f W}.
Lemma hom_envelop_mxC m f (W : 'M_(m, n)) A :
(W <= dom_hom_mx f -> A \in E_G -> W *m A *m f = W *m f *m A)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx F m n n W (dom_hom_mx f))) (_ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m n n W A) f) (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m n n W f) A) *)
move/hom_mxP=> cWfG /envelop_mxP[a ->]; rewrite !linear_sum mulmx_suml.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) m n n (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)))))) (@mulmx_linear (GRing.Field.comRingType F) m n n W) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a i) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG i))) f))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) m n)))))) (@mulmx_linear (GRing.Field.comRingType F) m n n (@mulmx (GRing.Field.ringType F) m n n W f)) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a i) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG i))))) *)
by apply: eq_bigr => x Gx; rewrite !linearZ -scalemxAl /= cWfG.
Qed.
Lemma dom_hom_invmx f :
f \in unitmx -> (dom_hom_mx (invmx f) :=: dom_hom_mx f *m f)%MS.
Lemma dom_hom_mx_module f : mxmodule (dom_hom_mx f).
Proof.
(* Goal: is_true (@mxmodule n (dom_hom_mx f)) *)
apply/mxmoduleP=> x Gx; apply/hom_mxP=> y Gy.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (dom_hom_mx f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) f) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (dom_hom_mx f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) *)
rewrite -[_ *m rG y]mulmxA -repr_mxM // 2?(hom_mxP _) ?groupM //.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (dom_hom_mx f) f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@mulg (FinGroup.base gT) x y))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (dom_hom_mx f) f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) *)
by rewrite repr_mxM ?mulmxA.
Qed.
Lemma hom_mxmodule m (U : 'M_(m, n)) f :
(U <= dom_hom_mx f)%MS -> mxmodule U -> mxmodule (U *m f).
Proof.
(* Goal: forall (_ : is_true (@submx F m n n U (dom_hom_mx f))) (_ : is_true (@mxmodule m U)), is_true (@mxmodule m (@mulmx (GRing.Field.ringType F) m n n U f)) *)
move/hom_mxP=> cGfU modU; apply/mxmoduleP=> x Gx.
(* Goal: is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m n n U f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.Field.ringType F) m n n U f)) *)
by rewrite -cGfU // submxMr // (mxmoduleP modU).
Qed.
Lemma kermx_hom_module m (U : 'M_(m, n)) f :
(U <= dom_hom_mx f)%MS -> mxmodule U -> mxmodule (U :&: kermx f)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx F m n n U (dom_hom_mx f))) (_ : is_true (@mxmodule m U)), is_true (@mxmodule n (@capmx F m n n U (@kermx F n n f))) *)
move=> homUf modU; apply/mxmoduleP=> x Gx.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (@capmx F m n n U (@kermx F n n f)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@capmx F m n n U (@kermx F n n f))) *)
rewrite sub_capmx mxmodule_trans ?capmxSl //=.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (@capmx F m n n U (@kermx F n n f)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@kermx F n n f)) *)
apply/sub_kermxP; rewrite (hom_mxP _) ?(submx_trans (capmxSl _ _)) //.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@capmx F m n n U (@kermx F n n f)) f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) *)
by rewrite (sub_kermxP (capmxSr _ _)) mul0mx.
Qed.
Lemma scalar_mx_hom a m (U : 'M_(m, n)) : (U <= dom_hom_mx a%:M)%MS.
Proof.
(* Goal: is_true (@submx F m n n U (dom_hom_mx (@scalar_mx (GRing.Field.ringType F) n a))) *)
by apply/hom_mxP=> x Gx; rewrite -!mulmxA scalar_mxC.
Qed.
Lemma proj_mx_hom (U V : 'M_n) :
(U :&: V = 0)%MS -> mxmodule U -> mxmodule V ->
(U + V <= dom_hom_mx (proj_mx U V))%MS.
Proof.
(* Goal: forall (_ : @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx F n n n U V) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (_ : is_true (@mxmodule n U)) (_ : is_true (@mxmodule n V)), is_true (@submx F n n n (@addsmx F n n n U V) (dom_hom_mx (@proj_mx F n U V))) *)
move=> dxUV modU modV; apply/hom_mxP=> x Gx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@addsmx F n n n U V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@proj_mx F n U V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@addsmx F n n n U V) (@proj_mx F n U V)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
rewrite -{1}(add_proj_mx dxUV (submx_refl _)) !mulmxDl addrC.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (@addsmx F n n n U V) (@proj_mx F n V U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@proj_mx F n U V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (@addsmx F n n n U V) (@proj_mx F n U V)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@proj_mx F n U V))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@addsmx F n n n U V) (@proj_mx F n U V)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
rewrite {1}[_ *m _]proj_mx_0 ?add0r //; last first.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (@addsmx F n n n U V) (@proj_mx F n U V)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@proj_mx F n U V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@addsmx F n n n U V) (@proj_mx F n U V)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* Goal: is_true (@submx F n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (@addsmx F n n n U V) (@proj_mx F n V U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) V) *)
by rewrite mxmodule_trans ?proj_mx_sub.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (@addsmx F n n n U V) (@proj_mx F n U V)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@proj_mx F n U V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@addsmx F n n n U V) (@proj_mx F n U V)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by rewrite [_ *m _](proj_mx_id dxUV) // mxmodule_trans ?proj_mx_sub.
Qed.
Definition rfix_mx (H : {set gT}) :=
let commrH := \matrix_(i < #|H|) mxvec (rG (enum_val i) - 1%:M) in
kermx (lin1_mx (mxvec \o mulmx commrH \o lin_mul_row)).
Lemma rfix_mxP m (W : 'M_(m, n)) (H : {set gT}) :
reflect (forall x, x \in H -> W *m rG x = W) (W <= rfix_mx H)%MS.
Arguments rfix_mxP {m W}.
Lemma rfix_mx_id (H : {set gT}) x : x \in H -> rfix_mx H *m rG x = rfix_mx H.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) H))), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (rfix_mx H) *)
exact/rfix_mxP.
Qed.
Lemma rfix_mxS (H K : {set gT}) : H \subset K -> (rfix_mx K <= rfix_mx H)%MS.
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)) 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)) K))), is_true (@submx F n n n (rfix_mx K) (rfix_mx H)) *)
by move=> sHK; apply/rfix_mxP=> x Hx; apply: rfix_mxP (subsetP sHK x Hx).
Qed.
Lemma rfix_mx_conjsg (H : {set gT}) x :
x \in G -> H \subset G -> (rfix_mx (H :^ x) :=: rfix_mx H *m rG x)%MS.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base 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))))), @eqmx F n n n (rfix_mx (@conjugate gT H x)) (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
move=> Gx sHG; pose rf y := rfix_mx (H :^ y).
(* Goal: @eqmx F n n n (rfix_mx (@conjugate gT H x)) (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
suffices{x Gx} IH: {in G &, forall y z, rf y *m rG z <= rf (y * z)%g}%MS.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun y z : FinGroup.arg_sort (FinGroup.base gT) => is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG z)) (rf (@mulg (FinGroup.base gT) y z)))) (inPhantom (forall y z : FinGroup.arg_sort (FinGroup.base gT), is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG z)) (rf (@mulg (FinGroup.base gT) y z))))) *)
(* Goal: @eqmx F n n n (rfix_mx (@conjugate gT H x)) (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
apply/eqmxP; rewrite -/(rf x) -[H]conjsg1 -/(rf 1%g).
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun y z : FinGroup.arg_sort (FinGroup.base gT) => is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG z)) (rf (@mulg (FinGroup.base gT) y z)))) (inPhantom (forall y z : FinGroup.arg_sort (FinGroup.base gT), is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG z)) (rf (@mulg (FinGroup.base gT) y z))))) *)
(* Goal: is_true (andb (@submx F n n n (rf x) (@mulmx (GRing.Field.ringType F) n n n (rf (oneg (FinGroup.base gT))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf (oneg (FinGroup.base gT))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (rf x))) *)
rewrite -{4}[x] mul1g -{1}[rf x](repr_mxKV rG Gx) -{1}(mulgV x).
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun y z : FinGroup.arg_sort (FinGroup.base gT) => is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG z)) (rf (@mulg (FinGroup.base gT) y z)))) (inPhantom (forall y z : FinGroup.arg_sort (FinGroup.base gT), is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG z)) (rf (@mulg (FinGroup.base gT) y z))))) *)
(* Goal: is_true (andb (@submx F n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (rf x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@invg (FinGroup.base gT) x))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.Field.ringType F) n n n (rf (@mulg (FinGroup.base gT) x (@invg (FinGroup.base gT) x))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf (oneg (FinGroup.base gT))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (rf (@mulg (FinGroup.base gT) (oneg (FinGroup.base gT)) x)))) *)
by rewrite submxMr IH ?groupV.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun y z : FinGroup.arg_sort (FinGroup.base gT) => is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG z)) (rf (@mulg (FinGroup.base gT) y z)))) (inPhantom (forall y z : FinGroup.arg_sort (FinGroup.base gT), is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rf y) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG z)) (rf (@mulg (FinGroup.base gT) y z))))) *)
move=> x y Gx Gy; apply/rfix_mxP=> zxy; rewrite actM => /imsetP[zx Hzx ->].
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (rf x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@conjg gT zx y))) (@mulmx (GRing.Field.ringType F) n n n (rf x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) *)
have Gzx: zx \in G by apply: subsetP Hzx; rewrite conj_subG.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (rf x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@conjg gT zx y))) (@mulmx (GRing.Field.ringType F) n n n (rf x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) *)
rewrite -mulmxA -repr_mxM ?groupM ?groupV // -conjgC repr_mxM // mulmxA.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (rf x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG zx)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (@mulmx (GRing.Field.ringType F) n n n (rf x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) *)
by rewrite rfix_mx_id.
Qed.
Lemma norm_sub_rstabs_rfix_mx (H : {set gT}) :
H \subset G -> 'N_G(H) \subset rstabs (rfix_mx H).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) 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)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser 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)) (@rstabs n (rfix_mx H))))) *)
move=> sHG; apply/subsetP=> x /setIP[Gx nHx]; rewrite inE Gx.
(* Goal: is_true (andb true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (rfix_mx H))) *)
apply/rfix_mxP=> y Hy; have Gy := subsetP sHG y Hy.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
have Hyx: (y ^ x^-1)%g \in H by rewrite memJ_norm ?groupV.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
rewrite -mulmxA -repr_mxM // conjgCV repr_mxM ?(subsetP sHG _ Hyx) // mulmxA.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@conjg gT y (@invg (FinGroup.base gT) x)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.Field.ringType F) n n n (rfix_mx H) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by rewrite (rfix_mx_id Hyx).
Qed.
Lemma normal_rfix_mx_module H : H <| G -> mxmodule (rfix_mx H).
Proof.
(* Goal: forall _ : is_true (@normal gT H (@gval gT G)), is_true (@mxmodule n (rfix_mx H)) *)
case/andP=> sHG nHG.
(* Goal: is_true (@mxmodule n (rfix_mx H)) *)
by rewrite /mxmodule -{1}(setIidPl nHG) norm_sub_rstabs_rfix_mx.
Qed.
Lemma rfix_mx_module : mxmodule (rfix_mx G).
Proof.
(* Goal: is_true (@mxmodule n (rfix_mx (@gval gT G))) *)
exact: normal_rfix_mx_module.
Qed.
Lemma rfix_mx_rstabC (H : {set gT}) m (U : 'M[F]_(m, n)) :
H \subset G -> (H \subset rstab rG U) = (U <= rfix_mx H)%MS.
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)) 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 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)) 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)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m U)))) (@submx F m n n U (rfix_mx H)) *)
move=> sHG; apply/subsetP/rfix_mxP=> cHU x Hx.
(* 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)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m U)))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) m n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U *)
by rewrite (rstab_act (cHU x Hx)).
(* 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)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m U)))) *)
by rewrite !inE (subsetP sHG) //= cHU.
Qed.
Definition cyclic_mx u := <<E_G *m lin_mul_row u>>%MS.
Lemma cyclic_mxP u v :
reflect (exists2 A, A \in E_G & v = u *m A)%MS (v <= cyclic_mx u)%MS.
Proof.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (fun A : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) v (@mulmx (GRing.Field.ringType F) (S O) n n u A))) (@submx F (S O) n n v (cyclic_mx u)) *)
rewrite genmxE; apply: (iffP submxP) => [[a] | [A /submxP[a defA]]] -> {v}.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun D : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @eq (matrix (GRing.Field.sort F) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u A) (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) n D (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n u)))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (fun A : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) n a (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n u))) (@mulmx (GRing.Field.ringType F) (S O) n n u A)) *)
exists (vec_mx (a *m E_G)); last by rewrite mulmxA mul_rV_lin1.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun D : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @eq (matrix (GRing.Field.sort F) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u A) (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) n D (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n u)))) *)
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) a (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
by rewrite vec_mxK submxMl.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun D : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @eq (matrix (GRing.Field.sort F) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u A) (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) n D (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n u)))) *)
by exists a; rewrite mulmxA mul_rV_lin1 /= -defA mxvecK.
Qed.
Arguments cyclic_mxP {u v}.
Lemma cyclic_mx_id u : (u <= cyclic_mx u)%MS.
Proof.
(* Goal: is_true (@submx F (S O) n n u (cyclic_mx u)) *)
by apply/cyclic_mxP; exists 1%:M; rewrite ?mulmx1 ?envelop_mx1.
Qed.
Lemma cyclic_mx_eq0 u : (cyclic_mx u == 0) = (u == 0).
Lemma cyclic_mx_module u : mxmodule (cyclic_mx u).
Proof.
(* Goal: is_true (@mxmodule n (cyclic_mx u)) *)
apply/mxmoduleP=> x Gx; apply/row_subP=> i; rewrite row_mul.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) n n i (cyclic_mx u)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (cyclic_mx u)) *)
have [A E_A ->{i}] := @cyclic_mxP u _ (row_sub i _); rewrite -mulmxA.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u (@mulmx (GRing.Field.ringType F) n n n A (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (cyclic_mx u)) *)
by apply/cyclic_mxP; exists (A *m rG x); rewrite ?envelop_mxM ?envelop_mx_id.
Qed.
Lemma cyclic_mx_sub m u (W : 'M_(m, n)) :
mxmodule W -> (u <= W)%MS -> (cyclic_mx u <= W)%MS.
Proof.
(* Goal: forall (_ : is_true (@mxmodule m W)) (_ : is_true (@submx F (S O) m n u W)), is_true (@submx F n m n (cyclic_mx u) W) *)
move=> modU Wu; rewrite genmxE; apply/row_subP=> i.
(* Goal: is_true (@submx F (S O) m n (@row (GRing.Field.sort F) (@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)))) n i (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n u))) W) *)
by rewrite row_mul mul_rV_lin1 /= mxmodule_envelop // vec_mxK row_sub.
Qed.
Lemma hom_cyclic_mx u f :
(u <= dom_hom_mx f)%MS -> (cyclic_mx u *m f :=: cyclic_mx (u *m f))%MS.
Proof.
(* Goal: forall _ : is_true (@submx F (S O) n n u (dom_hom_mx f)), @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n (cyclic_mx u) f) (cyclic_mx (@mulmx (GRing.Field.ringType F) (S O) n n u f)) *)
move=> domf_u; apply/eqmxP; rewrite !(eqmxMr _ (genmxE _)).
(* Goal: is_true (andb (@submx F (@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)))) n n (@mulmx (GRing.Field.ringType F) (@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)))) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n u)) f) (cyclic_mx (@mulmx (GRing.Field.ringType F) (S O) n n u f))) (@submx F n (@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)))) n (cyclic_mx (@mulmx (GRing.Field.ringType F) (S O) n n u f)) (@mulmx (GRing.Field.ringType F) (@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)))) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n u)) f))) *)
apply/genmxP; rewrite genmx_id; congr <<_>>%MS; apply/row_matrixP=> i.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) n) (@row (GRing.Field.sort F) (@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)))) n i (@mulmx (GRing.Field.ringType F) (@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)))) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n u)) f)) (@row (GRing.Field.sort F) (@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)))) n i (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) (@lin_mul_row (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f)))) *)
by rewrite !row_mul !mul_rV_lin1 /= hom_envelop_mxC // vec_mxK row_sub.
Qed.
Definition annihilator_mx u := (E_G :&: kermx (lin_mul_row u))%MS.
Lemma annihilator_mxP u A :
reflect (A \in E_G /\ u *m A = 0)%MS (A \in annihilator_mx u)%MS.
Proof.
(* Goal: Bool.reflect (and (is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (@eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)))) (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (annihilator_mx u)) *)
rewrite sub_capmx; apply: (iffP andP) => [[-> /sub_kermxP]|[-> uA0]].
(* Goal: and (is_true true) (is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@kermx F (muln n n) n (@lin_mul_row (GRing.Field.comRingType F) n n u)))) *)
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) n (@mxvec (GRing.Field.sort F) n n A) (@lin_mul_row (GRing.Field.comRingType F) n n u)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)), and (is_true true) (@eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n))) *)
by rewrite mul_rV_lin1 /= mxvecK.
(* Goal: and (is_true true) (is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@kermx F (muln n n) n (@lin_mul_row (GRing.Field.comRingType F) n n u)))) *)
by split=> //; apply/sub_kermxP; rewrite mul_rV_lin1 /= mxvecK.
Qed.
Definition row_hom_mx u :=
(\bigcap_j kermx (vec_mx (row j (annihilator_mx u))))%MS.
Lemma row_hom_mxP u v :
reflect (exists2 f, u <= dom_hom_mx f & u *m f = v)%MS (v <= row_hom_mx u)%MS.
Proof.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v)) (@submx F (S O) n n v (row_hom_mx u)) *)
apply: (iffP sub_bigcapmxP) => [iso_uv | [f hom_uf <-] i _].
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
have{iso_uv} uv0 A: (A \in E_G)%MS /\ u *m A = 0 -> v *m A = 0.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: forall _ : and (is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (@eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n))), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n v A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) *)
move/annihilator_mxP=> /submxP[a defA].
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n v A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) *)
rewrite -[A]mxvecK {A}defA [a *m _]mulmx_sum_row !linear_sum big1 // => i _.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n))))) (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)))))) (@mulmx_linear (GRing.Field.comRingType F) (S O) n n v) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))) (vec_mx_linear (GRing.Field.ringType F) n n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n) a (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n) i (annihilator_mx u))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n))))) *)
by rewrite !linearZ /= (sub_kermxP _) ?scaler0 ?iso_uv.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
pose U := E_G *m lin_mul_row u; pose V := E_G *m lin_mul_row v.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
pose f := pinvmx U *m V.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
have hom_uv_f x: x \in G -> u *m rG x *m f = v *m rG x.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) f) (@mulmx (GRing.Field.ringType F) (S O) n n v (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
move=> Gx; apply/eqP; rewrite 2!mulmxA mul_rV_lin1 -subr_eq0 -mulmxBr.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) (@mulmx (GRing.Field.ringType F) (S O) n n v (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)), @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n))) (vec_mx_linear (GRing.Field.ringType F) n n) (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mulmx (GRing.Field.ringType F) (S O) n (@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)))) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@pinvmx F (@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)))) n U)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n))) *)
rewrite uv0 // 2!linearB /= vec_mxK; split.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) n) (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) n) (@Choice.Class (matrix (GRing.Field.sort F) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n u (@vec_mx (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mulmx (GRing.Field.ringType F) (S O) n (@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)))) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@pinvmx F (@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)))) n U)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)))) (@GRing.opp (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) n) (@Choice.Class (matrix (GRing.Field.sort F) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) *)
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n))) (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mulmx (GRing.Field.ringType F) (S O) n (@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)))) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@pinvmx F (@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)))) n U)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@GRing.opp (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n))) (@mxvec (GRing.Field.sort F) n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
by rewrite addmx_sub ?submxMl // eqmx_opp envelop_mx_id.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) n) (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) n) (@Choice.Class (matrix (GRing.Field.sort F) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n u (@vec_mx (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mulmx (GRing.Field.ringType F) (S O) n (@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)))) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@pinvmx F (@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)))) n U)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)))) (@GRing.opp (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) n) (@Choice.Class (matrix (GRing.Field.sort F) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) *)
have Uux: (u *m rG x <= U)%MS.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) n) (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) n) (@Choice.Class (matrix (GRing.Field.sort F) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n u (@vec_mx (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mulmx (GRing.Field.ringType F) (S O) n (@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)))) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@pinvmx F (@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)))) n U)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)))) (@GRing.opp (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) n) (@Choice.Class (matrix (GRing.Field.sort F) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) *)
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) n (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U) *)
by rewrite -(genmxE U) mxmodule_trans ?cyclic_mx_id ?cyclic_mx_module.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) n) (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) n) (@Choice.Class (matrix (GRing.Field.sort F) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n u (@vec_mx (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mulmx (GRing.Field.ringType F) (S O) n (@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)))) (@mulmx (GRing.Field.ringType F) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@pinvmx F (@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)))) n U)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)))) (@GRing.opp (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) n) (@Choice.Class (matrix (GRing.Field.sort F) (S O) n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (S O) n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S O) n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n u (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) *)
by rewrite -{2}(mulmxKpV Uux) [_ *m U]mulmxA mul_rV_lin1 subrr.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
have def_uf: u *m f = v.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v *)
by rewrite -[u]mulmx1 -[v]mulmx1 -(repr_mx1 rG) hom_uv_f.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun f : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) n n u (dom_hom_mx f))) (fun f : matrix (GRing.Field.sort F) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n u f) v) *)
by exists f => //; apply/hom_mxP=> x Gx; rewrite def_uf hom_uv_f.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) (@kermx F n n (@vec_mx (Choice.sort (GRing.Field.choiceType F)) n n (@row (Choice.sort (GRing.Field.choiceType F)) (muln n n) (muln n n) i (annihilator_mx u))))) *)
apply/sub_kermxP; set A := vec_mx _.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) *)
have: (A \in annihilator_mx u)%MS by rewrite vec_mxK row_sub.
(* Goal: forall _ : is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (Choice.sort (GRing.Field.choiceType F)) n n A) (annihilator_mx u)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n (@mulmx (GRing.Field.ringType F) (S O) n n u f) A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) *)
by case/annihilator_mxP => E_A uA0; rewrite -hom_envelop_mxC // uA0 mul0mx.
Qed.
Variant mx_iso (U V : 'M_n) : Prop :=
MxIso f of f \in unitmx & (U <= dom_hom_mx f)%MS & (U *m f :=: V)%MS.
Lemma eqmx_iso U V : (U :=: V)%MS -> mx_iso U V.
Proof.
(* Goal: forall _ : @eqmx F n n n U V, mx_iso U V *)
by move=> eqUV; exists 1%:M; rewrite ?unitmx1 ?scalar_mx_hom ?mulmx1.
Qed.
Lemma mx_iso_refl U : mx_iso U U.
Proof.
(* Goal: mx_iso U U *)
exact: eqmx_iso.
Qed.
Lemma mx_iso_sym U V : mx_iso U V -> mx_iso V U.
Proof.
(* Goal: forall _ : mx_iso U V, mx_iso V U *)
case=> f injf homUf defV; exists (invmx f); first by rewrite unitmx_inv.
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n V (@invmx (GRing.Field.comUnitRingType F) n f)) U *)
(* Goal: is_true (@submx F n n n V (dom_hom_mx (@invmx (GRing.Field.comUnitRingType F) n f))) *)
by rewrite dom_hom_invmx // -defV submxMr.
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n V (@invmx (GRing.Field.comUnitRingType F) n f)) U *)
by rewrite -[U](mulmxK injf); apply: eqmxMr (eqmx_sym _).
Qed.
Lemma mx_iso_trans U V W : mx_iso U V -> mx_iso V W -> mx_iso U W.
Proof.
(* Goal: forall (_ : mx_iso U V) (_ : mx_iso V W), mx_iso U W *)
case=> f injf homUf defV [g injg homVg defW].
(* Goal: mx_iso U W *)
exists (f *m g); first by rewrite unitmx_mul injf.
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n f g)) W *)
(* Goal: is_true (@submx F n n n U (dom_hom_mx (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n f g))) *)
by apply/hom_mxP=> x Gx; rewrite !mulmxA 2?(hom_mxP _) ?defV.
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n f g)) W *)
by rewrite mulmxA; apply: eqmx_trans (eqmxMr g defV) defW.
Qed.
Lemma mxrank_iso U V : mx_iso U V -> \rank U = \rank V.
Proof.
(* Goal: forall _ : mx_iso U V, @eq nat (@mxrank F n n U) (@mxrank F n n V) *)
by case=> f injf _ <-; rewrite mxrankMfree ?row_free_unit.
Qed.
Lemma mx_iso_module U V : mx_iso U V -> mxmodule U -> mxmodule V.
Proof.
(* Goal: forall (_ : mx_iso U V) (_ : is_true (@mxmodule n U)), is_true (@mxmodule n V) *)
by case=> f _ homUf defV; rewrite -(eqmx_module defV); apply: hom_mxmodule.
Qed.
Definition mxsimple (V : 'M_n) :=
[/\ mxmodule V, V != 0 &
forall U : 'M_n, mxmodule U -> (U <= V)%MS -> U != 0 -> (V <= U)%MS].
Definition mxnonsimple (U : 'M_n) :=
exists V : 'M_n, [&& mxmodule V, (V <= U)%MS, V != 0 & \rank V < \rank U].
Lemma mxsimpleP U :
[/\ mxmodule U, U != 0 & ~ mxnonsimple U] <-> mxsimple U.
Proof.
(* Goal: iff (and3 (is_true (@mxmodule n U)) (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) (not (mxnonsimple U))) (mxsimple U) *)
do [split => [] [modU nzU simU]; split] => // [V modV sVU nzV | [V]].
(* Goal: forall _ : is_true (andb (@mxmodule n V) (andb (@submx F n n n V U) (andb (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) V (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))) (leq (S (@mxrank F n n V)) (@mxrank F n n U))))), False *)
(* Goal: is_true (@submx F n n n U V) *)
apply/idPn; rewrite -(ltn_leqif (mxrank_leqif_sup sVU)) => ltVU.
(* Goal: forall _ : is_true (andb (@mxmodule n V) (andb (@submx F n n n V U) (andb (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) V (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))) (leq (S (@mxrank F n n V)) (@mxrank F n n U))))), False *)
(* Goal: False *)
by case: simU; exists V; apply/and4P.
(* Goal: forall _ : is_true (andb (@mxmodule n V) (andb (@submx F n n n V U) (andb (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) V (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))) (leq (S (@mxrank F n n V)) (@mxrank F n n U))))), False *)
by case/and4P=> modV sVU nzV; apply/negP; rewrite -leqNgt mxrankS ?simU.
Qed.
Lemma mxsimple_module U : mxsimple U -> mxmodule U.
Proof.
(* Goal: forall _ : mxsimple U, is_true (@mxmodule n U) *)
by case.
Qed.
Lemma mxsimple_exists m (U : 'M_(m, n)) :
mxmodule U -> U != 0 -> classically (exists2 V, mxsimple V & V <= U)%MS.
Proof.
(* Goal: forall (_ : is_true (@mxmodule m U)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n))))), classically (@ex2 (matrix (GRing.Field.sort F) n n) (fun V : matrix (GRing.Field.sort F) n n => mxsimple V) (fun V : matrix (GRing.Field.sort F) n n => is_true (@submx F n m n V U))) *)
move=> modU nzU [] // simU; move: {2}_.+1 (ltnSn (\rank U)) => r leUr.
(* Goal: is_true false *)
elim: r => // r IHr in m U leUr modU nzU simU.
(* Goal: is_true false *)
have genU := genmxE U; apply simU; exists <<U>>%MS; last by rewrite genU.
(* Goal: mxsimple (@genmx F m n U) *)
apply/mxsimpleP; split; rewrite ?(eqmx_eq0 genU) ?(eqmx_module genU) //.
(* Goal: not (mxnonsimple (@genmx F m n U)) *)
case=> V; rewrite !genU=> /and4P[modV sVU nzV ltVU]; case: notF.
(* Goal: is_true false *)
apply: IHr nzV _ => // [|[W simW sWV]]; first exact: leq_trans ltVU _.
(* Goal: is_true false *)
by apply: simU; exists W => //; apply: submx_trans sWV sVU.
Qed.
Lemma mx_iso_simple U V : mx_iso U V -> mxsimple U -> mxsimple V.
Proof.
(* Goal: forall (_ : mx_iso U V) (_ : mxsimple U), mxsimple V *)
move=> isoUV [modU nzU simU]; have [f injf homUf defV] := isoUV.
(* Goal: mxsimple V *)
split=> [||W modW sWV nzW]; first by rewrite (mx_iso_module isoUV).
(* Goal: is_true (@submx F n n n V W) *)
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) V (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))) *)
by rewrite -(eqmx_eq0 defV) -(mul0mx n f) (can_eq (mulmxK injf)).
(* Goal: is_true (@submx F n n n V W) *)
rewrite -defV -[W](mulmxKV injf) submxMr //; set W' := W *m _.
(* Goal: is_true (@submx F n n n U W') *)
have sW'U: (W' <= U)%MS by rewrite -[U](mulmxK injf) submxMr ?defV.
(* Goal: is_true (@submx F n n n U W') *)
rewrite (simU W') //; last by rewrite -(can_eq (mulmxK injf)) mul0mx mulmxKV.
(* Goal: is_true (@mxmodule n W') *)
rewrite hom_mxmodule ?dom_hom_invmx // -[W](mulmxKV injf) submxMr //.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n W (@invmx (GRing.Field.comUnitRingType F) n f)) (dom_hom_mx f)) *)
exact: submx_trans sW'U homUf.
Qed.
Lemma mxsimple_cyclic u U :
mxsimple U -> u != 0 -> (u <= U)%MS -> (U :=: cyclic_mx u)%MS.
Proof.
(* Goal: forall (_ : mxsimple U) (_ : is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) (S O) n)) u (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) n))))) (_ : is_true (@submx F (S O) n n u U)), @eqmx F n n n U (cyclic_mx u) *)
case=> [modU _ simU] nz_u Uu; apply/eqmxP; set uG := cyclic_mx u.
(* Goal: is_true (andb (@submx F n n n U uG) (@submx F n n n uG U)) *)
have s_uG_U: (uG <= U)%MS by rewrite cyclic_mx_sub.
(* Goal: is_true (andb (@submx F n n n U uG) (@submx F n n n uG U)) *)
by rewrite simU ?cyclic_mx_eq0 ?submx_refl // cyclic_mx_module.
Qed.
Lemma mx_Schur_onto m (U : 'M_(m, n)) V f :
mxmodule U -> mxsimple V -> (U <= dom_hom_mx f)%MS ->
(U *m f <= V)%MS -> U *m f != 0 -> (U *m f :=: V)%MS.
Proof.
(* Goal: forall (_ : is_true (@mxmodule m U)) (_ : mxsimple V) (_ : is_true (@submx F m n n U (dom_hom_mx f))) (_ : is_true (@submx F m n n (@mulmx (GRing.Field.ringType F) m n n U f) V)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n U f) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n))))), @eqmx F m n n (@mulmx (GRing.Field.ringType F) m n n U f) V *)
move=> modU [modV _ simV] homUf sUfV nzUf.
(* Goal: @eqmx F m n n (@mulmx (GRing.Field.ringType F) m n n U f) V *)
apply/eqmxP; rewrite sUfV -(genmxE (U *m f)).
(* Goal: is_true (andb true (@submx F n n n V (@genmx F m n (@mulmx (GRing.Field.ringType F) m n n U f)))) *)
rewrite simV ?(eqmx_eq0 (genmxE _)) ?genmxE //.
(* Goal: is_true (@mxmodule n (@genmx F m n (@mulmx (GRing.Field.ringType F) m n n U f))) *)
by rewrite (eqmx_module (genmxE _)) hom_mxmodule.
Qed.
Lemma mx_Schur_inj U f :
mxsimple U -> (U <= dom_hom_mx f)%MS -> U *m f != 0 -> (U :&: kermx f)%MS = 0.
Proof.
(* Goal: forall (_ : mxsimple U) (_ : is_true (@submx F n n n U (dom_hom_mx f))) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n U f) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))))), @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx F n n n U (@kermx F n n f)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
case=> [modU _ simU] homUf nzUf; apply/eqP; apply: contraR nzUf => nz_ker.
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n U f) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))) *)
rewrite (sameP eqP sub_kermxP) (sameP capmx_idPl eqmxP) simU ?capmxSl //.
(* Goal: is_true (@mxmodule n (@capmx F n n n U (@kermx F n n f))) *)
exact: kermx_hom_module.
Qed.
Lemma mx_Schur_inj_iso U f :
mxsimple U -> (U <= dom_hom_mx f)%MS -> U *m f != 0 -> mx_iso U (U *m f).
Proof.
(* Goal: forall (_ : mxsimple U) (_ : is_true (@submx F n n n U (dom_hom_mx f))) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n U f) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))))), mx_iso U (@mulmx (GRing.Field.ringType F) n n n U f) *)
move=> simU homUf nzUf; have [modU _ _] := simU.
(* Goal: mx_iso U (@mulmx (GRing.Field.ringType F) n n n U f) *)
have eqUfU: \rank (U *m f) = \rank U by apply/mxrank_injP; rewrite mx_Schur_inj.
(* Goal: mx_iso U (@mulmx (GRing.Field.ringType F) n n n U f) *)
have{eqUfU} [g invg defUf] := complete_unitmx eqUfU.
(* Goal: mx_iso U (@mulmx (GRing.Field.ringType F) n n n U f) *)
suffices homUg: (U <= dom_hom_mx g)%MS by exists g; rewrite ?defUf.
(* Goal: is_true (@submx F n n n U (dom_hom_mx g)) *)
apply/hom_mxP=> x Gx; have [ux defUx] := submxP (mxmoduleP modU x Gx).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) g) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U g) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by rewrite -defUf -(hom_mxP homUf) // defUx -!(mulmxA ux) defUf.
Qed.
Lemma mx_Schur_iso U V f :
mxsimple U -> mxsimple V -> (U <= dom_hom_mx f)%MS ->
(U *m f <= V)%MS -> U *m f != 0 -> mx_iso U V.
Lemma nz_row_mxsimple U : mxsimple U -> nz_row U != 0.
Proof.
(* Goal: forall _ : mxsimple U, is_true (negb (@eq_op (matrix_eqType (GRing.Zmodule.eqType (GRing.Field.zmodType F)) (S O) n) (@nz_row (GRing.Field.zmodType F) n n U) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) n)))) *)
by case=> _ nzU _; rewrite nz_row_eq0.
Qed.
Definition mxsimple_iso (U V : 'M_n) :=
[&& mxmodule V, (V :&: row_hom_mx (nz_row U))%MS != 0 & \rank V <= \rank U].
Lemma mxsimple_isoP U V :
mxsimple U -> reflect (mx_iso U V) (mxsimple_iso U V).
Lemma mxsimple_iso_simple U V :
mxsimple_iso U V -> mxsimple U -> mxsimple V.
Proof.
(* Goal: forall (_ : is_true (mxsimple_iso U V)) (_ : mxsimple U), mxsimple V *)
by move=> isoUV simU; apply: mx_iso_simple (simU); apply/mxsimple_isoP.
Qed.
Implicit Type I : finType.
Variant mxsemisimple (V : 'M_n) :=
MxSemisimple I U (W := (\sum_(i : I) U i)%MS) of
forall i, mxsimple (U i) & (W :=: V)%MS & mxdirect W.
Lemma sum_mxsimple_direct_compl m I W (U : 'M_(m, n)) :
let V := (\sum_(i : I) W i)%MS in
(forall i : I, mxsimple (W i)) -> mxmodule U -> (U <= V)%MS ->
{J : {set I} | let S := U + \sum_(i in J) W i in S :=: V /\ mxdirect S}%MS.
Proof.
(* Goal: let V := @BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) true (W i)) in forall (_ : forall i : Finite.sort I, mxsimple (W i)) (_ : is_true (@mxmodule m U)) (_ : is_true (@submx F m n n U V)), @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) S)))) *)
move=> V simW modU sUV; pose V_ (J : {set I}) := (\sum_(i in J) W i)%MS.
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) S)))) *)
pose dxU (J : {set I}) := mxdirect (U + V_ J).
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) S)))) *)
have [J maxJ]: {J | maxset dxU J}; last case/maxsetP: maxJ => dxUVJ maxJ.
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) S)))) *)
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => is_true (@maxset I dxU J)) *)
apply: ex_maxset; exists set0.
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) S)))) *)
(* Goal: is_true (dxU (@set0 I)) *)
by rewrite /dxU mxdirectE /V_ /= !big_set0 addn0 addsmx0 /=.
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) S)))) *)
have modWJ: mxmodule (V_ J) by apply: sumsmx_module => i _; case: (simW i).
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) S)))) *)
exists J; split=> //; apply/eqmxP; rewrite addsmx_sub sUV; apply/andP; split.
(* Goal: is_true (@submx F n n n V (@addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))))) *)
(* Goal: is_true (andb true (@submx F n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) V)) *)
by apply/sumsmx_subP=> i Ji; rewrite (sumsmx_sup i).
(* Goal: is_true (@submx F n n n V (@addsmx F m n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))))) *)
rewrite -/(V_ J); apply/sumsmx_subP=> i _.
(* Goal: is_true (@submx F n n n (W i) (@addsmx F m n n U (V_ J))) *)
case Ji: (i \in J).
(* Goal: is_true (@submx F n n n (W i) (@addsmx F m n n U (V_ J))) *)
(* Goal: is_true (@submx F n n n (W i) (@addsmx F m n n U (V_ J))) *)
by apply: submx_trans (addsmxSr _ _); apply: (sumsmx_sup i).
(* Goal: is_true (@submx F n n n (W i) (@addsmx F m n n U (V_ J))) *)
have [modWi nzWi simWi] := simW i.
(* Goal: is_true (@submx F n n n (W i) (@addsmx F m n n U (V_ J))) *)
rewrite (sameP capmx_idPl eqmxP) simWi ?capmxSl ?capmx_module ?addsmx_module //.
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@capmx F n n n (W i) (@addsmx F m n n U (V_ J))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))) *)
apply: contraFT (Ji); rewrite negbK => dxWiUVJ.
(* Goal: is_true (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) *)
rewrite -(maxJ (i |: J)) ?setU11 ?subsetUr // /dxU.
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i0 : Finite.sort I => @in_mem (Finite.sort I) i0 (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I (@setU I (@set1 I i) J)))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F m n n U (V_ (@setU I (@set1 I i) J))))) *)
rewrite mxdirectE /= !big_setU1 ?Ji //=.
(* Goal: is_true (@eq_op nat_eqType (@mxrank F n n (@addsmx F m n n U (@addsmx F n n n (W i) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) (addn (@mxrank F m n U) (addn (@mxrank F n n (W i)) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (@mxrank F n n (W i))))))) *)
rewrite addnCA addsmxA (addsmxC U) -addsmxA -mxdirectE /=.
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F n n n (@trivial_mxsum F n n (W i)) (@sum_mxsum F n (@binary_mxsum_expr F m n n (@trivial_mxsum F m n U) (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))))))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F n n n (W i) (@addsmx F m n n U (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx F n n n) (@in_mem (Finite.sort I) j (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W j))))))) *)
by rewrite mxdirect_addsE /= mxdirect_trivial -/(dxU _) dxUVJ.
Qed.
Lemma sum_mxsimple_direct_sub I W (V : 'M_n) :
(forall i : I, mxsimple (W i)) -> (\sum_i W i :=: V)%MS ->
{J : {set I} | let S := \sum_(i in J) W i in S :=: V /\ mxdirect S}%MS.
Proof.
(* Goal: forall (_ : forall i : Finite.sort I, mxsimple (W i)) (_ : @eqmx F n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) true (W i))) V), @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) S)))) *)
move=> simW defV.
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) S)))) *)
have [|J [defS dxS]] := sum_mxsimple_direct_compl simW (mxmodule0 n).
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) S)))) *)
(* Goal: is_true (@submx F n n n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) true (W i)))) *)
exact: sub0mx.
(* Goal: @sig (@set_of I (Phant (Finite.sort I))) (fun J : @set_of I (Phant (Finite.sort I)) => let S := @BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)) in and (@eqmx F n n n S V) (is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) (fun i : Finite.sort I => @in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) n (fun i : Finite.sort I => @trivial_mxsum F n n (W i)))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) S)))) *)
exists J; split; last by rewrite mxdirectE /= adds0mx mxrank0 in dxS.
(* Goal: @eqmx F n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i))) V *)
by apply: eqmx_trans defV; rewrite adds0mx_id in defS.
Qed.
Lemma mxsemisimple0 : mxsemisimple 0.
Proof.
(* Goal: mxsemisimple (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
exists [finType of 'I_0] (fun _ => 0); [by case | by rewrite big_ord0 | ].
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort (@Finite.clone (ordinal O) (ordinal_finType O) (Finite.class (ordinal_finType O)) (fun x : phantom (Finite.class_of (Finite.sort (ordinal_finType O))) (Finite.class (ordinal_finType O)) => x))) (index_enum (@Finite.clone (ordinal O) (ordinal_finType O) (Finite.class (ordinal_finType O)) (fun x : phantom (Finite.class_of (Finite.sort (ordinal_finType O))) (Finite.class (ordinal_finType O)) => x))) (fun _ : Finite.sort (@Finite.clone (ordinal O) (ordinal_finType O) (Finite.class (ordinal_finType O)) (fun x : phantom (Finite.class_of (Finite.sort (ordinal_finType O))) (Finite.class (ordinal_finType O)) => x)) => true) n (fun _ : Finite.sort (@Finite.clone (ordinal O) (ordinal_finType O) (Finite.class (ordinal_finType O)) (fun x : phantom (Finite.class_of (Finite.sort (ordinal_finType O))) (Finite.class (ordinal_finType O)) => x)) => @trivial_mxsum F n n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (@Finite.clone (ordinal O) (ordinal_finType O) (Finite.class (ordinal_finType O)) (fun x : phantom (Finite.class_of (Finite.sort (ordinal_finType O))) (Finite.class (ordinal_finType O)) => x))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (@Finite.clone (ordinal O) (ordinal_finType O) (Finite.class (ordinal_finType O)) (fun x : phantom (Finite.class_of (Finite.sort (ordinal_finType O))) (Finite.class (ordinal_finType O)) => x))) (fun i : Finite.sort (@Finite.clone (ordinal O) (ordinal_finType O) (Finite.class (ordinal_finType O)) (fun x : phantom (Finite.class_of (Finite.sort (ordinal_finType O))) (Finite.class (ordinal_finType O)) => x)) => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort (@Finite.clone (ordinal O) (ordinal_finType O) (Finite.class (ordinal_finType O)) (fun x : phantom (Finite.class_of (Finite.sort (ordinal_finType O))) (Finite.class (ordinal_finType O)) => x))) i (@addsmx F n n n) true (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))))) *)
by rewrite mxdirectE /= !big_ord0 mxrank0.
Qed.
Lemma intro_mxsemisimple (I : Type) r (P : pred I) W V :
(\sum_(i <- r | P i) W i :=: V)%MS ->
(forall i, P i -> W i != 0 -> mxsimple (W i)) ->
mxsemisimple V.
Lemma mxsimple_semisimple U : mxsimple U -> mxsemisimple U.
Lemma addsmx_semisimple U V :
mxsemisimple U -> mxsemisimple V -> mxsemisimple (U + V)%MS.
Proof.
(* Goal: forall (_ : mxsemisimple U) (_ : mxsemisimple V), mxsemisimple (@addsmx F n n n U V) *)
case=> [I W /= simW defU _] [J T /= simT defV _].
(* Goal: mxsemisimple (@addsmx F n n n U V) *)
have defUV: (\sum_ij sum_rect (fun _ => 'M_n) W T ij :=: U + V)%MS.
(* Goal: mxsemisimple (@addsmx F n n n U V) *)
(* Goal: @eqmx F n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (sum_finType I J)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (sum_finType I J)) (fun ij : Finite.sort (sum_finType I J) => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort (sum_finType I J)) ij (@addsmx F n n n) true (@sum_rect (Finite.sort I) (Finite.sort J) (fun _ : sum (Finite.sort I) (Finite.sort J) => matrix (GRing.Field.sort F) n n) W T ij))) (@addsmx F n n n U V) *)
by rewrite big_sumType /=; apply: adds_eqmx.
(* Goal: mxsemisimple (@addsmx F n n n U V) *)
by apply: intro_mxsemisimple defUV _; case=> /=.
Qed.
Lemma sumsmx_semisimple (I : finType) (P : pred I) V :
(forall i, P i -> mxsemisimple (V i)) -> mxsemisimple (\sum_(i | P i) V i)%MS.
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), mxsemisimple (V i), mxsemisimple (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (P i) (V i))) *)
move=> ssimV; elim/big_ind: _ => //; first exact: mxsemisimple0.
(* Goal: forall (x y : GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (_ : mxsemisimple x) (_ : mxsemisimple y), mxsemisimple (@addsmx F n n n x y) *)
exact: addsmx_semisimple.
Qed.
Lemma eqmx_semisimple U V : (U :=: V)%MS -> mxsemisimple U -> mxsemisimple V.
Proof.
(* Goal: forall (_ : @eqmx F n n n U V) (_ : mxsemisimple U), mxsemisimple V *)
by move=> eqUV [I W S simW defU dxS]; exists I W => //; apply: eqmx_trans eqUV.
Qed.
Lemma hom_mxsemisimple (V f : 'M_n) :
mxsemisimple V -> (V <= dom_hom_mx f)%MS -> mxsemisimple (V *m f).
Proof.
(* Goal: forall (_ : mxsemisimple V) (_ : is_true (@submx F n n n V (dom_hom_mx f))), mxsemisimple (@mulmx (GRing.Field.ringType F) n n n V f) *)
case=> I W /= simW defV _; rewrite -defV => /sumsmx_subP homWf.
(* Goal: mxsemisimple (@mulmx (GRing.Field.ringType F) n n n V f) *)
have{defV} defVf: (\sum_i W i *m f :=: V *m f)%MS.
(* Goal: mxsemisimple (@mulmx (GRing.Field.ringType F) n n n V f) *)
(* Goal: @eqmx F n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) true (@mulmx (GRing.Field.ringType F) n n n (W i) f))) (@mulmx (GRing.Field.ringType F) n n n V f) *)
by apply: eqmx_trans (eqmx_sym _) (eqmxMr f defV); apply: sumsmxMr.
(* Goal: mxsemisimple (@mulmx (GRing.Field.ringType F) n n n V f) *)
apply: (intro_mxsemisimple defVf) => i _ nzWf.
(* Goal: mxsimple (@mulmx (GRing.Field.ringType F) n n n (W i) f) *)
by apply: mx_iso_simple (simW i); apply: mx_Schur_inj_iso; rewrite ?homWf.
Qed.
Lemma mxsemisimple_module U : mxsemisimple U -> mxmodule U.
Proof.
(* Goal: forall _ : mxsemisimple U, is_true (@mxmodule n U) *)
case=> I W /= simW defU _.
(* Goal: is_true (@mxmodule n U) *)
by rewrite -(eqmx_module defU) sumsmx_module // => i _; case: (simW i).
Qed.
Variant mxsplits (V U : 'M_n) :=
MxSplits (W : 'M_n) of mxmodule W & (U + W :=: V)%MS & mxdirect (U + W).
Definition mx_completely_reducible V :=
forall U, mxmodule U -> (U <= V)%MS -> mxsplits V U.
Lemma mx_reducibleS U V :
mxmodule U -> (U <= V)%MS ->
mx_completely_reducible V -> mx_completely_reducible U.
Proof.
(* Goal: forall (_ : is_true (@mxmodule n U)) (_ : is_true (@submx F n n n U V)) (_ : mx_completely_reducible V), mx_completely_reducible U *)
move=> modU sUV redV U1 modU1 sU1U.
(* Goal: mxsplits U U1 *)
have [W modW defV dxU1W] := redV U1 modU1 (submx_trans sU1U sUV).
(* Goal: mxsplits U U1 *)
exists (W :&: U)%MS; first exact: capmx_module.
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F n n n (@trivial_mxsum F n n U1) (@trivial_mxsum F n n (@capmx F n n n W U)))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F n n n U1 (@capmx F n n n W U)))) *)
(* Goal: @eqmx F n n n (@addsmx F n n n U1 (@capmx F n n n W U)) U *)
by apply/eqmxP; rewrite !matrix_modl // capmxSr sub_capmx defV sUV /=.
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F n n n (@trivial_mxsum F n n U1) (@trivial_mxsum F n n (@capmx F n n n W U)))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F n n n U1 (@capmx F n n n W U)))) *)
by apply/mxdirect_addsP; rewrite capmxA (mxdirect_addsP dxU1W) cap0mx.
Qed.
Lemma mx_Maschke : [char F]^'.-group G -> mx_completely_reducible 1%:M.
Lemma mxsemisimple_reducible V : mxsemisimple V -> mx_completely_reducible V.
Proof.
(* Goal: forall _ : mxsemisimple V, mx_completely_reducible V *)
case=> [I W /= simW defV _] U modU sUV; rewrite -defV in sUV.
(* Goal: mxsplits V U *)
have [J [defV' dxV]] := sum_mxsimple_direct_compl simW modU sUV.
(* Goal: mxsplits V U *)
exists (\sum_(i in J) W i)%MS.
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F n n n (@trivial_mxsum F n n U) (@trivial_mxsum F n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) *)
(* Goal: @eqmx F n n n (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))) V *)
(* Goal: is_true (@mxmodule n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))) *)
-
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F n n n (@trivial_mxsum F n n U) (@trivial_mxsum F n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) *)
(* Goal: @eqmx F n n n (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))) V *)
(* Goal: is_true (@mxmodule n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))) *)
by apply: sumsmx_module => i _; case: (simW i).
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F n n n (@trivial_mxsum F n n U) (@trivial_mxsum F n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) *)
(* Goal: @eqmx F n n n (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))) V *)
-
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F n n n (@trivial_mxsum F n n U) (@trivial_mxsum F n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) *)
(* Goal: @eqmx F n n n (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))) V *)
exact: eqmx_trans defV' defV.
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@binary_mxsum_expr F n n n (@trivial_mxsum F n n U) (@trivial_mxsum F n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx F n n n U (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) (@SetDef.pred_of_set I J))) (W i)))))) *)
by rewrite mxdirect_addsE (sameP eqP mxdirect_addsP) /= in dxV; case/and3P: dxV.
Qed.
Lemma mx_reducible_semisimple V :
mxmodule V -> mx_completely_reducible V -> classically (mxsemisimple V).
Proof.
(* Goal: forall (_ : is_true (@mxmodule n V)) (_ : mx_completely_reducible V), classically (mxsemisimple V) *)
move=> modV redV [] // nssimV; move: {-1}_.+1 (ltnSn (\rank V)) => r leVr.
(* Goal: is_true false *)
elim: r => // r IHr in V leVr modV redV nssimV.
(* Goal: is_true false *)
have [V0 | nzV] := eqVneq V 0.
(* Goal: is_true false *)
(* Goal: is_true false *)
by rewrite nssimV ?V0 //; apply: mxsemisimple0.
(* Goal: is_true false *)
apply (mxsimple_exists modV nzV) => [[U simU sUV]]; have [modU nzU _] := simU.
(* Goal: is_true false *)
have [W modW defUW dxUW] := redV U modU sUV.
(* Goal: is_true false *)
have sWV: (W <= V)%MS by rewrite -defUW addsmxSr.
(* Goal: is_true false *)
apply: IHr (mx_reducibleS modW sWV redV) _ => // [|ssimW].
(* Goal: is_true false *)
(* Goal: is_true (leq (S (@mxrank F n n W)) r) *)
rewrite ltnS -defUW (mxdirectP dxUW) /= in leVr; apply: leq_trans leVr.
(* Goal: is_true false *)
(* Goal: is_true (leq (S (@mxrank F n n W)) (addn (@mxrank F n n U) (@mxrank F n n W))) *)
by rewrite -add1n leq_add2r lt0n mxrank_eq0.
(* Goal: is_true false *)
apply: nssimV (eqmx_semisimple defUW (addsmx_semisimple _ ssimW)).
(* Goal: mxsemisimple U *)
exact: mxsimple_semisimple.
Qed.
Lemma mxsemisimpleS U V :
mxmodule U -> (U <= V)%MS -> mxsemisimple V -> mxsemisimple U.
Proof.
(* Goal: forall (_ : is_true (@mxmodule n U)) (_ : is_true (@submx F n n n U V)) (_ : mxsemisimple V), mxsemisimple U *)
move=> modU sUV ssimV.
(* Goal: mxsemisimple U *)
have [W modW defUW dxUW]:= mxsemisimple_reducible ssimV modU sUV.
(* Goal: mxsemisimple U *)
move/mxdirect_addsP: dxUW => dxUW.
(* Goal: mxsemisimple U *)
have defU : (V *m proj_mx U W :=: U)%MS.
(* Goal: mxsemisimple U *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n V (@proj_mx F n U W)) U *)
by apply/eqmxP; rewrite proj_mx_sub -{1}[U](proj_mx_id dxUW) ?submxMr.
(* Goal: mxsemisimple U *)
apply: eqmx_semisimple defU _; apply: hom_mxsemisimple ssimV _.
(* Goal: is_true (@submx F n n n V (dom_hom_mx (@proj_mx F n U W))) *)
by rewrite -defUW proj_mx_hom.
Qed.
Lemma hom_mxsemisimple_iso I P U W f :
let V := (\sum_(i : I | P i) W i)%MS in
mxsimple U -> (forall i, P i -> W i != 0 -> mxsimple (W i)) ->
(V <= dom_hom_mx f)%MS -> (U <= V *m f)%MS ->
{i | P i & mx_iso (W i) U}.
Definition component_mx_expr (U : 'M[F]_n) :=
(\sum_i cyclic_mx (row i (row_hom_mx (nz_row U))))%MS.
Definition component_mx := locked_with component_mx_key component_mx_expr.
Canonical component_mx_unfoldable := [unlockable fun component_mx].
Variable U : 'M[F]_n.
Hypothesis simU : mxsimple U.
Let u := nz_row U.
Let iso_u := row_hom_mx u.
Let nz_u : u != 0 := nz_row_mxsimple simU.
Let Uu : (u <= U)%MS := nz_row_sub U.
Let defU : (U :=: cyclic_mx u)%MS := mxsimple_cyclic simU nz_u Uu.
Local Notation compU := (component_mx U).
Lemma component_mx_module : mxmodule compU.
Proof.
(* Goal: is_true (@mxmodule n (component_mx U)) *)
by rewrite unlock sumsmx_module // => i; rewrite cyclic_mx_module.
Qed.
Lemma genmx_component : <<compU>>%MS = compU.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx F n n (component_mx U)) (component_mx U) *)
by rewrite [in compU]unlock genmx_sums; apply: eq_bigr => i; rewrite genmx_id.
Qed.
Lemma component_mx_def : {I : finType & {W : I -> 'M_n |
forall i, mx_iso U (W i) & compU = \sum_i W i}}%MS.
Lemma component_mx_semisimple : mxsemisimple compU.
Proof.
(* Goal: mxsemisimple (component_mx U) *)
have [I [W isoUW ->]] := component_mx_def.
(* Goal: mxsemisimple (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) true (W i))) *)
apply: intro_mxsemisimple (eqmx_refl _) _ => i _ _.
(* Goal: mxsimple (W i) *)
exact: mx_iso_simple (isoUW i) simU.
Qed.
Lemma mx_iso_component V : mx_iso U V -> (V <= compU)%MS.
Lemma component_mx_id : (U <= compU)%MS.
Proof.
(* Goal: is_true (@submx F n n n U (component_mx U)) *)
exact: mx_iso_component (mx_iso_refl U).
Qed.
Lemma hom_component_mx_iso f V :
mxsimple V -> (compU <= dom_hom_mx f)%MS -> (V <= compU *m f)%MS ->
mx_iso U V.
Proof.
(* Goal: forall (_ : mxsimple V) (_ : is_true (@submx F n n n (component_mx U) (dom_hom_mx f))) (_ : is_true (@submx F n n n V (@mulmx (GRing.Field.ringType F) n n n (component_mx U) f))), mx_iso U V *)
have [I [W isoUW ->]] := component_mx_def => simV homWf sVWf.
(* Goal: mx_iso U V *)
have [i _ _|i _ ] := hom_mxsemisimple_iso simV _ homWf sVWf.
(* Goal: forall _ : mx_iso (W i) V, mx_iso U V *)
(* Goal: mxsimple (W i) *)
exact: mx_iso_simple (simU).
(* Goal: forall _ : mx_iso (W i) V, mx_iso U V *)
exact: mx_iso_trans.
Qed.
Lemma component_mx_iso V : mxsimple V -> (V <= compU)%MS -> mx_iso U V.
Proof.
(* Goal: forall (_ : mxsimple V) (_ : is_true (@submx F n n n V (component_mx U))), mx_iso U V *)
move=> simV; rewrite -[compU]mulmx1.
(* Goal: forall _ : is_true (@submx F n n n V (@mulmx (GRing.Field.ringType F) n n n (component_mx U) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))), mx_iso U V *)
exact: hom_component_mx_iso (scalar_mx_hom _ _).
Qed.
Lemma hom_component_mx f :
(compU <= dom_hom_mx f)%MS -> (compU *m f <= compU)%MS.
End Components.
Lemma component_mx_isoP U V :
mxsimple U -> mxsimple V ->
reflect (mx_iso U V) (component_mx U == component_mx V).
Lemma component_mx_disjoint U V :
mxsimple U -> mxsimple V -> component_mx U != component_mx V ->
(component_mx U :&: component_mx V = 0)%MS.
Section Socle.
Record socleType := EnumSocle {
socle_base_enum : seq 'M[F]_n;
_ : forall M, M \in socle_base_enum -> mxsimple M;
_ : forall M, mxsimple M -> has (mxsimple_iso M) socle_base_enum
}.
Lemma socle_exists : classically socleType.
Section SocleDef.
Variable sG0 : socleType.
Definition socle_enum := map component_mx (socle_base_enum sG0).
Lemma component_socle M : mxsimple M -> component_mx M \in socle_enum.
Proof.
(* Goal: forall _ : mxsimple M, is_true (@in_mem (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (component_mx M) (@mem (Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) (seq_predType (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) socle_enum)) *)
rewrite /socle_enum; case: sG0 => e0 /= sim_e mem_e simM.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) n n) (component_mx M) (@mem (matrix (GRing.Field.sort F) n n) (seq_predType (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) (@map (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) component_mx e0))) *)
have /hasP[M' e0M' isoMM'] := mem_e M simM; apply/mapP; exists M' => //.
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.Field.eqType F) n n)) (component_mx M) (component_mx M') *)
by apply/eqP/component_mx_isoP; [|apply: sim_e | apply/mxsimple_isoP].
Qed.
Inductive socle_sort : predArgType := PackSocle W of W \in socle_enum.
Local Notation sG := socle_sort.
Local Notation e0 := (socle_base_enum sG0).
Definition socle_base W := let: PackSocle W _ := W in e0`_(index W socle_enum).
Coercion socle_val W : 'M[F]_n := component_mx (socle_base W).
Definition socle_mult (W : sG) := (\rank W %/ \rank (socle_base W))%N.
Lemma socle_simple W : mxsimple (socle_base W).
Proof.
(* Goal: mxsimple (socle_base W) *)
case: W => M /=; rewrite /= /socle_enum /=; case: sG0 => e sim_e _ /= e_M.
(* Goal: mxsimple (@nth (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) e (@index (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) M (@map (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) component_mx e))) *)
by apply: sim_e; rewrite mem_nth // -(size_map component_mx) index_mem.
Qed.
Definition socle_module (W : sG) := mxsimple_module (socle_simple W).
Definition socle_repr W := submod_repr (socle_module W).
Lemma nz_socle (W : sG) : W != 0 :> 'M_n.
Proof.
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (socle_val W : matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n) : matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n))) *)
have simW := socle_simple W; have [_ nzW _] := simW; apply: contra nzW.
(* Goal: forall _ : is_true (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (socle_val W) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))), is_true (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (socle_base W) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) *)
by rewrite -!submx0; apply: submx_trans (component_mx_id simW).
Qed.
Lemma socle_mem (W : sG) : (W : 'M_n) \in socle_enum.
Proof.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) n n) (socle_val W : matrix (GRing.Field.sort F) n n) (@mem (Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) (seq_predType (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) socle_enum)) *)
exact: component_socle (socle_simple _).
Qed.
Lemma PackSocleK W e0W : @PackSocle W e0W = W :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (socle_val (@PackSocle W e0W)) W *)
rewrite /socle_val /= in e0W *; rewrite -(nth_map _ 0) ?nth_index //.
(* Goal: is_true (leq (S (@index (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) W socle_enum)) (@size (matrix (GRing.Field.sort F) n n) (socle_base_enum sG0))) *)
by rewrite -(size_map component_mx) index_mem.
Qed.
Canonical socle_subType := SubType _ _ _ socle_sort_rect PackSocleK.
Definition socle_eqMixin := Eval hnf in [eqMixin of sG by <:].
Canonical socle_eqType := Eval hnf in EqType sG socle_eqMixin.
Definition socle_choiceMixin := Eval hnf in [choiceMixin of sG by <:].
Canonical socle_choiceType := ChoiceType sG socle_choiceMixin.
Lemma socleP (W W' : sG) : reflect (W = W') (W == W')%MS.
Proof.
(* Goal: Bool.reflect (@eq socle_sort W W') (andb (@submx F n n n (socle_val W) (socle_val W')) (@submx F n n n (socle_val W') (socle_val W))) *)
by rewrite (sameP genmxP eqP) !{1}genmx_component; apply: (W =P _).
Qed.
Fact socle_finType_subproof :
cancel (fun W => SeqSub (socle_mem W)) (fun s => PackSocle (valP s)).
Proof.
(* Goal: @cancel (@seq_sub (matrix_eqType (GRing.Field.eqType F) n n) socle_enum) socle_sort (fun W : socle_sort => @SeqSub (matrix_eqType (GRing.Field.eqType F) n n) socle_enum (socle_val W) (socle_mem W)) (fun s : @seq_sub (matrix_eqType (GRing.Field.eqType F) n n) socle_enum => @PackSocle (@val (Equality.sort (matrix_eqType (GRing.Field.eqType F) n n)) (fun x : Equality.sort (matrix_eqType (GRing.Field.eqType F) n n) => @in_mem (Equality.sort (matrix_eqType (GRing.Field.eqType F) n n)) x (@mem (Equality.sort (matrix_eqType (GRing.Field.eqType F) n n)) (seq_predType (matrix_eqType (GRing.Field.eqType F) n n)) socle_enum)) (@seq_sub_subType (matrix_eqType (GRing.Field.eqType F) n n) socle_enum) s) (@valP (Equality.sort (matrix_eqType (GRing.Field.eqType F) n n)) (fun x : Equality.sort (matrix_eqType (GRing.Field.eqType F) n n) => @in_mem (Equality.sort (matrix_eqType (GRing.Field.eqType F) n n)) x (@mem (Equality.sort (matrix_eqType (GRing.Field.eqType F) n n)) (seq_predType (matrix_eqType (GRing.Field.eqType F) n n)) socle_enum)) (@seq_sub_subType (matrix_eqType (GRing.Field.eqType F) n n) socle_enum) s)) *)
by move=> W /=; apply: val_inj; rewrite /= PackSocleK.
Qed.
Definition socle_countMixin := CanCountMixin socle_finType_subproof.
Canonical socle_countType := CountType sG socle_countMixin.
Canonical socle_subCountType := [subCountType of sG].
Definition socle_finMixin := CanFinMixin socle_finType_subproof.
Canonical socle_finType := FinType sG socle_finMixin.
Canonical socle_subFinType := [subFinType of sG].
End SocleDef.
Coercion socle_sort : socleType >-> predArgType.
Variable sG : socleType.
Section SubSocle.
Variable P : pred sG.
Notation S := (\sum_(W : sG | P W) socle_val W)%MS.
Lemma subSocle_module : mxmodule S.
Proof.
(* Goal: is_true (@mxmodule n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@socle_val sG W)))) *)
by rewrite sumsmx_module // => W _; apply: component_mx_module.
Qed.
Lemma subSocle_semisimple : mxsemisimple S.
Local Notation ssimS := subSocle_semisimple.
Lemma subSocle_iso M :
mxsimple M -> (M <= S)%MS -> {W : sG | P W & mx_iso (socle_base W) M}.
Lemma capmx_subSocle m (M : 'M_(m, n)) :
mxmodule M -> (M :&: S :=: \sum_(W : sG | P W) (M :&: W))%MS.
Proof.
(* Goal: forall _ : is_true (@mxmodule m M), @eqmx F n n n (@capmx F m n n M (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@socle_val sG W)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W)))) *)
move=> modM; apply/eqmxP/andP; split; last first.
(* Goal: is_true (@submx F n n n (@capmx F m n n M (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@socle_val sG W)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W))))) *)
(* Goal: is_true (@submx F n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W)))) (@capmx F m n n M (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@socle_val sG W))))) *)
by apply/sumsmx_subP=> W P_W; rewrite capmxS // (sumsmx_sup W).
(* Goal: is_true (@submx F n n n (@capmx F m n n M (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@socle_val sG W)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W))))) *)
have modMS: mxmodule (M :&: S)%MS by rewrite capmx_module ?subSocle_module.
(* Goal: is_true (@submx F n n n (@capmx F m n n M (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@socle_val sG W)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W))))) *)
have [J /= U simU defMS _] := mxsemisimpleS modMS (capmxSr M S) ssimS.
(* Goal: is_true (@submx F n n n (@capmx F m n n M (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (socle_sort sG) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@socle_val sG W)))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (socle_sort sG) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W))))) *)
rewrite -defMS; apply/sumsmx_subP=> j _.
(* Goal: is_true (@submx F n n n (U j) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (socle_sort sG) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W))))) *)
have [sUjV sUjS]: (U j <= M /\ U j <= S)%MS.
(* Goal: is_true (@submx F n n n (U j) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (socle_sort sG) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W))))) *)
(* Goal: and (is_true (@submx F n m n (U j) M)) (is_true (@submx F n n n (U j) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (socle_finType sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@socle_val sG W))))) *)
by apply/andP; rewrite -sub_capmx -defMS (sumsmx_sup j).
(* Goal: is_true (@submx F n n n (U j) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (socle_sort sG) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W))))) *)
have [W P_W isoWU] := subSocle_iso (simU j) sUjS.
(* Goal: is_true (@submx F n n n (U j) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (socle_sort sG) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (socle_finType sG)) (fun W : socle_sort sG => @BigBody (matrix (GRing.Field.sort F) n n) (socle_sort sG) W (@addsmx F n n n) (P W) (@capmx F m n n M (@socle_val sG W))))) *)
rewrite (sumsmx_sup W) // sub_capmx sUjV mx_iso_component //.
(* Goal: mxsimple (@socle_base sG W) *)
exact: socle_simple.
Qed.
End SubSocle.
Lemma subSocle_direct P : mxdirect (\sum_(W : sG | P W) W).
Definition Socle := (\sum_(W : sG) W)%MS.
Lemma simple_Socle M : mxsimple M -> (M <= Socle)%MS.
Proof.
(* Goal: forall _ : mxsimple M, is_true (@submx F n n n M Socle) *)
move=> simM; have socM := component_socle sG simM.
(* Goal: is_true (@submx F n n n M Socle) *)
by rewrite (sumsmx_sup (PackSocle socM)) // PackSocleK component_mx_id.
Qed.
Lemma semisimple_Socle U : mxsemisimple U -> (U <= Socle)%MS.
Proof.
(* Goal: forall _ : mxsemisimple U, is_true (@submx F n n n U Socle) *)
by case=> I M /= simM <- _; apply/sumsmx_subP=> i _; apply: simple_Socle.
Qed.
Lemma reducible_Socle U :
mxmodule U -> mx_completely_reducible U -> (U <= Socle)%MS.
Lemma genmx_Socle : <<Socle>>%MS = Socle.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx F n n Socle) Socle *)
by rewrite genmx_sums; apply: eq_bigr => W; rewrite genmx_component.
Qed.
Lemma reducible_Socle1 : mx_completely_reducible 1%:M -> Socle = 1%:M.
Lemma Socle_semisimple : mxsemisimple Socle.
Proof.
(* Goal: mxsemisimple Socle *)
exact: subSocle_semisimple.
Qed.
Lemma Socle_iso M : mxsimple M -> {W : sG | mx_iso (socle_base W) M}.
Proof.
(* Goal: forall _ : mxsimple M, @sig (socle_sort sG) (fun W : socle_sort sG => mx_iso (@socle_base sG W) M) *)
by move=> simM; case/subSocle_iso: (simple_Socle simM) => // W _; exists W.
Qed.
End Socle.
Section CentHom.
Variable f : 'M[F]_n.
Lemma row_full_dom_hom : row_full (dom_hom_mx f) = centgmx rG f.
Proof.
(* Goal: @eq bool (@row_full F n n (dom_hom_mx f)) (@centgmx (GRing.Field.comUnitRingType F) gT G n rG f) *)
by rewrite -sub1mx; apply/hom_mxP/centgmxP=> cfG x /cfG; rewrite !mul1mx.
Qed.
Lemma memmx_cent_envelop : (f \in 'C(E_G))%MS = centgmx rG f.
Proof.
(* Goal: @eq bool (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Field.sort F) n n f) (@cent_mx F (@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)))) n (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (@centgmx (GRing.Field.comUnitRingType F) gT G n rG f) *)
apply/cent_rowP/centgmxP=> [cfG x Gx | cfG i].
(* Goal: let A := @vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) (@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)))) (expn n (S (S O))) i (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) in @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A f) (@mulmx (GRing.Field.ringType F) n n n f A) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n f (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x) f) *)
by have:= cfG (enum_rank_in Gx x); rewrite rowK mxvecK enum_rankK_in.
(* Goal: let A := @vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) (@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)))) (expn n (S (S O))) i (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) in @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A f) (@mulmx (GRing.Field.ringType F) n n n f A) *)
by rewrite rowK mxvecK /= cfG ?enum_valP.
Qed.
Lemma kermx_centg_module : centgmx rG f -> mxmodule (kermx f).
Lemma centgmx_hom m (U : 'M_(m, n)) : centgmx rG f -> (U <= dom_hom_mx f)%MS.
Proof.
(* Goal: forall _ : is_true (@centgmx (GRing.Field.comUnitRingType F) gT G n rG f), is_true (@submx F m n n U (dom_hom_mx f)) *)
by rewrite -row_full_dom_hom -sub1mx; apply: submx_trans (submx1 _).
Qed.
End CentHom.
Definition mx_irreducible := mxsimple 1%:M.
Lemma mx_irrP :
mx_irreducible <-> n > 0 /\ (forall U, @mxmodule n U -> U != 0 -> row_full U).
Proof.
(* Goal: iff mx_irreducible (and (is_true (leq (S O) n)) (forall (U : matrix (GRing.Field.sort F) n n) (_ : is_true (@mxmodule n U)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@row_full F n n U))) *)
rewrite /mx_irreducible /mxsimple mxmodule1 -mxrank_eq0 mxrank1 -lt0n.
(* Goal: iff (and3 (is_true true) (is_true (leq (S O) n)) (forall (U : matrix (GRing.Field.sort F) n n) (_ : is_true (@mxmodule n U)) (_ : is_true (@submx F n n n U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@submx F n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) U))) (and (is_true (leq (S O) n)) (forall (U : matrix (GRing.Field.sort F) n n) (_ : is_true (@mxmodule n U)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@row_full F n n U))) *)
do [split=> [[_ -> irrG] | [-> irrG]]; split=> // U] => [modU | modU _] nzU.
(* Goal: is_true (@submx F n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) U) *)
(* Goal: is_true (@row_full F n n U) *)
by rewrite -sub1mx (irrG U) ?submx1.
(* Goal: is_true (@submx F n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) U) *)
by rewrite sub1mx irrG.
Qed.
Lemma mx_Schur :
mx_irreducible -> forall f, centgmx rG f -> f != 0 -> f \in unitmx.
Proof.
(* Goal: forall (_ : mx_irreducible) (f : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (_ : is_true (@centgmx (GRing.Field.comUnitRingType F) gT G n rG f)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.ComUnitRing.eqType (GRing.Field.comUnitRingType F)) n n) f (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) n n))))), is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) f (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
move/mx_Schur_onto=> irrG f.
(* Goal: forall (_ : is_true (@centgmx (GRing.Field.comUnitRingType F) gT G n rG f)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.ComUnitRing.eqType (GRing.Field.comUnitRingType F)) n n) f (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) n n))))), is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) f (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
rewrite -row_full_dom_hom -!row_full_unit -!sub1mx => cGf nz.
(* Goal: is_true (@submx F n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) f) *)
by rewrite -[f]mul1mx irrG ?submx1 ?mxmodule1 ?mul1mx.
Qed.
Definition mx_absolutely_irreducible := (n > 0) && row_full E_G.
Lemma mx_abs_irrP :
reflect (n > 0 /\ exists a_, forall A, A = \sum_(x in G) a_ x A *: rG x)
mx_absolutely_irreducible.
Proof.
(* Goal: Bool.reflect (and (is_true (leq (S O) n)) (@ex (forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (fun a_ : forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) => forall A : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)))), @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) A (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ x A) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))))))) mx_absolutely_irreducible *)
have G_1 := group1 G; have bijG := enum_val_bij_in G_1.
(* Goal: Bool.reflect (and (is_true (leq (S O) n)) (@ex (forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (fun a_ : forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) => forall A : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)))), @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) A (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ x A) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))))))) mx_absolutely_irreducible *)
set h := enum_val in bijG; have Gh : h _ \in G by apply: enum_valP.
(* Goal: Bool.reflect (and (is_true (leq (S O) n)) (@ex (forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (fun a_ : forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) => forall A : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)))), @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) A (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ x A) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))))))) mx_absolutely_irreducible *)
rewrite /mx_absolutely_irreducible; case: (n > 0); last by right; case.
(* Goal: Bool.reflect (and (is_true true) (@ex (forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (fun a_ : forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) => forall A : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)))), @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) A (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ x A) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))))))) (andb true (@row_full F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) *)
apply: (iffP row_fullP) => [[E' E'G] | [_ [a_ a_G]]].
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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 B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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)))) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n)) (@mulmx (GRing.Field.ringType F) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) B (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F)))) *)
(* Goal: and (is_true true) (@ex (forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (fun a_ : forall (_ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))), GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) => forall A : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)))), @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) A (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ x A) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))))) *)
split=> //; exists (fun x B => (mxvec B *m E') 0 (enum_rank_in G_1 x)) => B.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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 B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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)))) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n)) (@mulmx (GRing.Field.ringType F) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) B (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F)))) *)
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) B (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n B) E') (GRing.zero (Zp_zmodType O)) (@enum_rank_in (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) G_1 x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) *)
apply: (can_inj mxvecK); rewrite -{1}[mxvec B]mulmx1 -{}E'G mulmxA.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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 B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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)))) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n)) (@mulmx (GRing.Field.ringType F) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) B (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F)))) *)
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (S O) (muln n n)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) n n B) E') (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) n n (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n B) E') (GRing.zero (Zp_zmodType O)) (@enum_rank_in (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) G_1 x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))))) *)
move: {B E'}(_ *m E') => u; apply/rowP=> j.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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 B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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)))) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n)) (@mulmx (GRing.Field.ringType F) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) B (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F)))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (S O) (muln n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) u (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (GRing.zero (Zp_zmodType O)) j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (S O) (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) n n (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) u (GRing.zero (Zp_zmodType O)) (@enum_rank_in (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) G_1 x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))))) (GRing.zero (Zp_zmodType O)) j) *)
rewrite linear_sum (reindex h) //= mxE summxE.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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 B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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)))) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n)) (@mulmx (GRing.Field.ringType F) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) B (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F)))) *)
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (ordinal_finType (@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)))))) (fun j0 : Finite.sort (ordinal_finType (@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))))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (ordinal_finType (@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)))))) j0 (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.mul (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) u (GRing.zero (Zp_zmodType O)) j0) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@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)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) j0 j)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Field.zmodType F)) (ordinal (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x)))) (GRing.zero (GRing.Field.zmodType F)) (index_enum (ordinal_finType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))))) (fun k : ordinal (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) => @BigBody (GRing.Zmodule.sort (GRing.Field.zmodType F)) (ordinal (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x)))) k (@GRing.add (GRing.Field.zmodType F)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (h 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)))) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (muln n n) (@mxvec (GRing.Field.sort F) n n (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) u (GRing.zero (Zp_zmodType O)) (@enum_rank_in (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) G_1 (h k))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (h k)))) (GRing.zero (Zp_zmodType O)) j))) *)
by apply: eq_big => [k| k _]; rewrite ?Gh // enum_valK_in mxE linearZ !mxE.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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 B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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)))) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n)) (@mulmx (GRing.Field.ringType F) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) B (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F)))) *)
exists (\matrix_(j, i) a_ (h i) (vec_mx (row j 1%:M))).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n)) (@mulmx (GRing.Field.ringType F) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@matrix_of_fun (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (muln n n) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) matrix_key (fun (j : Finite.sort (ordinal_finType (muln n n))) (i : Finite.sort (ordinal_finType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))))) => a_ (h i) (@vec_mx (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (muln n n) (muln n n) j (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (muln n n) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))))))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F))) *)
apply/row_matrixP=> i; rewrite -[row i 1%:M]vec_mxK {}[vec_mx _]a_G.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n)) (@row (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n) i (@mulmx (GRing.Field.ringType F) (muln n n) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@matrix_of_fun (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (muln n n) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) matrix_key (fun (j : Finite.sort (ordinal_finType (muln n n))) (i : Finite.sort (ordinal_finType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))))) => a_ (h i) (@vec_mx (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@row (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (muln n n) (muln n n) j (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (muln n n) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))))))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ x (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (muln n n) i (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F)))))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))))) *)
apply/rowP=> j; rewrite linear_sum (reindex h) //= 2!mxE summxE.
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (index_enum (ordinal_finType (@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)))))) (fun j0 : Finite.sort (ordinal_finType (@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))))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (Finite.sort (ordinal_finType (@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)))))) j0 (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType F))) true (@GRing.mul (GRing.Field.ringType F) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (muln n n) (@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)))) (@matrix_of_fun (GRing.Field.sort F) (muln n n) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) matrix_key (fun (j : ordinal (muln n n)) (i : ordinal (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x)))) => a_ (h i) (@vec_mx (GRing.Field.sort F) n n (@row (GRing.Field.sort F) (muln n n) (muln n n) j (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (muln n n) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))))))) i j0) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@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)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) j0 j)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Field.zmodType F)) (ordinal (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x)))) (GRing.zero (GRing.Field.zmodType F)) (index_enum (ordinal_finType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))))) (fun k : ordinal (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) => @BigBody (GRing.Zmodule.sort (GRing.Field.zmodType F)) (ordinal (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x)))) k (@GRing.add (GRing.Field.zmodType F)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (h 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)))) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (muln n n) (@mxvec (GRing.Field.sort F) n n (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ (h k) (@vec_mx (GRing.Field.sort F) n n (@row (GRing.Field.sort F) (muln n n) (muln n n) i (@scalar_mx (GRing.Field.ringType F) (muln n n) (GRing.one (GRing.Field.ringType F)))))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (h k)))) (GRing.zero (Zp_zmodType O)) j))) *)
by apply: eq_big => [k| k _]; [rewrite Gh | rewrite linearZ !mxE].
Qed.
Lemma mx_abs_irr_cent_scalar :
mx_absolutely_irreducible -> forall A, centgmx rG A -> is_scalar_mx A.
Proof.
(* Goal: forall (_ : is_true mx_absolutely_irreducible) (A : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (_ : is_true (@centgmx (GRing.Field.comUnitRingType F) gT G n rG A)), is_true (@is_scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n A) *)
case/mx_abs_irrP=> n_gt0 [a_ a_G] A /centgmxP cGA.
(* Goal: is_true (@is_scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n A) *)
have{cGA a_G} cMA B: A *m B = B *m A.
(* Goal: is_true (@is_scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n A) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n A B) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n B A) *)
rewrite {}[B]a_G mulmx_suml mulmx_sumr.
(* Goal: is_true (@is_scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n A) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n A (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ i B) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG i))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ i B) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG i)) A))) *)
by apply: eq_bigr => x Gx; rewrite -scalemxAl -scalemxAr cGA.
(* Goal: is_true (@is_scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n A) *)
pose i0 := Ordinal n_gt0; apply/is_scalar_mxP; exists (A i0 i0).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) A (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n A i0 i0)) *)
apply/matrixP=> i j; move/matrixP/(_ i0 j): (esym (cMA (delta_mx i0 i))).
(* Goal: forall _ : @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@delta_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n i0 i) A) i0 j) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n A (@delta_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n i0 i)) i0 j), @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n A i j) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n A i0 i0)) i j) *)
rewrite -[A *m _]trmxK trmx_mul trmx_delta -!(@mul_delta_mx _ n 1 n 0) -!mulmxA.
(* Goal: forall _ : @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (S O) n (@delta_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (S O) i0 (GRing.zero (Zp_zmodType O))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) n n (@delta_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) n (GRing.zero (Zp_zmodType O)) i) A)) i0 j) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@trmx (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@mulmx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (S O) n (@delta_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (S O) i (GRing.zero (Zp_zmodType O))) (@mulmx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S O) n n (@delta_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S O) n (GRing.zero (Zp_zmodType O)) i0) (@trmx (GRing.ComRing.sort (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n n A)))) i0 j), @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n A i j) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n A i0 i0)) i j) *)
by rewrite -!rowE !mxE !big_ord1 !mxE !eqxx !mulr_natl /= andbT eq_sym.
Qed.
Lemma mx_abs_irrW : mx_absolutely_irreducible -> mx_irreducible.
Proof.
(* Goal: forall _ : is_true mx_absolutely_irreducible, mx_irreducible *)
case/mx_abs_irrP=> n_gt0 [a_ a_G]; apply/mx_irrP; split=> // U Umod.
(* Goal: forall _ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))), is_true (@row_full F n n U) *)
case/rowV0Pn=> u Uu; rewrite -mxrank_eq0 -lt0n row_leq_rank -sub1mx.
(* Goal: forall _ : is_true (@row_free F (S O) n u), is_true (@submx F n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) U) *)
case/submxP: Uu => v ->{u} /row_freeP[u' vK]; apply/row_subP=> i.
(* Goal: is_true (@submx F (S O) n n (@row (GRing.Field.sort F) n n i (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) U) *)
rewrite rowE scalar_mxC -{}vK -2![_ *m _]mulmxA; move: {u' i}(u' *m _) => A.
(* Goal: is_true (@submx F (S O) n n (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) n n v (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n n U A)) U) *)
rewrite mulmx_sub {v}// [A]a_G linear_sum summx_sub //= => x Gx.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n n U (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n) (a_ x A) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) U) *)
by rewrite linearZ /= scalemx_sub // (mxmoduleP Umod).
Qed.
Lemma linear_mx_abs_irr : n = 1%N -> mx_absolutely_irreducible.
Proof.
(* Goal: forall _ : @eq nat n (S O), is_true mx_absolutely_irreducible *)
move=> n1; rewrite /mx_absolutely_irreducible /row_full eqn_leq rank_leq_col.
(* Goal: is_true (andb (leq (S O) n) (andb true (leq (muln n n) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG))))) *)
rewrite {1 2 3}n1 /= lt0n mxrank_eq0; apply: contraTneq envelop_mx1 => ->.
(* Goal: is_true (negb (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@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)))) (muln n n))))) *)
by rewrite eqmx0 submx0 mxvec_eq0 -mxrank_eq0 mxrank1 n1.
Qed.
Lemma abelian_abs_irr : abelian G -> mx_absolutely_irreducible = (n == 1%N).
End OneRepresentation.
Arguments mxmoduleP {gT G n rG m U}.
Arguments envelop_mxP {gT G n rG A}.
Arguments hom_mxP {gT G n rG m f W}.
Arguments rfix_mxP {gT G n rG m W}.
Arguments cyclic_mxP {gT G n rG u v}.
Arguments annihilator_mxP {gT G n rG u A}.
Arguments row_hom_mxP {gT G n rG u v}.
Arguments mxsimple_isoP {gT G n rG U V}.
Arguments socleP {gT G n rG sG0 W W'}.
Arguments mx_abs_irrP {gT G n rG}.
Arguments val_submod {n U m} W.
Arguments in_submod {n} U {m} W.
Arguments val_submodK {n U m} W : rename.
Arguments in_submodK {n U m} [W] sWU.
Arguments val_submod_inj {n U m} [W1 W2] : rename.
Arguments val_factmod {n U m} W.
Arguments in_factmod {n} U {m} W.
Arguments val_factmodK {n U m} W : rename.
Arguments in_factmodK {n} U {m} [W] sWU.
Arguments val_factmod_inj {n U m} [W1 W2] : rename.
Section Proper.
Variables (gT : finGroupType) (G : {group gT}) (n' : nat).
Local Notation n := n'.+1.
Variable rG : mx_representation F G n.
Lemma envelop_mx_ring : mxring (enveloping_algebra_mx rG).
Proof.
(* Goal: is_true (@mxring F (@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 n') (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G (S n') rG)) *)
apply/andP; split; first by apply/mulsmx_subP; apply: envelop_mxM.
(* Goal: is_true (@has_mxring_id F (@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 n') (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G (S n') rG)) *)
apply/mxring_idP; exists 1%:M; split=> *; rewrite ?mulmx1 ?mul1mx //.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (S n') (S n')) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) (S n') (S n') (@scalar_mx (GRing.Field.ringType F) (S n') (GRing.one (GRing.Field.ringType F)))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G (S n') rG)) *)
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) (S n') (S n'))) (@scalar_mx (GRing.Field.ringType F) (S n') (GRing.one (GRing.Field.ringType F))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n') (S n'))))) *)
by rewrite -mxrank_eq0 mxrank1.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (S n') (S n')) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) (S n') (S n') (@scalar_mx (GRing.Field.ringType F) (S n') (GRing.one (GRing.Field.ringType F)))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G (S n') rG)) *)
exact: envelop_mx1.
Qed.
End Proper.
Section JacobsonDensity.
Variables (gT : finGroupType) (G : {group gT}) (n : nat).
Variable rG : mx_representation F G n.
Hypothesis irrG : mx_irreducible rG.
Local Notation E_G := (enveloping_algebra_mx rG).
Local Notation Hom_G := 'C(E_G)%MS.
Lemma mx_Jacobson_density : ('C(Hom_G) <= E_G)%MS.
Lemma cent_mx_scalar_abs_irr : \rank Hom_G <= 1 -> mx_absolutely_irreducible rG.
Section Stabilisers.
Variables (m : nat) (U : 'M[F]_(m, n)).
Lemma rstabs_subg : rstabs rH U = H :&: rstabs rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstabs gT H n (@subg_repr (GRing.Field.comUnitRingType F) gT G H n rG sHG) m U) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@rstabs gT G n rG m U)) *)
by apply/setP=> x; rewrite !inE andbA -in_setI (setIidPl sHG).
Qed.
Lemma mxmodule_subg : mxmodule rG U -> mxmodule rH U.
Proof.
(* Goal: forall _ : is_true (@mxmodule gT G n rG m U), is_true (@mxmodule gT H n (@subg_repr (GRing.Field.comUnitRingType F) gT G H n rG sHG) m U) *)
by rewrite /mxmodule rstabs_subg subsetI subxx; apply: subset_trans.
Qed.
End Stabilisers.
Lemma mxsimple_subg M : mxmodule rG M -> mxsimple rH M -> mxsimple rG M.
Proof.
(* Goal: forall (_ : is_true (@mxmodule gT G n rG n M)) (_ : @mxsimple gT H n (@subg_repr (GRing.Field.comUnitRingType F) gT G H n rG sHG) M), @mxsimple gT G n rG M *)
by move=> modM [_ nzM minM]; split=> // U /mxmodule_subg; apply: minM.
Qed.
Lemma subg_mx_irr : mx_irreducible rH -> mx_irreducible rG.
Proof.
(* Goal: forall _ : @mx_irreducible gT H n (@subg_repr (GRing.Field.comUnitRingType F) gT G H n rG sHG), @mx_irreducible gT G n rG *)
by apply: mxsimple_subg; apply: mxmodule1.
Qed.
Lemma subg_mx_abs_irr :
mx_absolutely_irreducible rH -> mx_absolutely_irreducible rG.
Proof.
(* Goal: forall _ : is_true (@mx_absolutely_irreducible gT H n (@subg_repr (GRing.Field.comUnitRingType F) gT G H n rG sHG)), is_true (@mx_absolutely_irreducible gT G n rG) *)
rewrite /mx_absolutely_irreducible -!sub1mx => /andP[-> /submx_trans-> //].
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT H n (@subg_repr (GRing.Field.comUnitRingType F) gT G H n rG sHG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
apply/row_subP=> i; rewrite rowK /= envelop_mx_id //.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)) i) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by rewrite (subsetP sHG) ?enum_valP.
Qed.
Section Stabilisers.
Variables (m : nat) (U : 'M[F]_(m, n)).
Lemma rstabs_eqg : rstabs rH U = rstabs rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstabs gT H n (@eqg_repr (GRing.Field.comUnitRingType F) gT G H n rG eqGH) m U) (@rstabs gT G n rG m U) *)
by rewrite rstabs_subg -(eqP eqGH) (setIidPr _) ?rstabs_sub.
Qed.
Lemma mxmodule_eqg : mxmodule rH U = mxmodule rG U.
Proof.
(* Goal: @eq bool (@mxmodule gT H n (@eqg_repr (GRing.Field.comUnitRingType F) gT G H n rG eqGH) m U) (@mxmodule gT G n rG m U) *)
by rewrite /mxmodule rstabs_eqg -(eqP eqGH).
Qed.
End Stabilisers.
Lemma mxsimple_eqg M : mxsimple rH M <-> mxsimple rG M.
Proof.
(* Goal: iff (@mxsimple gT H n (@eqg_repr (GRing.Field.comUnitRingType F) gT G H n rG eqGH) M) (@mxsimple gT G n rG M) *)
rewrite /mxsimple mxmodule_eqg.
(* Goal: iff (and3 (is_true (@mxmodule gT G n rG n M)) (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) M (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) (forall (U : matrix (GRing.Field.sort F) n n) (_ : is_true (@mxmodule gT H n (@eqg_repr (GRing.Field.comUnitRingType F) gT G H n rG eqGH) n U)) (_ : is_true (@submx F n n n U M)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@submx F n n n M U))) (and3 (is_true (@mxmodule gT G n rG n M)) (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) M (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) (forall (U : matrix (GRing.Field.sort F) n n) (_ : is_true (@mxmodule gT G n rG n U)) (_ : is_true (@submx F n n n U M)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@submx F n n n M U))) *)
split=> [] [-> -> minM]; split=> // U modU; by apply: minM; rewrite mxmodule_eqg in modU *.
Qed.
Qed.
Lemma eqg_mx_irr : mx_irreducible rH <-> mx_irreducible rG.
Proof.
(* Goal: iff (@mx_irreducible gT H n (@eqg_repr (GRing.Field.comUnitRingType F) gT G H n rG eqGH)) (@mx_irreducible gT G n rG) *)
exact: mxsimple_eqg.
Qed.
Lemma eqg_mx_abs_irr :
mx_absolutely_irreducible rH = mx_absolutely_irreducible rG.
Proof.
(* Goal: @eq bool (@mx_absolutely_irreducible gT H n (@eqg_repr (GRing.Field.comUnitRingType F) gT G H n rG eqGH)) (@mx_absolutely_irreducible gT G n rG) *)
by congr (_ && (_ == _)); rewrite /enveloping_algebra_mx /= -(eqP eqGH).
Qed.
End SameGroup.
End ChangeGroup.
Section Morphpre.
Variables (aT rT : finGroupType) (D : {group aT}) (f : {morphism D >-> rT}).
Variables (G : {group rT}) (n : nat) (rG : mx_representation F G n).
Local Notation rGf := (morphpre_repr f rG).
Section Stabilisers.
Variables (m : nat) (U : 'M[F]_(m, n)).
Lemma rstabs_morphpre : rstabs rGf U = f @*^-1 (rstabs rG U).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@rstabs aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG) m U) (@morphpre aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@rstabs rT G n rG m U)) *)
by apply/setP=> x; rewrite !inE andbA.
Qed.
Lemma mxmodule_morphpre : G \subset f @* D -> mxmodule rGf U = mxmodule rG U.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G))) (@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 D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT D))))), @eq bool (@mxmodule aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG) m U) (@mxmodule rT G n rG m U) *)
by move=> sGf; rewrite /mxmodule rstabs_morphpre morphpreSK.
Qed.
End Stabilisers.
Lemma rfix_morphpre (H : {set aT}) :
H \subset D -> (rfix_mx rGf H :=: rfix_mx rG (f @* H))%MS.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) H)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eqmx F n n n (@rfix_mx aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG) H) (@rfix_mx rT G n rG (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H)) *)
move=> sHD; apply/eqmxP/andP; split.
(* Goal: is_true (@submx F n n n (@rfix_mx rT G n rG (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H)) (@rfix_mx aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG) H)) *)
(* Goal: is_true (@submx F n n n (@rfix_mx aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG) H) (@rfix_mx rT G n rG (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H))) *)
by apply/rfix_mxP=> _ /morphimP[x _ Hx ->]; rewrite rfix_mx_id.
(* Goal: is_true (@submx F n n n (@rfix_mx rT G n rG (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H)) (@rfix_mx aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG) H)) *)
by apply/rfix_mxP=> x Hx; rewrite rfix_mx_id ?mem_morphim ?(subsetP sHD).
Qed.
Lemma morphpre_mx_irr :
G \subset f @* D -> (mx_irreducible rGf <-> mx_irreducible rG).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G))) (@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 D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT D))))), iff (@mx_irreducible aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG)) (@mx_irreducible rT G n rG) *)
move/mxmodule_morphpre=> modG; split=> /mx_irrP[n_gt0 irrG]; by apply/mx_irrP; split=> // U modU; apply: irrG; rewrite modG in modU *.
Qed.
Qed.
Lemma morphpre_mx_abs_irr :
G \subset f @* D ->
mx_absolutely_irreducible rGf = mx_absolutely_irreducible rG.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G))) (@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 D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT D))))), @eq bool (@mx_absolutely_irreducible aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG)) (@mx_absolutely_irreducible rT G n rG) *)
move=> sGfD; congr (_ && (_ == _)); apply/eqP; rewrite mxrank_leqif_sup //.
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) rT G n rG)) *)
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G)))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) rT G n rG) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG))) *)
apply/row_subP=> i; rewrite rowK.
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) rT G n rG)) *)
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) (muln n n) (@mxvec (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n (@repr_mx (GRing.Field.comUnitRingType F) rT (@gval rT G) n rG (@enum_val (FinGroup.arg_finType (FinGroup.base rT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G)) i))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG))) *)
case/morphimP: (subsetP sGfD _ (enum_valP i)) => x Dx _ def_i.
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) rT G n rG)) *)
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) (muln n n) (@mxvec (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n (@repr_mx (GRing.Field.comUnitRingType F) rT (@gval rT G) n rG (@enum_val (FinGroup.arg_finType (FinGroup.base rT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G)) i))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG))) *)
by rewrite def_i (envelop_mx_id rGf) // !inE Dx -def_i enum_valP.
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))) (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n (@morphpre_repr (GRing.Field.comUnitRingType F) aT rT D f G n rG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) rT G n rG)) *)
apply/row_subP=> i; rewrite rowK (envelop_mx_id rG) //.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mfun aT rT (@gval aT D) f (@enum_val (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@morphpre_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))) i)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G)))) *)
by case/morphpreP: (enum_valP i).
Qed.
End Morphpre.
Section Morphim.
Variables (aT rT : finGroupType) (G D : {group aT}) (f : {morphism D >-> rT}).
Variables (n : nat) (rGf : mx_representation F (f @* G) n).
Hypothesis sGD : G \subset D.
Let sG_f'fG : G \subset f @*^-1 (f @* G).
Local Notation rG := (morphim_repr rGf sGD).
Section Stabilisers.
Variables (m : nat) (U : 'M[F]_(m, n)).
Lemma rstabs_morphim : rstabs rG U = G :&: f @*^-1 rstabs rGf U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@rstabs aT G n (@morphim_repr (GRing.Field.comUnitRingType F) aT rT G D f n rGf sGD) m U) (@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)) (@rstabs rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf m U))) *)
by rewrite -rstabs_morphpre -(rstabs_subg _ sG_f'fG).
Qed.
Lemma mxmodule_morphim : mxmodule rG U = mxmodule rGf U.
Proof.
(* Goal: @eq bool (@mxmodule aT G n (@morphim_repr (GRing.Field.comUnitRingType F) aT rT G D f n rGf sGD) m U) (@mxmodule rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf m U) *)
by rewrite /mxmodule rstabs_morphim subsetI subxx -sub_morphim_pre.
Qed.
End Stabilisers.
Lemma rfix_morphim (H : {set aT}) :
H \subset D -> (rfix_mx rG H :=: rfix_mx rGf (f @* H))%MS.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) H)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eqmx F n n n (@rfix_mx aT G n (@morphim_repr (GRing.Field.comUnitRingType F) aT rT G D f n rGf sGD) H) (@rfix_mx rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) H)) *)
exact: rfix_morphpre.
Qed.
Lemma mxsimple_morphim M : mxsimple rG M <-> mxsimple rGf M.
Proof.
(* Goal: iff (@mxsimple aT G n (@morphim_repr (GRing.Field.comUnitRingType F) aT rT G D f n rGf sGD) M) (@mxsimple rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf M) *)
rewrite /mxsimple mxmodule_morphim.
(* Goal: iff (and3 (is_true (@mxmodule rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf n M)) (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) M (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) (forall (U : matrix (GRing.Field.sort F) n n) (_ : is_true (@mxmodule aT G n (@morphim_repr (GRing.Field.comUnitRingType F) aT rT G D f n rGf sGD) n U)) (_ : is_true (@submx F n n n U M)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@submx F n n n M U))) (and3 (is_true (@mxmodule rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf n M)) (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) M (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) (forall (U : matrix (GRing.Field.sort F) n n) (_ : is_true (@mxmodule rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf n U)) (_ : is_true (@submx F n n n U M)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@submx F n n n M U))) *)
split=> [] [-> -> minM]; split=> // U modU; by apply: minM; rewrite mxmodule_morphim in modU *.
Qed.
Qed.
Lemma morphim_mx_irr : (mx_irreducible rG <-> mx_irreducible rGf).
Proof.
(* Goal: iff (@mx_irreducible aT G n (@morphim_repr (GRing.Field.comUnitRingType F) aT rT G D f n rGf sGD)) (@mx_irreducible rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rGf) *)
exact: mxsimple_morphim.
Qed.
Lemma morphim_mx_abs_irr :
mx_absolutely_irreducible rG = mx_absolutely_irreducible rGf.
End Morphim.
Section Submodule.
Variables (gT : finGroupType) (G : {group gT}) (n : nat).
Variables (rG : mx_representation F G n) (U : 'M[F]_n) (Umod : mxmodule rG U).
Local Notation rU := (submod_repr Umod).
Local Notation rU' := (factmod_repr Umod).
Lemma rfix_submod (H : {set gT}) :
H \subset G -> (rfix_mx rU H :=: in_submod U (U :&: rfix_mx rG H))%MS.
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)) 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)))), @eqmx F (@mxrank F n n U) n (@mxrank F n n U) (@rfix_mx gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) H) (@in_submod n U n (@capmx F n n n U (@rfix_mx gT G n rG H))) *)
move=> sHG; apply/eqmxP/andP; split; last first.
(* Goal: is_true (@submx F (@mxrank F n n U) n (@mxrank F n n U) (@rfix_mx gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) H) (@in_submod n U n (@capmx F n n n U (@rfix_mx gT G n rG H)))) *)
(* Goal: is_true (@submx F n (@mxrank F n n U) (@mxrank F n n U) (@in_submod n U n (@capmx F n n n U (@rfix_mx gT G n rG H))) (@rfix_mx gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) H)) *)
apply/rfix_mxP=> x Hx; rewrite -in_submodJ ?capmxSl //.
(* Goal: is_true (@submx F (@mxrank F n n U) n (@mxrank F n n U) (@rfix_mx gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) H) (@in_submod n U n (@capmx F n n n U (@rfix_mx gT G n rG H)))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U)) (@in_submod n U n (@mulmx (GRing.Field.ringType F) n n n (@capmx F n n n U (@rfix_mx gT G n rG H)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@in_submod n U n (@capmx F n n n U (@rfix_mx gT G n rG H))) *)
by rewrite (rfix_mxP H _) ?capmxSr.
(* Goal: is_true (@submx F (@mxrank F n n U) n (@mxrank F n n U) (@rfix_mx gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) H) (@in_submod n U n (@capmx F n n n U (@rfix_mx gT G n rG H)))) *)
rewrite -val_submodS in_submodK ?capmxSl // sub_capmx val_submodP //=.
(* Goal: is_true (@submx F (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@rfix_mx gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) H)) (@rfix_mx gT G n rG H)) *)
apply/rfix_mxP=> x Hx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@rfix_mx gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) H)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@val_submod n U (@mxrank F n n U) (@rfix_mx gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) H)) *)
by rewrite -(val_submodJ Umod) ?(subsetP sHG) ?rfix_mx_id.
Qed.
Lemma rfix_factmod (H : {set gT}) :
H \subset G -> (in_factmod U (rfix_mx rG H) <= rfix_mx rU' H)%MS.
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)) 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 (@submx F n (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@rfix_mx gT G n rG H)) (@rfix_mx gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) H)) *)
move=> sHG; apply/rfix_mxP=> x Hx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@rfix_mx gT G n rG H)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) x)) (@in_factmod n U n (@rfix_mx gT G n rG H)) *)
by rewrite -(in_factmodJ Umod) ?(subsetP sHG) ?rfix_mx_id.
Qed.
Lemma rstab_submod m (W : 'M_(m, \rank U)) :
rstab rU W = rstab rG (val_submod W).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstab (GRing.Field.comUnitRingType F) gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) m W) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m (@val_submod n U m W)) *)
apply/setP=> x; rewrite !inE; apply: andb_id2l => Gx.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) m (@mxrank F n n U)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m (@mxrank F n n U) (@mxrank F n n U) W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U Umod) x)) W) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) m n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m n n (@val_submod n U m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@val_submod n U m W)) *)
by rewrite -(inj_eq val_submod_inj) val_submodJ.
Qed.
Lemma rstabs_submod m (W : 'M_(m, \rank U)) :
rstabs rU W = rstabs rG (val_submod W).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstabs gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) m W) (@rstabs gT G n rG m (@val_submod n U m W)) *)
apply/setP=> x; rewrite !inE; apply: andb_id2l => Gx.
(* Goal: @eq bool (@submx F m m (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) m (@mxrank F n n U) (@mxrank F n n U) W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U Umod) x)) W) (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n (@val_submod n U m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@val_submod n U m W)) *)
by rewrite -val_submodS val_submodJ.
Qed.
Lemma val_submod_module m (W : 'M_(m, \rank U)) :
mxmodule rG (val_submod W) = mxmodule rU W.
Proof.
(* Goal: @eq bool (@mxmodule gT G n rG m (@val_submod n U m W)) (@mxmodule gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) m W) *)
by rewrite /mxmodule rstabs_submod.
Qed.
Lemma in_submod_module m (V : 'M_(m, n)) :
(V <= U)%MS -> mxmodule rU (in_submod U V) = mxmodule rG V.
Proof.
(* Goal: forall _ : is_true (@submx F m n n V U), @eq bool (@mxmodule gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) m (@in_submod n U m V)) (@mxmodule gT G n rG m V) *)
by move=> sVU; rewrite -val_submod_module in_submodK.
Qed.
Lemma rstab_factmod m (W : 'M_(m, n)) :
rstab rG W \subset rstab rU' (in_factmod U W).
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)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG m W))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@rstab (GRing.Field.comUnitRingType F) gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) m (@in_factmod n U m W))))) *)
by apply/subsetP=> x /setIdP[Gx /eqP cUW]; rewrite inE Gx -in_factmodJ //= cUW.
Qed.
Lemma rstabs_factmod m (W : 'M_(m, \rank (cokermx U))) :
rstabs rU' W = rstabs rG (U + val_factmod W)%MS.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstabs gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) m W) (@rstabs gT G n rG n (@addsmx F n m n U (@val_factmod n U m W))) *)
apply/setP=> x; rewrite !inE; apply: andb_id2l => Gx.
(* Goal: @eq bool (@submx F m m (@mxrank F n n (@cokermx F n n U)) (@mulmx (GRing.Field.ringType F) m (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) x)) W) (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (@addsmx F n m n U (@val_factmod n U m W)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@addsmx F n m n U (@val_factmod n U m W))) *)
rewrite addsmxMr addsmx_sub (submx_trans (mxmoduleP Umod x Gx)) ?addsmxSl //.
(* Goal: @eq bool (@submx F m m (@mxrank F n n (@cokermx F n n U)) (@mulmx (GRing.Field.ringType F) m (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) x)) W) (andb true (@submx F m n n (@mulmx (GRing.Field.ringType F) m n n (@val_factmod n U m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@addsmx F n m n U (@val_factmod n U m W)))) *)
rewrite -val_factmodS val_factmodJ //= val_factmodS; apply/idP/idP=> nWx.
(* Goal: is_true (@submx F m m (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U m (@mulmx (GRing.Field.ringType F) m n n (@val_factmod n U m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) W) *)
(* Goal: is_true (@submx F m n n (@mulmx (GRing.Field.ringType F) m n n (@val_factmod n U m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@addsmx F n m n U (@val_factmod n U m W))) *)
rewrite (submx_trans (addsmxSr U _)) // -(in_factmodsK (addsmxSl U _)) //.
(* Goal: is_true (@submx F m m (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U m (@mulmx (GRing.Field.ringType F) m n n (@val_factmod n U m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) W) *)
(* Goal: is_true (@submx F n n n (@addsmx F n n n U (@val_factmod n U n (@in_factmod n U n (@addsmx F n m n U (@mulmx (GRing.Field.ringType F) m n n (@val_factmod n U m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))))) (@addsmx F n m n U (@val_factmod n U m W))) *)
by rewrite addsmxS // val_factmodS in_factmod_addsK.
(* Goal: is_true (@submx F m m (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U m (@mulmx (GRing.Field.ringType F) m n n (@val_factmod n U m W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) W) *)
rewrite in_factmodE (submx_trans (submxMr _ nWx)) // -in_factmodE.
(* Goal: is_true (@submx F n m (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@addsmx F n m n U (@val_factmod n U m W))) W) *)
by rewrite in_factmod_addsK val_factmodK.
Qed.
Lemma val_factmod_module m (W : 'M_(m, \rank (cokermx U))) :
mxmodule rG (U + val_factmod W)%MS = mxmodule rU' W.
Proof.
(* Goal: @eq bool (@mxmodule gT G n rG n (@addsmx F n m n U (@val_factmod n U m W))) (@mxmodule gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) m W) *)
by rewrite /mxmodule rstabs_factmod.
Qed.
Lemma in_factmod_module m (V : 'M_(m, n)) :
mxmodule rU' (in_factmod U V) = mxmodule rG (U + V)%MS.
Proof.
(* Goal: @eq bool (@mxmodule gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) m (@in_factmod n U m V)) (@mxmodule gT G n rG n (@addsmx F n m n U V)) *)
rewrite -(eqmx_module _ (in_factmodsK (addsmxSl U V))).
(* Goal: @eq bool (@mxmodule gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod) m (@in_factmod n U m V)) (@mxmodule gT G n rG n (@addsmx F n n n U (@val_factmod n U n (@in_factmod n U n (@addsmx F n m n U V))))) *)
by rewrite val_factmod_module (eqmx_module _ (in_factmod_addsK _ _)).
Qed.
Lemma rker_submod : rker rU = rstab rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rker (GRing.Field.comUnitRingType F) gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod)) (@rstab (GRing.Field.comUnitRingType F) gT G n rG n U) *)
by rewrite /rker rstab_submod; apply: eqmx_rstab (val_submod1 U).
Qed.
Lemma rstab_norm : G \subset 'N(rstab rG U).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@rstab (GRing.Field.comUnitRingType F) gT G n rG n U))))) *)
by rewrite -rker_submod rker_norm.
Qed.
Lemma rstab_normal : rstab rG U <| G.
Proof.
(* Goal: is_true (@normal gT (@rstab (GRing.Field.comUnitRingType F) gT G n rG n U) (@gval gT G)) *)
by rewrite -rker_submod rker_normal.
Qed.
Lemma submod_mx_faithful : mx_faithful rU -> mx_faithful rG.
Proof.
(* Goal: forall _ : is_true (@mx_faithful (GRing.Field.comUnitRingType F) gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod)), is_true (@mx_faithful (GRing.Field.comUnitRingType F) gT G n rG) *)
by apply: subset_trans; rewrite rker_submod rstabS ?submx1.
Qed.
Lemma rker_factmod : rker rG \subset rker rU'.
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)) (@rker (GRing.Field.comUnitRingType F) gT G n rG))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@rker (GRing.Field.comUnitRingType F) gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod))))) *)
apply/subsetP=> x /rkerP[Gx cVx].
(* 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)) (@rker (GRing.Field.comUnitRingType F) gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod))))) *)
by rewrite inE Gx /= /factmod_mx cVx mul1mx mulmx1 val_factmodK.
Qed.
Lemma factmod_mx_faithful : mx_faithful rU' -> mx_faithful rG.
Proof.
(* Goal: forall _ : is_true (@mx_faithful (GRing.Field.comUnitRingType F) gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U Umod)), is_true (@mx_faithful (GRing.Field.comUnitRingType F) gT G n rG) *)
exact: subset_trans rker_factmod.
Qed.
Lemma submod_mx_irr : mx_irreducible rU <-> mxsimple rG U.
Proof.
(* Goal: iff (@mx_irreducible gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod)) (@mxsimple gT G n rG U) *)
split=> [] [_ nzU simU].
(* Goal: @mx_irreducible gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) *)
(* Goal: @mxsimple gT G n rG U *)
rewrite -mxrank_eq0 mxrank1 mxrank_eq0 in nzU; split=> // V modV sVU nzV.
(* Goal: @mx_irreducible gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) *)
(* Goal: is_true (@submx F n n n U V) *)
rewrite -(in_submodK sVU) -val_submod1 val_submodS.
(* Goal: @mx_irreducible gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) *)
(* Goal: is_true (@submx F (@mxrank F n n U) n (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F))) (@in_submod n U n V)) *)
rewrite -(genmxE (in_submod U V)) simU ?genmxE ?submx1 //=.
(* Goal: @mx_irreducible gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) *)
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) (@mxrank F n n U) (@mxrank F n n U)) (@genmx F n (@mxrank F n n U) (@in_submod n U n V)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@mxrank F n n U) (@mxrank F n n U))))) *)
(* Goal: is_true (@mxmodule gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) (@mxrank F n n U) (@genmx F n (@mxrank F n n U) (@in_submod n U n V))) *)
by rewrite (eqmx_module _ (genmxE _)) in_submod_module.
(* Goal: @mx_irreducible gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) *)
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) (@mxrank F n n U) (@mxrank F n n U)) (@genmx F n (@mxrank F n n U) (@in_submod n U n V)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@mxrank F n n U) (@mxrank F n n U))))) *)
rewrite -submx0 genmxE -val_submodS in_submodK //.
(* Goal: @mx_irreducible gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) *)
(* Goal: is_true (negb (@submx F n (@mxrank F n n U) n V (@val_submod n U (@mxrank F n n U) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@mxrank F n n U) (@mxrank F n n U)))))) *)
by rewrite linear0 eqmx0 submx0.
(* Goal: @mx_irreducible gT G (@mxrank F n n U) (@submod_repr gT G n rG U Umod) *)
apply/mx_irrP; rewrite lt0n mxrank_eq0; split=> // V modV.
(* Goal: forall _ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) (@mxrank F n n U) (@mxrank F n n U)) V (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@mxrank F n n U) (@mxrank F n n U))))), is_true (@row_full F (@mxrank F n n U) (@mxrank F n n U) V) *)
rewrite -(inj_eq val_submod_inj) linear0 -(eqmx_eq0 (genmxE _)) => nzV.
(* Goal: is_true (@row_full F (@mxrank F n n U) (@mxrank F n n U) V) *)
rewrite -sub1mx -val_submodS val_submod1 -(genmxE (val_submod V)).
(* Goal: is_true (@submx F n n n U (@genmx F (@mxrank F n n U) n (@val_submod n U (@mxrank F n n U) V))) *)
rewrite simU ?genmxE ?val_submodP //=.
(* Goal: is_true (@mxmodule gT G n rG n (@genmx F (@mxrank F n n U) n (@val_submod n U (@mxrank F n n U) V))) *)
by rewrite (eqmx_module _ (genmxE _)) val_submod_module.
Qed.
End Submodule.
Section Conjugate.
Variables (gT : finGroupType) (G : {group gT}) (n : nat).
Variables (rG : mx_representation F G n) (B : 'M[F]_n).
Hypothesis uB : B \in unitmx.
Local Notation rGB := (rconj_repr rG uB).
Lemma rfix_conj (H : {set gT}) :
(rfix_mx rGB H :=: B *m rfix_mx rG H *m invmx B)%MS.
Lemma rstabs_conj m (U : 'M_(m, n)) : rstabs rGB U = rstabs rG (U *m B).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstabs gT G n (@rconj_repr (GRing.Field.comUnitRingType F) gT G n rG B uB) m U) (@rstabs gT G n rG m (@mulmx (GRing.Field.ringType F) m n n U B)) *)
apply/setP=> x; rewrite !inE rconj_mxE !mulmxA.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m n n U B) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@invmx (GRing.Field.comUnitRingType F) n B)) U)) (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)))) (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m n n U B) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.Field.ringType F) m n n U B))) *)
by rewrite -{2}[U](mulmxK uB) submxMfree // row_free_unit unitmx_inv.
Qed.
Lemma mxmodule_conj m (U : 'M_(m, n)) : mxmodule rGB U = mxmodule rG (U *m B).
Proof.
(* Goal: @eq bool (@mxmodule gT G n (@rconj_repr (GRing.Field.comUnitRingType F) gT G n rG B uB) m U) (@mxmodule gT G n rG m (@mulmx (GRing.Field.ringType F) m n n U B)) *)
by rewrite /mxmodule rstabs_conj.
Qed.
Lemma conj_mx_irr : mx_irreducible rGB <-> mx_irreducible rG.
Proof.
(* Goal: iff (@mx_irreducible gT G n (@rconj_repr (GRing.Field.comUnitRingType F) gT G n rG B uB)) (@mx_irreducible gT G n rG) *)
have Bfree: row_free B by rewrite row_free_unit.
(* Goal: iff (@mx_irreducible gT G n (@rconj_repr (GRing.Field.comUnitRingType F) gT G n rG B uB)) (@mx_irreducible gT G n rG) *)
split => /mx_irrP[n_gt0 irrG]; apply/mx_irrP; split=> // U.
(* Goal: forall (_ : is_true (@mxmodule gT G n (@rconj_repr (GRing.Field.comUnitRingType F) gT G n rG B uB) n U)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@row_full F n n U) *)
(* Goal: forall (_ : is_true (@mxmodule gT G n rG n U)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@row_full F n n U) *)
rewrite -[U](mulmxKV uB) -mxmodule_conj -mxrank_eq0 /row_full mxrankMfree //.
(* Goal: forall (_ : is_true (@mxmodule gT G n (@rconj_repr (GRing.Field.comUnitRingType F) gT G n rG B uB) n U)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@row_full F n n U) *)
(* Goal: forall (_ : is_true (@mxmodule gT G n (@rconj_repr (GRing.Field.comUnitRingType F) gT G n rG B uB) n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U (@invmx (GRing.Field.comUnitRingType F) n B)))) (_ : is_true (negb (@eq_op nat_eqType (@mxrank F n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U (@invmx (GRing.Field.comUnitRingType F) n B))) O))), is_true (@eq_op nat_eqType (@mxrank F n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U (@invmx (GRing.Field.comUnitRingType F) n B))) n) *)
by rewrite mxrank_eq0; apply: irrG.
(* Goal: forall (_ : is_true (@mxmodule gT G n (@rconj_repr (GRing.Field.comUnitRingType F) gT G n rG B uB) n U)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@row_full F n n U) *)
rewrite -mxrank_eq0 /row_full -(mxrankMfree _ Bfree) mxmodule_conj mxrank_eq0.
(* Goal: forall (_ : is_true (@mxmodule gT G n rG n (@mulmx (GRing.Field.ringType F) n n n U B))) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@mulmx (GRing.Field.ringType F) n n n U B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))), is_true (@eq_op nat_eqType (@mxrank F n n (@mulmx (GRing.Field.ringType F) n n n U B)) n) *)
exact: irrG.
Qed.
End Conjugate.
Section Quotient.
Variables (gT : finGroupType) (G : {group gT}) (n : nat).
Variables (rG : mx_representation F G n) (H : {group gT}).
Hypotheses (krH : H \subset rker rG) (nHG : G \subset 'N(H)).
Let nHGs := subsetP nHG.
Local Notation rGH := (quo_repr krH nHG).
Local Notation E_ r := (enveloping_algebra_mx r).
Lemma quo_mx_quotient : (E_ rGH :=: E_ rG)%MS.
Proof.
(* Goal: @eqmx F (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG) *)
apply/eqmxP/andP; split; apply/row_subP=> i.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (muln n n) (@row (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) i (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG))) *)
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@row (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (muln n n) i (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
rewrite rowK; case/morphimP: (enum_valP i) => x _ Gx ->{i}.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (muln n n) (@row (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) i (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG))) *)
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n (@repr_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
rewrite quo_repr_coset // (eq_row_sub (enum_rank_in Gx x)) // rowK.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (muln n n) (@row (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) i (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG))) *)
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (muln n n)) (@mxvec (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) (@enum_rank_in (FinGroup.arg_finType (FinGroup.base gT)) x (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) Gx x)))) (@mxvec (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by rewrite enum_rankK_in.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (muln n n) (@row (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) i (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG))) *)
rewrite rowK -(quo_mx_coset krH nHG) ?enum_valP //; set Hx := coset H _.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (muln n n) (@mxvec (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n (@quo_mx (GRing.Field.comUnitRingType F) gT G n rG (@gval gT H) krH nHG Hx)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG))) *)
have GHx: Hx \in (G / H)%g by rewrite mem_quotient ?enum_valP.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) (muln n n) (@mxvec (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n (@quo_mx (GRing.Field.comUnitRingType F) gT G n rG (@gval gT H) krH nHG Hx)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG))) *)
by rewrite (eq_row_sub (enum_rank_in GHx Hx)) // rowK enum_rankK_in.
Qed.
Lemma rfix_quo (K : {group gT}) :
K \subset G -> (rfix_mx rGH (K / H)%g :=: rfix_mx rG K)%MS.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eqmx F n n n (@rfix_mx (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) (@quotient gT (@gval gT K) (@gval gT H))) (@rfix_mx gT G n rG (@gval gT K)) *)
move=> sKG; apply/eqmxP/andP; (split; apply/rfix_mxP) => [x Kx | Hx].
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hx (@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)))) (@quotient gT (@gval gT K) (@gval gT H))))), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@rfix_mx gT G n rG (@gval gT K)) (@repr_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) Hx)) (@rfix_mx gT G n rG (@gval gT K)) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@rfix_mx (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) (@quotient gT (@gval gT K) (@gval gT H))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@rfix_mx (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) (@quotient gT (@gval gT K) (@gval gT H))) *)
have Gx := subsetP sKG x Kx; rewrite -(quo_mx_coset krH nHG) // rfix_mx_id //.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hx (@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)))) (@quotient gT (@gval gT K) (@gval gT H))))), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@rfix_mx gT G n rG (@gval gT K)) (@repr_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) Hx)) (@rfix_mx gT G n rG (@gval gT K)) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@coset gT (@gval gT H) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@quotient gT (@gval gT K) (@gval gT H))))) *)
by rewrite mem_morphim ?(subsetP nHG).
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) Hx (@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)))) (@quotient gT (@gval gT K) (@gval gT H))))), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@rfix_mx gT G n rG (@gval gT K)) (@repr_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) Hx)) (@rfix_mx gT G n rG (@gval gT K)) *)
case/morphimP=> x _ Kx ->; have Gx := subsetP sKG x Kx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@rfix_mx gT G n rG (@gval gT K)) (@repr_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) (@rfix_mx gT G n rG (@gval gT K)) *)
by rewrite quo_repr_coset ?rfix_mx_id.
Qed.
Lemma rstabs_quo m (U : 'M_(m, n)) : rstabs rGH U = (rstabs rG U / H)%g.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))))) (@rstabs (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) m U) (@quotient gT (@rstabs gT G n rG m U) (@gval gT H)) *)
apply/setP=> Hx; rewrite !inE; apply/andP/idP=> [[]|] /morphimP[x Nx Gx ->{Hx}].
(* Goal: and (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) U)) *)
(* Goal: forall _ : is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) U), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@quotient gT (@rstabs gT G n rG m U) (@gval gT H))))) *)
by rewrite quo_repr_coset // => nUx; rewrite mem_morphim // inE Gx.
(* Goal: and (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) x))) U)) *)
by case/setIdP: Gx => Gx nUx; rewrite quo_repr_coset ?mem_morphim.
Qed.
Lemma mxmodule_quo m (U : 'M_(m, n)) : mxmodule rGH U = mxmodule rG U.
Proof.
(* Goal: @eq bool (@mxmodule (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG) m U) (@mxmodule gT G n rG m U) *)
rewrite /mxmodule rstabs_quo quotientSGK // ?(subset_trans krH) //.
(* 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)) (@rker (GRing.Field.comUnitRingType F) gT G n rG))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@rstabs_group gT G n rG m U))))) *)
apply/subsetP=> x; rewrite !inE mul1mx => /andP[-> /eqP->].
(* Goal: is_true (andb true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n U (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))))) U)) *)
by rewrite /= mulmx1.
Qed.
Lemma quo_mx_irr : mx_irreducible rGH <-> mx_irreducible rG.
Proof.
(* Goal: iff (@mx_irreducible (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) n (@quo_repr (GRing.Field.comUnitRingType F) gT G n rG H krH nHG)) (@mx_irreducible gT G n rG) *)
split; case/mx_irrP=> n_gt0 irrG; apply/mx_irrP; split=> // U modU; by apply: irrG; rewrite mxmodule_quo in modU *.
Qed.
Qed.
End Quotient.
Section SplittingField.
Implicit Type gT : finGroupType.
Definition group_splitting_field gT (G : {group gT}) :=
forall n (rG : mx_representation F G n),
mx_irreducible rG -> mx_absolutely_irreducible rG.
Definition group_closure_field gT :=
forall G : {group gT}, group_splitting_field G.
Lemma quotient_splitting_field gT (G : {group gT}) (H : {set gT}) :
G \subset 'N(H) -> group_splitting_field G -> group_splitting_field (G / H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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 H))))) (_ : @group_splitting_field gT G), @group_splitting_field (@coset_groupType gT H) (@quotient_group gT G H) *)
move=> nHG splitG n rGH irrGH.
(* Goal: is_true (@mx_absolutely_irreducible (@coset_groupType gT H) (@quotient_group gT G H) n rGH) *)
by rewrite -(morphim_mx_abs_irr _ nHG) splitG //; apply/morphim_mx_irr.
Qed.
Lemma coset_splitting_field gT (H : {set gT}) :
group_closure_field gT -> group_closure_field (coset_groupType H).
Proof.
(* Goal: forall _ : group_closure_field gT, group_closure_field (@coset_groupType gT H) *)
move=> split_gT Gbar; have ->: Gbar = (coset H @*^-1 Gbar / H)%G.
(* Goal: @group_splitting_field (@coset_groupType gT H) (@quotient_group gT (@morphpre_group gT (@coset_groupType gT H) (@normaliser_group gT H) (@coset_morphism gT H) (@MorPhantom gT (@coset_groupType gT H) (@coset gT H)) Gbar) H) *)
(* Goal: @eq (@group_of (@coset_groupType gT H) (Phant (FinGroup.arg_sort (FinGroup.base (@coset_groupType gT H))))) Gbar (@quotient_group gT (@morphpre_group gT (@coset_groupType gT H) (@normaliser_group gT H) (@coset_morphism gT H) (@MorPhantom gT (@coset_groupType gT H) (@coset gT H)) Gbar) H) *)
by apply: val_inj; rewrite /= /quotient morphpreK ?sub_im_coset.
(* Goal: @group_splitting_field (@coset_groupType gT H) (@quotient_group gT (@morphpre_group gT (@coset_groupType gT H) (@normaliser_group gT H) (@coset_morphism gT H) (@MorPhantom gT (@coset_groupType gT H) (@coset gT H)) Gbar) H) *)
by apply: quotient_splitting_field; [apply: subsetIl | apply: split_gT].
Qed.
End SplittingField.
Section Abelian.
Variables (gT : finGroupType) (G : {group gT}).
Lemma mx_faithful_irr_center_cyclic n (rG : mx_representation F G n) :
mx_faithful rG -> mx_irreducible rG -> cyclic 'Z(G).
Lemma mx_faithful_irr_abelian_cyclic n (rG : mx_representation F G n) :
mx_faithful rG -> mx_irreducible rG -> abelian G -> cyclic G.
Proof.
(* Goal: forall (_ : is_true (@mx_faithful (GRing.Field.comUnitRingType F) gT G n rG)) (_ : @mx_irreducible gT G n rG) (_ : is_true (@abelian gT (@gval gT G))), is_true (@cyclic gT (@gval gT G)) *)
move=> injG irrG cGG; rewrite -(setIidPl cGG).
(* Goal: is_true (@cyclic gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT G)))) *)
exact: mx_faithful_irr_center_cyclic injG irrG.
Qed.
Hypothesis splitG : group_splitting_field G.
Lemma mx_irr_abelian_linear n (rG : mx_representation F G n) :
mx_irreducible rG -> abelian G -> n = 1%N.
Proof.
(* Goal: forall (_ : @mx_irreducible gT G n rG) (_ : is_true (@abelian gT (@gval gT G))), @eq nat n (S O) *)
by move=> irrG cGG; apply/eqP; rewrite -(abelian_abs_irr rG) ?splitG.
Qed.
Lemma mxsimple_abelian_linear n (rG : mx_representation F G n) M :
abelian G -> mxsimple rG M -> \rank M = 1%N.
Proof.
(* Goal: forall (_ : is_true (@abelian gT (@gval gT G))) (_ : @mxsimple gT G n rG M), @eq nat (@mxrank F n n M) (S O) *)
move=> cGG simM; have [modM _ _] := simM.
(* Goal: @eq nat (@mxrank F n n M) (S O) *)
by move/(submod_mx_irr modM)/mx_irr_abelian_linear: simM => ->.
Qed.
Lemma linear_mxsimple n (rG : mx_representation F G n) (M : 'M_n) :
mxmodule rG M -> \rank M = 1%N -> mxsimple rG M.
End Abelian.
Section AbelianQuotient.
Variables (gT : finGroupType) (G : {group gT}).
Variables (n : nat) (rG : mx_representation F G n).
Lemma center_kquo_cyclic : mx_irreducible rG -> cyclic 'Z(G / rker rG)%g.
Lemma der1_sub_rker :
group_splitting_field G -> mx_irreducible rG ->
(G^`(1) \subset rker rG)%g = (n == 1)%N.
End AbelianQuotient.
Section Similarity.
Variables (gT : finGroupType) (G : {group gT}).
Local Notation reprG := (mx_representation F G).
Variant mx_rsim n1 (rG1 : reprG n1) n2 (rG2 : reprG n2) : Prop :=
MxReprSim B of n1 = n2 & row_free B
& forall x, x \in G -> rG1 x *m B = B *m rG2 x.
Lemma mxrank_rsim n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
mx_rsim rG1 rG2 -> n1 = n2.
Proof.
(* Goal: forall _ : @mx_rsim n1 rG1 n2 rG2, @eq nat n1 n2 *)
by case.
Qed.
Lemma mx_rsim_refl n (rG : reprG n) : mx_rsim rG rG.
Proof.
(* Goal: @mx_rsim n rG n rG *)
exists 1%:M => // [|x _]; first by rewrite row_free_unit unitmx1.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@mulmx (GRing.Field.ringType F) n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by rewrite mulmx1 mul1mx.
Qed.
Lemma mx_rsim_sym n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
mx_rsim rG1 rG2 -> mx_rsim rG2 rG1.
Proof.
(* Goal: forall _ : @mx_rsim n1 rG1 n2 rG2, @mx_rsim n2 rG2 n1 rG1 *)
case=> B def_n1; rewrite def_n1 in rG1 B *.
rewrite row_free_unit => injB homB; exists (invmx B) => // [|x Gx].
by rewrite row_free_unit unitmx_inv.
by apply: canRL (mulKmx injB) _; rewrite mulmxA -homB ?mulmxK.
Qed.
Qed.
Lemma mx_rsim_trans n1 n2 n3
(rG1 : reprG n1) (rG2 : reprG n2) (rG3 : reprG n3) :
mx_rsim rG1 rG2 -> mx_rsim rG2 rG3 -> mx_rsim rG1 rG3.
Proof.
(* Goal: forall (_ : @mx_rsim n1 rG1 n2 rG2) (_ : @mx_rsim n2 rG2 n3 rG3), @mx_rsim n1 rG1 n3 rG3 *)
case=> [B1 defn1 freeB1 homB1] [B2 defn2 freeB2 homB2].
(* Goal: @mx_rsim n1 rG1 n3 rG3 *)
exists (B1 *m B2); rewrite /row_free ?mxrankMfree 1?defn1 // => x Gx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n1 n3) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 n1 n3 (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n1 rG1 x) (@mulmx (GRing.Field.ringType F) n1 n2 n3 B1 B2)) (@mulmx (GRing.Field.ringType F) n1 n3 n3 (@mulmx (GRing.Field.ringType F) n1 n2 n3 B1 B2) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n3 rG3 x)) *)
by rewrite mulmxA homB1 // -!mulmxA homB2.
Qed.
Lemma mx_rsim_def n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
mx_rsim rG1 rG2 ->
exists B, exists2 B', B' *m B = 1%:M &
forall x, x \in G -> rG1 x = B *m rG2 x *m B'.
Proof.
(* Goal: forall _ : @mx_rsim n1 rG1 n2 rG2, @ex (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n1 n2) (fun B : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n1 n2 => @ex2 (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n1) (fun B' : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n1 => @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n2) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 n1 n2 B' B) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))))) (fun B' : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n1 => forall (x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n1 n1) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n1 rG1 x) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 n2 n1 (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 n2 n2 B (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n2 rG2 x)) B'))) *)
case=> B def_n1; rewrite def_n1 in rG1 B *; rewrite row_free_unit => injB homB.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n2) (fun B : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n2 => @ex2 (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n2) (fun B' : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n2 => @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n2) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 n2 n2 B' B) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))))) (fun B' : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n2 n2 => forall (x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n2 n2) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n2 rG1 x) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 n2 n2 (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 n2 n2 B (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n2 rG2 x)) B'))) *)
by exists B, (invmx B) => [|x Gx]; rewrite ?mulVmx // -homB // mulmxK.
Qed.
Lemma mx_rsim_iso n (rG : reprG n) (U V : 'M_n)
(modU : mxmodule rG U) (modV : mxmodule rG V) :
mx_rsim (submod_repr modU) (submod_repr modV) <-> mx_iso rG U V.
Proof.
(* Goal: iff (@mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV)) (@mx_iso gT G n rG U V) *)
split=> [[B eqrUV injB homB] | [f injf homf defV]].
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: @mx_iso gT G n rG U V *)
have: \rank (U *m val_submod (in_submod U 1%:M *m B)) = \rank U.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: forall _ : @eq nat (@mxrank F n n (@mulmx (GRing.Field.ringType F) n n n U (@val_submod n V n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n V) (@in_submod n U n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))) B)))) (@mxrank F n n U), @mx_iso gT G n rG U V *)
(* Goal: @eq nat (@mxrank F n n (@mulmx (GRing.Field.ringType F) n n n U (@val_submod n V n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n V) (@in_submod n U n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))) B)))) (@mxrank F n n U) *)
do 2!rewrite mulmxA mxrankMfree ?row_base_free //.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: forall _ : @eq nat (@mxrank F n n (@mulmx (GRing.Field.ringType F) n n n U (@val_submod n V n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n V) (@in_submod n U n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))) B)))) (@mxrank F n n U), @mx_iso gT G n rG U V *)
(* Goal: @eq nat (@mxrank F n (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) n n (@mxrank F n n U) U (@in_submod n U n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))))) (@mxrank F n n U) *)
by rewrite -(eqmxMr _ (val_submod1 U)) -in_submodE val_submodK mxrank1.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: forall _ : @eq nat (@mxrank F n n (@mulmx (GRing.Field.ringType F) n n n U (@val_submod n V n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n V) (@in_submod n U n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))) B)))) (@mxrank F n n U), @mx_iso gT G n rG U V *)
case/complete_unitmx => f injf defUf; exists f => //.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n U f) V *)
(* Goal: is_true (@submx F n n n U (@dom_hom_mx gT G n rG f)) *)
apply/hom_mxP=> x Gx; rewrite -defUf -2!mulmxA -(val_submodJ modV) //.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n U f) V *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x) f)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U (@val_submod n V n (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n V) (@mxrank F n n V) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (@mxrank F n n U) (@mxrank F n n V) (@in_submod n U n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))) B) (@submod_mx gT G n rG V modV x)))) *)
rewrite -(mulmxA _ B) -homB // val_submodE 3!(mulmxA U) (mulmxA _ _ B).
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n U f) V *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) f) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n V) n (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) (@mxrank F n n V) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) n n (@mxrank F n n U) U (@in_submod n U n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))))))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x)) B) (@val_submod n V (@mxrank F n n V) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n V) (GRing.one (GRing.Field.ringType F))))) *)
rewrite -in_submodE -in_submodJ //.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n U f) V *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) f) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n V) n (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) (@mxrank F n n V) (@in_submod n U n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) B) (@val_submod n V (@mxrank F n n V) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n V) (GRing.one (GRing.Field.ringType F))))) *)
have [u ->] := submxP (mxmoduleP modU x Gx).
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n U f) V *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n u U) f) (@mulmx (GRing.Field.ringType F) n (@mxrank F n n V) n (@mulmx (GRing.Field.ringType F) n (@mxrank F n n U) (@mxrank F n n V) (@in_submod n U n (@mulmx (GRing.Field.ringType F) n n n u U)) B) (@val_submod n V (@mxrank F n n V) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n V) (GRing.one (GRing.Field.ringType F))))) *)
by rewrite in_submodE -mulmxA -defUf !mulmxA mulmx1.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n U f) V *)
apply/eqmxP; rewrite -mxrank_leqif_eq.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n U f) V) *)
(* Goal: is_true (@eq_op nat_eqType (@mxrank F n n (@mulmx (GRing.Field.ringType F) n n n U f)) (@mxrank F n n V)) *)
by rewrite mxrankMfree ?eqrUV ?row_free_unit.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n U f) V) *)
by rewrite -defUf mulmxA val_submodP.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
have eqrUV: \rank U = \rank V by rewrite -defV mxrankMfree ?row_free_unit.
(* Goal: @mx_rsim (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F n n V) (@submod_repr gT G n rG V modV) *)
exists (in_submod V (val_submod 1%:M *m f)) => // [|x Gx].
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F n n V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F n n V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) (@mxrank F n n V) (@mxrank F n n V) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n V) (@submod_repr gT G n rG V modV) x)) *)
(* Goal: is_true (@row_free F (@mxrank F n n U) (@mxrank F n n V) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f))) *)
rewrite /row_free {6}eqrUV -[_ == _]sub1mx -val_submodS.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F n n V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F n n V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) (@mxrank F n n V) (@mxrank F n n V) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n V) (@submod_repr gT G n rG V modV) x)) *)
(* Goal: is_true (@submx F (@mxrank F n n V) (@mxrank F n n U) n (@val_submod n V (@mxrank F n n V) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n V) (GRing.one (GRing.Field.ringType F)))) (@val_submod n V (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f)))) *)
rewrite in_submodK; last by rewrite -defV submxMr ?val_submodP.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F n n V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F n n V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) (@mxrank F n n V) (@mxrank F n n V) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n V) (@submod_repr gT G n rG V modV) x)) *)
(* Goal: is_true (@submx F (@mxrank F n n V) (@mxrank F n n U) n (@val_submod n V (@mxrank F n n V) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n V) (GRing.one (GRing.Field.ringType F)))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f)) *)
by rewrite val_submod1 -defV submxMr ?val_submod1.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F n n V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F n n V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) (@mxrank F n n V) (@mxrank F n n V) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n V) (@submod_repr gT G n rG V modV) x)) *)
rewrite -in_submodJ; last by rewrite -defV submxMr ?val_submodP.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F n n V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F n n V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f))) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) *)
rewrite -(hom_mxP (submx_trans (val_submodP _) homf)) //.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F n n V)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F n n V) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) f))) (@in_submod n V (@mxrank F n n U) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) f)) *)
by rewrite -(val_submodJ modU) // mul1mx 2!(mulmxA ((submod_repr _) x)) -val_submodE.
Qed.
Lemma mx_rsim_irr n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
mx_rsim rG1 rG2 -> mx_irreducible rG1 -> mx_irreducible rG2.
Proof.
(* Goal: forall (_ : @mx_rsim n1 rG1 n2 rG2) (_ : @mx_irreducible gT G n1 rG1), @mx_irreducible gT G n2 rG2 *)
case/mx_rsim_sym=> f def_n2; rewrite {n2}def_n2 in f rG2 * => injf homf.
(* Goal: forall _ : @mx_irreducible gT G n1 rG1, @mx_irreducible gT G n1 rG2 *)
case/mx_irrP=> n1_gt0 minG; apply/mx_irrP; split=> // U modU nzU.
(* Goal: is_true (@row_full F n1 n1 U) *)
rewrite /row_full -(mxrankMfree _ injf) -genmxE.
(* Goal: is_true (@eq_op nat_eqType (@mxrank F n1 n1 (@genmx F n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 U f))) n1) *)
apply: minG; last by rewrite -mxrank_eq0 genmxE mxrankMfree // mxrank_eq0.
(* Goal: is_true (@mxmodule gT G n1 rG1 n1 (@genmx F n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 U f))) *)
rewrite (eqmx_module _ (genmxE _)); apply/mxmoduleP=> x Gx.
(* Goal: is_true (@submx F n1 n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 U f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n1 rG1 x)) (@mulmx (GRing.Field.ringType F) n1 n1 n1 U f)) *)
by rewrite -mulmxA -homf // mulmxA submxMr // (mxmoduleP modU).
Qed.
Lemma mx_rsim_abs_irr n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
mx_rsim rG1 rG2 ->
mx_absolutely_irreducible rG1 = mx_absolutely_irreducible rG2.
Lemma rker_mx_rsim n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
mx_rsim rG1 rG2 -> rker rG1 = rker rG2.
Proof.
(* Goal: forall _ : @mx_rsim n1 rG1 n2 rG2, @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rker (GRing.Field.comUnitRingType F) gT G n1 rG1) (@rker (GRing.Field.comUnitRingType F) gT G n2 rG2) *)
case=> f def_n2; rewrite -{n2}def_n2 in f rG2 *.
rewrite row_free_unit => injf homf.
apply/setP=> x; rewrite !inE !mul1mx; apply: andb_id2l => Gx.
by rewrite -(can_eq (mulmxK injf)) homf // -scalar_mxC (can_eq (mulKmx injf)).
Qed.
Qed.
Lemma mx_rsim_faithful n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
mx_rsim rG1 rG2 -> mx_faithful rG1 = mx_faithful rG2.
Proof.
(* Goal: forall _ : @mx_rsim n1 rG1 n2 rG2, @eq bool (@mx_faithful (GRing.Field.comUnitRingType F) gT G n1 rG1) (@mx_faithful (GRing.Field.comUnitRingType F) gT G n2 rG2) *)
by move=> simG12; rewrite /mx_faithful (rker_mx_rsim simG12).
Qed.
Lemma mx_rsim_factmod n (rG : reprG n) U V
(modU : mxmodule rG U) (modV : mxmodule rG V) :
(U + V :=: 1%:M)%MS -> mxdirect (U + V) ->
mx_rsim (factmod_repr modV) (submod_repr modU).
Lemma mxtrace_rsim n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
mx_rsim rG1 rG2 -> {in G, forall x, \tr (rG1 x) = \tr (rG2 x)}.
Proof.
(* Goal: forall _ : @mx_rsim n1 rG1 n2 rG2, @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n1 rG1 x)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n2 rG2 x))) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n1 rG1 x)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n2 rG2 x)))) *)
case/mx_rsim_def=> B [B' B'B def_rG1] x Gx.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n1 rG1 x)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n2 rG2 x)) *)
by rewrite def_rG1 // mxtrace_mulC mulmxA B'B mul1mx.
Qed.
Lemma mx_rsim_scalar n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) x c :
x \in G -> mx_rsim rG1 rG2 -> rG1 x = c%:M -> rG2 x = c%:M.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : @mx_rsim n1 rG1 n2 rG2) (_ : @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n1 n1) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n1 rG1 x) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 c)), @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n2 n2) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n2 rG2 x) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 c) *)
move=> Gx /mx_rsim_sym[B _ Bfree rG2_B] rG1x.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n2 n2) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n2 rG2 x) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n2 c) *)
by apply: (row_free_inj Bfree); rewrite rG2_B // rG1x scalar_mxC.
Qed.
End Similarity.
Section Socle.
Variables (gT : finGroupType) (G : {group gT}).
Variables (n : nat) (rG : mx_representation F G n) (sG : socleType rG).
Lemma socle_irr (W : sG) : mx_irreducible (socle_repr W).
Proof.
(* Goal: @mx_irreducible gT G (@mxrank F n n (@socle_base gT G n rG sG W)) (@socle_repr gT G n rG sG W) *)
by apply/submod_mx_irr; apply: socle_simple.
Qed.
Lemma socle_rsimP (W1 W2 : sG) :
reflect (mx_rsim (socle_repr W1) (socle_repr W2)) (W1 == W2).
Proof.
(* Goal: Bool.reflect (@mx_rsim gT G (@mxrank F n n (@socle_base gT G n rG sG W1)) (@socle_repr gT G n rG sG W1) (@mxrank F n n (@socle_base gT G n rG sG W2)) (@socle_repr gT G n rG sG W2)) (@eq_op (@socle_eqType gT G n rG sG) W1 W2) *)
have [simW1 simW2] := (socle_simple W1, socle_simple W2).
(* Goal: Bool.reflect (@mx_rsim gT G (@mxrank F n n (@socle_base gT G n rG sG W1)) (@socle_repr gT G n rG sG W1) (@mxrank F n n (@socle_base gT G n rG sG W2)) (@socle_repr gT G n rG sG W2)) (@eq_op (@socle_eqType gT G n rG sG) W1 W2) *)
by apply: (iffP (component_mx_isoP simW1 simW2)); move/mx_rsim_iso; apply.
Qed.
Local Notation mG U := (mxmodule rG U).
Local Notation sr modV := (submod_repr modV).
Lemma mx_rsim_in_submod U V (modU : mG U) (modV : mG V) :
let U' := <<in_submod V U>>%MS in
(U <= V)%MS ->
exists modU' : mxmodule (sr modV) U', mx_rsim (sr modU) (sr modU').
Proof.
(* Goal: let U' := @genmx F n (@mxrank F n n V) (@in_submod n V n U) in forall _ : is_true (@submx F n n n U V), @ex (is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U')) (fun modU' : is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U') => @mx_rsim gT G (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU')) *)
move=> U' sUV; have modU': mxmodule (sr modV) U'.
(* Goal: @ex (is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U')) (fun modU' : is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U') => @mx_rsim gT G (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU')) *)
(* Goal: is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U') *)
by rewrite (eqmx_module _ (genmxE _)) in_submod_module.
(* Goal: @ex (is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U')) (fun modU' : is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U') => @mx_rsim gT G (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU')) *)
have rankU': \rank U = \rank U' by rewrite genmxE mxrank_in_submod.
(* Goal: @ex (is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U')) (fun modU' : is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U') => @mx_rsim gT G (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU')) *)
pose v1 := val_submod 1%:M; pose U1 := v1 _ U.
(* Goal: @ex (is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U')) (fun modU' : is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U') => @mx_rsim gT G (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU')) *)
have sU1V: (U1 <= V)%MS by rewrite val_submod1.
(* Goal: @ex (is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U')) (fun modU' : is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U') => @mx_rsim gT G (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU')) *)
have sU1U': (in_submod V U1 <= U')%MS by rewrite genmxE submxMr ?val_submod1.
(* Goal: @ex (is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U')) (fun modU' : is_true (@mxmodule gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) (@mxrank F n n V) U') => @mx_rsim gT G (@mxrank F n n U) (@submod_repr gT G n rG U modU) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU')) *)
exists modU', (in_submod U' (in_submod V U1)) => // [|x Gx].
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU') x)) *)
(* Goal: is_true (@row_free F (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1))) *)
apply/row_freeP; exists (v1 _ _ *m v1 _ _ *m in_submod U 1%:M).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU') x)) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@mxrank F n n U) (@mxrank F n n U)) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@mxrank F n n U) (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1)) (@mulmx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') n (@mxrank F n n U) (@mulmx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@mxrank F n n V) n (v1 (@mxrank F n n V) U') (v1 n V)) (@in_submod n U n (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F))) *)
by rewrite 2!mulmxA -in_submodE -!val_submodE !in_submodK ?val_submodK.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@submod_repr gT G (@mxrank F n n V) (@submod_repr gT G n rG V modV) U' modU') x)) *)
rewrite -!in_submodJ // -(val_submodJ modU) // mul1mx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) (@mxrank F (@mxrank F n n V) (@mxrank F n n V) U') (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) U1))) (@in_submod (@mxrank F n n V) U' (@mxrank F n n U) (@in_submod n V (@mxrank F n n U) (@val_submod n U (@mxrank F n n U) (@submod_mx gT G n rG U modU x)))) *)
by rewrite 2!{1}in_submodE mulmxA (mulmxA _ U1) -val_submodE -!in_submodE.
Qed.
Lemma rsim_submod1 U (modU : mG U) : (U :=: 1%:M)%MS -> mx_rsim (sr modU) rG.
Proof.
(* Goal: forall _ : @eqmx F n n n U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))), @mx_rsim gT G (@mxrank F n n U) (@submod_repr gT G n rG U modU) n rG *)
move=> U1; exists (val_submod 1%:M) => [||x Gx]; first by rewrite U1 mxrank1.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F))))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* Goal: is_true (@row_free F (@mxrank F n n U) n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F))))) *)
by rewrite /row_free val_submod1.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F n n U) n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@mxrank F n n U) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x) (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F))))) (@mulmx (GRing.Field.ringType F) (@mxrank F n n U) n n (@val_submod n U (@mxrank F n n U) (@scalar_mx (GRing.Field.ringType F) (@mxrank F n n U) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by rewrite -(val_submodJ modU) // mul1mx -val_submodE.
Qed.
Lemma mxtrace_submod1 U (modU : mG U) :
(U :=: 1%:M)%MS -> {in G, forall x, \tr (sr modU x) = \tr (rG x)}.
Proof.
(* Goal: forall _ : @eqmx F n n n U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))), @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n U) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n U) (@submod_repr gT G n rG U modU) x)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) *)
by move=> defU; apply: mxtrace_rsim (rsim_submod1 modU defU).
Qed.
Lemma mxtrace_dadd_mod U V W (modU : mG U) (modV : mG V) (modW : mG W) :
(U + V :=: W)%MS -> mxdirect (U + V) ->
{in G, forall x, \tr (sr modU x) + \tr (sr modV x) = \tr (sr modW x)}.
Lemma mxtrace_dsum_mod (I : finType) (P : pred I) U W
(modU : forall i, mG (U i)) (modW : mG W) :
let S := (\sum_(i | P i) U i)%MS in (S :=: W)%MS -> mxdirect S ->
{in G, forall x, \sum_(i | P i) \tr (sr (modU i) x) = \tr (sr modW x)}.
Proof.
(* Goal: let S := @BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (P i) (U i)) in forall (_ : @eqmx F n n n S W) (_ : is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum F n n (U i)))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) S))), @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort I) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort I) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (P i) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (U i)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (U i)) (@submod_repr gT G n rG (U i) (modU i)) x)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n W) (@submod_repr gT G n rG W modW) x))) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort I) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort I) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (P i) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (U i)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (U i)) (@submod_repr gT G n rG (U i) (modU i)) x)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n W) (@submod_repr gT G n rG W modW) x)))) *)
move=> /= sumS dxS x Gx.
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Field.sort F) (Finite.sort I) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Field.sort F) (Finite.sort I) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (P i) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (U i)) (@submod_mx gT G n rG (U i) (modU i) x)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n W) (@submod_mx gT G n rG W modW x)) *)
elim: {P}_.+1 {-2}P (ltnSn #|P|) => // m IHm P lePm in W modW sumS dxS *.
have [j /= Pj | P0] := pickP P; last first.
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Field.sort F) (Finite.sort I) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Field.sort F) (Finite.sort I) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (P i) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (U i)) (@submod_mx gT G n rG (U i) (modU i) x)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n W) (@submod_mx gT G n rG W modW x)) *)
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Field.sort F) (Finite.sort I) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Field.sort F) (Finite.sort I) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (P i) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (U i)) (@submod_mx gT G n rG (U i) (modU i) x)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n W) (@submod_mx gT G n rG W modW x)) *)
case: sumS (_ x); rewrite !big_pred0 // mxrank0 => <- _ rWx.
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Field.sort F) (Finite.sort I) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Field.sort F) (Finite.sort I) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (P i) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (U i)) (@submod_mx gT G n rG (U i) (modU i) x)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n W) (@submod_mx gT G n rG W modW x)) *)
(* Goal: @eq (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) O rWx) *)
by rewrite [rWx]flatmx0 linear0.
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Field.sort F) (Finite.sort I) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Field.sort F) (Finite.sort I) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (P i) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (U i)) (@submod_mx gT G n rG (U i) (modU i) x)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n W) (@submod_mx gT G n rG W modW x)) *)
rewrite ltnS (cardD1x Pj) in lePm.
rewrite mxdirectE /= !(bigD1 j Pj) -mxdirectE mxdirect_addsE /= in dxS sumS *.
have [_ dxW' dxW] := and3P dxS; rewrite (sameP eqP mxdirect_addsP) in dxW.
rewrite (IHm _ _ _ (sumsmx_module _ (fun i _ => modU i)) (eqmx_refl _)) //.
exact: mxtrace_dadd_mod.
Qed.
Qed.
Lemma mxtrace_component U (simU : mxsimple rG U) :
let V := component_mx rG U in
let modV := component_mx_module rG U in let modU := mxsimple_module simU in
{in G, forall x, \tr (sr modV x) = \tr (sr modU x) *+ (\rank V %/ \rank U)}.
Lemma mxtrace_Socle : let modS := Socle_module sG in
{in G, forall x,
\tr (sr modS x) = \sum_(W : sG) \tr (socle_repr W x) *+ socle_mult W}.
Proof.
(* Goal: let modS : is_true (@mxmodule gT G n rG n (@Socle gT G n rG sG)) := @Socle_module gT G n rG sG in @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@Socle gT G n rG sG)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@Socle gT G n rG sG)) (@submod_repr gT G n rG (@Socle gT G n rG sG) modS) x)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G n rG sG)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G n rG sG)) (fun W : @socle_sort gT G n rG sG => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@socle_sort gT G n rG sG) W (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@socle_base gT G n rG sG W)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@socle_base gT G n rG sG W)) (@socle_repr gT G n rG sG W) x)) (@socle_mult gT G n rG sG W))))) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@Socle gT G n rG sG)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@Socle gT G n rG sG)) (@submod_repr gT G n rG (@Socle gT G n rG sG) modS) x)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G n rG sG)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G n rG sG)) (fun W : @socle_sort gT G n rG sG => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@socle_sort gT G n rG sG) W (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@socle_base gT G n rG sG W)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@socle_base gT G n rG sG W)) (@socle_repr gT G n rG sG W) x)) (@socle_mult gT G n rG sG W)))))) *)
move=> /= x Gx /=; pose modW (W : sG) := component_mx_module rG (socle_base W).
(* Goal: @eq (GRing.Field.sort F) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@Socle gT G n rG sG)) (@submod_mx gT G n rG (@Socle gT G n rG sG) (@Socle_module gT G n rG sG) x)) (@BigOp.bigop (GRing.Field.sort F) (@socle_sort gT G n rG sG) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G n rG sG)) (fun W : @socle_sort gT G n rG sG => @BigBody (GRing.Field.sort F) (@socle_sort gT G n rG sG) W (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@socle_base gT G n rG sG W)) (@submod_mx gT G n rG (@socle_base gT G n rG sG W) (@socle_module gT G n rG sG W) x)) (@socle_mult gT G n rG sG W)))) *)
rewrite -(mxtrace_dsum_mod modW _ (eqmx_refl _) (Socle_direct sG)) //.
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G n rG sG)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G n rG sG)) (fun i : Finite.sort (@socle_finType gT G n rG sG) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G n rG sG)) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@component_mx gT G n rG (@socle_base gT G n rG sG i))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@component_mx gT G n rG (@socle_base gT G n rG sG i))) (@submod_repr gT G n rG (@component_mx gT G n rG (@socle_base gT G n rG sG i)) (modW i)) x)))) (@BigOp.bigop (GRing.Field.sort F) (@socle_sort gT G n rG sG) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G n rG sG)) (fun W : @socle_sort gT G n rG sG => @BigBody (GRing.Field.sort F) (@socle_sort gT G n rG sG) W (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F n n (@socle_base gT G n rG sG W)) (@submod_mx gT G n rG (@socle_base gT G n rG sG W) (@socle_module gT G n rG sG W) x)) (@socle_mult gT G n rG sG W)))) *)
by apply: eq_bigr => W _; rewrite (mxtrace_component (socle_simple W)).
Qed.
End Socle.
Section Clifford.
Variables (gT : finGroupType) (G H : {group gT}).
Hypothesis nsHG : H <| G.
Variables (n : nat) (rG : mx_representation F G n).
Let sHG := normal_sub nsHG.
Let nHG := normal_norm nsHG.
Let rH := subg_repr rG sHG.
Lemma Clifford_simple M x : mxsimple rH M -> x \in G -> mxsimple rH (M *m rG x).
Proof.
(* Goal: forall (_ : @mxsimple gT H n rH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @mxsimple gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
have modmG m U y: y \in G -> (mxmodule rH) m U -> mxmodule rH (U *m rG y).
(* Goal: forall (_ : @mxsimple gT H n rH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @mxsimple gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* 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))))) (_ : is_true (@mxmodule gT H n rH m U)), is_true (@mxmodule gT H n rH m (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y))) *)
move=> Gy modU; apply/mxmoduleP=> h Hh; have Gh := subsetP sHG h Hh.
(* Goal: forall (_ : @mxsimple gT H n rH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @mxsimple gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* Goal: is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT H) n rH h)) (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y))) *)
rewrite -mulmxA -repr_mxM // conjgCV repr_mxM ?groupJ ?groupV // mulmxA.
(* Goal: forall (_ : @mxsimple gT H n rH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @mxsimple gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* Goal: is_true (@submx F m m n (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@conjg gT h (@invg (FinGroup.base gT) y)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (@mulmx (GRing.Field.ringType F) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y))) *)
by rewrite submxMr ?(mxmoduleP modU) // -mem_conjg (normsP nHG).
(* Goal: forall (_ : @mxsimple gT H n rH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @mxsimple gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
have nzmG m y (U : 'M_(m, n)): y \in G -> (U *m rG y == 0) = (U == 0).
(* Goal: forall (_ : @mxsimple gT H n rH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @mxsimple gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* 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 bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) m n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) m n))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) m n) U (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) m n))) *)
by move=> Gy; rewrite -{1}(mul0mx m (rG y)) (can_eq (repr_mxK rG Gy)).
(* Goal: forall (_ : @mxsimple gT H n rH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @mxsimple gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
case=> [modM nzM simM] Gx; have Gx' := groupVr Gx.
(* Goal: @mxsimple gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
split=> [||U modU sUMx nzU]; rewrite ?modmG ?nzmG //.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) U) *)
rewrite -(repr_mxKV rG Gx U) submxMr //.
(* Goal: is_true (@submx F n n n M (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@invg (FinGroup.base gT) x)))) *)
by rewrite (simM (U *m _)) ?modmG ?nzmG // -(repr_mxK rG Gx M) submxMr.
Qed.
Lemma Clifford_hom x m (U : 'M_(m, n)) :
x \in 'C_G(H) -> (U <= dom_hom_mx rH (rG x))%MS.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT H)))))), is_true (@submx F m n n U (@dom_hom_mx gT H n rH (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) *)
case/setIP=> Gx cHx; apply/rV_subP=> v _{U}.
(* Goal: is_true (@submx F (S O) n n v (@dom_hom_mx gT H n rH (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) *)
apply/hom_mxP=> h Hh; have Gh := subsetP sHG h Hh.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (S O) n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) n n v (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT H) n rH h)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) n n v (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT H) n rH h)) *)
by rewrite -!mulmxA /= -!repr_mxM // (centP cHx).
Qed.
Lemma Clifford_iso x U : x \in 'C_G(H) -> mx_iso rH U (U *m rG x).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT H)))))), @mx_iso gT H n rH U (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
move=> cHx; have [Gx _] := setIP cHx.
(* Goal: @mx_iso gT H n rH U (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by exists (rG x); rewrite ?repr_mx_unit ?Clifford_hom.
Qed.
Lemma Clifford_iso2 x U V :
mx_iso rH U V -> x \in G -> mx_iso rH (U *m rG x) (V *m rG x).
Proof.
(* Goal: forall (_ : @mx_iso gT H n rH U V) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @mx_iso gT H n rH (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.Field.ringType F) n n n V (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
case=> [f injf homUf defV] Gx; have Gx' := groupVr Gx.
(* Goal: @mx_iso gT H n rH (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.Field.ringType F) n n n V (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
pose fx := rG (x^-1)%g *m f *m rG x; exists fx; last 1 first.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@dom_hom_mx gT H n rH fx)) *)
(* Goal: is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) fx (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) fx) (@mulmx (GRing.Field.ringType F) n n n V (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
-
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@dom_hom_mx gT H n rH fx)) *)
(* Goal: is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) fx (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
(* Goal: @eqmx F n n n (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) fx) (@mulmx (GRing.Field.ringType F) n n n V (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by rewrite !mulmxA repr_mxK //; apply: eqmxMr.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@dom_hom_mx gT H n rH fx)) *)
(* Goal: is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) fx (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
-
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@dom_hom_mx gT H n rH fx)) *)
(* Goal: is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) fx (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
by rewrite !unitmx_mul andbC !repr_mx_unit.
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@dom_hom_mx gT H n rH fx)) *)
apply/hom_mxP=> h Hh; have Gh := subsetP sHG h Hh.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT H) n rH h)) fx) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) fx) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT H) n rH h)) *)
rewrite -(mulmxA U) -repr_mxM // conjgCV repr_mxM ?groupJ // !mulmxA.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@conjg gT h (@invg (FinGroup.base gT) x)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@invg (FinGroup.base gT) x))) f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.Field.ringType F) n n n U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@invg (FinGroup.base gT) x))) f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT H) n rH h)) *)
rewrite !repr_mxK // (hom_mxP homUf) -?mem_conjg ?(normsP nHG) //=.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@conjg gT h (@invg (FinGroup.base gT) x)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n U f) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG h)) *)
by rewrite !repr_mxM ?invgK ?groupM // !mulmxA repr_mxKV.
Qed.
Lemma Clifford_componentJ M x :
mxsimple rH M -> x \in G ->
(component_mx rH (M *m rG x) :=: component_mx rH M *m rG x)%MS.
Proof.
(* Goal: forall (_ : @mxsimple gT H n rH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eqmx F n n n (@component_mx gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@mulmx (GRing.Field.ringType F) n n n (@component_mx gT H n rH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
set simH := mxsimple rH; set cH := component_mx rH.
(* Goal: forall (_ : simH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eqmx F n n n (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
have actG: {in G, forall y M, simH M -> cH M *m rG y <= cH (M *m rG y)}%MS.
(* Goal: forall (_ : simH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eqmx F n n n (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun y : FinGroup.arg_sort (FinGroup.base gT) => forall (M : matrix (GRing.Field.sort F) n n) (_ : simH M), is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y))))) (inPhantom (forall (y : FinGroup.arg_sort (FinGroup.base gT)) (M : matrix (GRing.Field.sort F) n n) (_ : simH M), is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)))))) *)
move=> {M} y Gy /= M simM; have [I [U isoU def_cHM]] := component_mx_def simM.
(* Goal: forall (_ : simH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eqmx F n n n (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)))) *)
rewrite /cH def_cHM sumsmxMr; apply/sumsmx_subP=> i _.
(* Goal: forall (_ : simH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eqmx F n n n (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
(* Goal: is_true (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (U i) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)) (@component_mx gT H n rH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG y)))) *)
by apply: mx_iso_component; [apply: Clifford_simple | apply: Clifford_iso2].
(* Goal: forall (_ : simH M) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eqmx F n n n (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
move=> simM Gx; apply/eqmxP; rewrite actG // -/cH.
(* Goal: is_true (andb (@submx F n n n (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@mulmx (GRing.Field.ringType F) n n n (cH M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) true) *)
rewrite -{1}[cH _](repr_mxKV rG Gx) submxMr // -{2}[M](repr_mxK rG Gx).
(* Goal: is_true (@submx F n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (cH (@mulmx (GRing.Field.ringType F) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@invg (FinGroup.base gT) x))) (cH (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG (@invg (FinGroup.base gT) x))))) *)
by rewrite actG ?groupV //; apply: Clifford_simple.
Qed.
Hypothesis irrG : mx_irreducible rG.
Lemma Clifford_basis M : mxsimple rH M ->
{X : {set gT} | X \subset G &
let S := \sum_(x in X) M *m rG x in S :=: 1%:M /\ mxdirect S}%MS.
Variable sH : socleType rH.
Definition Clifford_act (W : sH) x :=
let Gx := subgP (subg G x) in
PackSocle (component_socle sH (Clifford_simple (socle_simple W) Gx)).
Let valWact W x : (Clifford_act W x :=: W *m rG (sgval (subg G x)))%MS.
Fact Clifford_is_action : is_action G Clifford_act.
Definition Clifford_action := Action Clifford_is_action.
Local Notation "'Cl" := Clifford_action (at level 8) : action_scope.
Lemma val_Clifford_act W x : x \in G -> ('Cl%act W x :=: W *m rG x)%MS.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eqmx F n n n (@socle_val gT H n rH sH (@act gT (@gval gT G) (@socle_sort gT H n rH sH) Clifford_action W x)) (@mulmx (GRing.Field.ringType F) n n n (@socle_val gT H n rH sH W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) *)
by move=> Gx; apply: eqmx_trans (valWact _ _) _; rewrite subgK.
Qed.
Lemma Clifford_atrans : [transitive G, on [set: sH] | 'Cl].
Lemma Clifford_Socle1 : Socle sH = 1%:M.
Lemma Clifford_rank_components (W : sH) : (#|sH| * \rank W)%N = n.
Proof.
(* Goal: @eq nat (muln (@card (@socle_finType gT H n rH sH) (@mem (@socle_sort gT H n rH sH) (predPredType (@socle_sort gT H n rH sH)) (@sort_of_simpl_pred (@socle_sort gT H n rH sH) (pred_of_argType (@socle_sort gT H n rH sH))))) (@mxrank F n n (@socle_val gT H n rH sH W))) n *)
rewrite -{9}(mxrank1 F n) -Clifford_Socle1.
(* Goal: @eq nat (muln (@card (@socle_finType gT H n rH sH) (@mem (@socle_sort gT H n rH sH) (predPredType (@socle_sort gT H n rH sH)) (@sort_of_simpl_pred (@socle_sort gT H n rH sH) (pred_of_argType (@socle_sort gT H n rH sH))))) (@mxrank F n n (@socle_val gT H n rH sH W))) (@mxrank F n n (@Socle gT H n rH sH)) *)
rewrite (mxdirectP (Socle_direct sH)) /= -sum_nat_const.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (@socle_finType gT H n rH sH)) O (index_enum (@socle_finType gT H n rH sH)) (fun i : Finite.sort (@socle_finType gT H n rH sH) => @BigBody nat (Finite.sort (@socle_finType gT H n rH sH)) i addn (@in_mem (Finite.sort (@socle_finType gT H n rH sH)) i (@mem (Finite.sort (@socle_finType gT H n rH sH)) (predPredType (Finite.sort (@socle_finType gT H n rH sH))) (@sort_of_simpl_pred (@socle_sort gT H n rH sH) (pred_of_argType (@socle_sort gT H n rH sH))))) (@mxrank F n n (@socle_val gT H n rH sH W)))) (@BigOp.bigop nat (@socle_sort gT H n rH sH) O (index_enum (@socle_finType gT H n rH sH)) (fun j : @socle_sort gT H n rH sH => @BigBody nat (@socle_sort gT H n rH sH) j addn true (@mxrank F n n (@socle_val gT H n rH sH j)))) *)
apply: eq_bigr => W1 _; have [W0 _ W0G] := imsetP Clifford_atrans.
(* Goal: @eq nat (@mxrank F n n (@socle_val gT H n rH sH W)) (@mxrank F n n (@socle_val gT H n rH sH W1)) *)
have{W0G} W0G W': W' \in orbit 'Cl G W0 by rewrite -W0G inE.
(* Goal: @eq nat (@mxrank F n n (@socle_val gT H n rH sH W)) (@mxrank F n n (@socle_val gT H n rH sH W1)) *)
have [/orbitP[x Gx <-] /orbitP[y Gy <-]] := (W0G W, W0G W1).
(* Goal: @eq nat (@mxrank F n n (@socle_val gT H n rH sH (@act gT (@gval gT G) (Finite.sort (@socle_finType gT H n rH sH)) Clifford_action W0 x))) (@mxrank F n n (@socle_val gT H n rH sH (@act gT (@gval gT G) (Finite.sort (@socle_finType gT H n rH sH)) Clifford_action W0 y))) *)
by rewrite !{1}val_Clifford_act // !mxrankMfree // !repr_mx_free.
Qed.
Theorem Clifford_component_basis M : mxsimple rH M ->
{t : nat & {x_ : sH -> 'I_t -> gT |
forall W, let sW := (\sum_j M *m rG (x_ W j))%MS in
[/\ forall j, x_ W j \in G, (sW :=: W)%MS & mxdirect sW]}}.
Lemma Clifford_astab : H <*> 'C_G(H) \subset 'C([set: sH] | 'Cl).
Lemma Clifford_astab1 (W : sH) : 'C[W | 'Cl] = rstabs rG W.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@gval gT G) (@socle_finType gT H n rH sH) (@set1 (@socle_finType gT H n rH sH) W) Clifford_action) (@rstabs gT G n rG n (@socle_val gT H n rH sH W)) *)
apply/setP=> x; rewrite !inE; apply: andb_id2l => Gx.
(* Goal: @eq bool (@subset (@socle_finType gT H n rH sH) (@mem (Finite.sort (@socle_finType gT H n rH sH)) (predPredType (Finite.sort (@socle_finType gT H n rH sH))) (@SetDef.pred_of_set (@socle_finType gT H n rH sH) (@set1 (@socle_finType gT H n rH sH) W))) (@mem (Finite.sort (@socle_finType gT H n rH sH)) (predPredType (Finite.sort (@socle_finType gT H n rH sH))) (@SetDef.pred_of_set (@socle_finType gT H n rH sH) (@SetDef.finset (@socle_finType gT H n rH sH) (fun x0 : Finite.sort (@socle_finType gT H n rH sH) => @eq_op (Finite.eqType (@socle_finType gT H n rH sH)) (@act gT (@gval gT G) (Finite.sort (@socle_finType gT H n rH sH)) Clifford_action x0 x) x0))))) (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (@socle_val gT H n rH sH W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@socle_val gT H n rH sH W)) *)
rewrite sub1set inE (sameP eqP socleP) !val_Clifford_act //.
(* Goal: @eq bool (andb (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (@socle_val gT H n rH sH W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@socle_val gT H n rH sH W)) (@submx F n n n (@socle_val gT H n rH sH W) (@mulmx (GRing.Field.ringType F) n n n (@socle_val gT H n rH sH W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)))) (@submx F n n n (@mulmx (GRing.Field.ringType F) n n n (@socle_val gT H n rH sH W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x)) (@socle_val gT H n rH sH W)) *)
rewrite andb_idr // => sWxW; rewrite -mxrank_leqif_sup //.
(* Goal: is_true (@eq_op nat_eqType (@mxrank F n n (@mulmx (GRing.Field.ringType F) n n n (@socle_val gT H n rH sH W) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG x))) (@mxrank F n n (@socle_val gT H n rH sH W))) *)
by rewrite mxrankMfree ?repr_mx_free.
Qed.
Lemma Clifford_rstabs_simple (W : sH) :
mxsimple (subg_repr rG (rstabs_sub rG W)) W.
End Clifford.
Section JordanHolder.
Variables (gT : finGroupType) (G : {group gT}).
Variables (n : nat) (rG : mx_representation F G n).
Local Notation modG := ((mxmodule rG) n).
Lemma section_module (U V : 'M_n) (modU : modG U) (modV : modG V) :
mxmodule (factmod_repr modU) <<in_factmod U V>>%MS.
Proof.
(* Goal: is_true (@mxmodule gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) *)
by rewrite (eqmx_module _ (genmxE _)) in_factmod_module addsmx_module.
Qed.
Definition section_repr U V (modU : modG U) (modV : modG V) :=
submod_repr (section_module modU modV).
Lemma mx_factmod_sub U modU :
mx_rsim (@section_repr U _ modU (mxmodule1 rG)) (factmod_repr modU).
Proof.
(* Goal: @mx_rsim gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@section_repr U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) modU (@mxmodule1 gT G n rG)) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) *)
exists (val_submod 1%:M) => [||x Gx].
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@section_repr U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) modU (@mxmodule1 gT G n rG)) x) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) (@mulmx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) x)) *)
(* Goal: is_true (@row_free F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: @eq nat (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) *)
-
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@section_repr U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) modU (@mxmodule1 gT G n rG)) x) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) (@mulmx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) x)) *)
(* Goal: is_true (@row_free F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: @eq nat (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) *)
apply: (@addIn (\rank U)); rewrite genmxE mxrank_in_factmod mxrank_coker.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@section_repr U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) modU (@mxmodule1 gT G n rG)) x) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) (@mulmx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) x)) *)
(* Goal: is_true (@row_free F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: @eq nat (@mxrank F n n (@addsmx F n n n U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (addn (subn n (@mxrank F n n U)) (@mxrank F n n U)) *)
by rewrite (addsmx_idPr (submx1 U)) mxrank1 subnK ?rank_leq_row.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@section_repr U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) modU (@mxmodule1 gT G n rG)) x) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) (@mulmx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) x)) *)
(* Goal: is_true (@row_free F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) *)
-
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@section_repr U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) modU (@mxmodule1 gT G n rG)) x) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) (@mulmx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) x)) *)
(* Goal: is_true (@row_free F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) *)
by rewrite /row_free val_submod1.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@section_repr U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) modU (@mxmodule1 gT G n rG)) x) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F))))) (@mulmx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (GRing.one (GRing.Field.ringType F)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) x)) *)
by rewrite -[_ x]mul1mx -val_submodE val_submodJ.
Qed.
Definition max_submod (U V : 'M_n) :=
(U < V)%MS /\ (forall W, ~ [/\ modG W, U < W & W < V])%MS.
Lemma max_submodP U V (modU : modG U) (modV : modG V) :
(U <= V)%MS -> (max_submod U V <-> mx_irreducible (section_repr modU modV)).
Proof.
(* Goal: forall _ : is_true (@submx F n n n U V), iff (max_submod U V) (@mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV)) *)
move=> sUV; split=> [[ltUV maxU] | ].
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV) *)
apply/mx_irrP; split=> [|WU modWU nzWU].
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@row_full F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU) *)
(* Goal: is_true (leq (S O) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)))) *)
by rewrite genmxE lt0n mxrank_eq0 in_factmod_eq0; case/andP: ltUV.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@row_full F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU) *)
rewrite -sub1mx -val_submodS val_submod1 genmxE.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@submx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU)) *)
pose W := (U + val_factmod (val_submod WU))%MS.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@submx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU)) *)
suffices sVW: (V <= W)%MS.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@submx F n n n V W) *)
(* Goal: is_true (@submx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU)) *)
rewrite {2}in_factmodE (submx_trans (submxMr _ sVW)) //.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@submx F n n n V W) *)
(* Goal: is_true (@submx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U)) (@mulmx (GRing.Field.ringType F) n n (@mxrank F n n (@cokermx F n n U)) W (@in_factmod n U n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU)) *)
rewrite addsmxMr -!in_factmodE val_factmodK.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@submx F n n n V W) *)
(* Goal: is_true (@submx F (@mxrank F n n (@cokermx F n n U)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U)) (@addsmx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n U) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU)) *)
by rewrite ((in_factmod U U =P 0) _) ?adds0mx ?in_factmod_eq0.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@submx F n n n V W) *)
move/and3P: {maxU}(maxU W); apply: contraR; rewrite /ltmx addsmxSl => -> /=.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (andb (@mxmodule gT G n rG n W) (andb (negb (@submx F n n n W U)) (andb (@submx F n n n W V) true))) *)
move: modWU; rewrite /mxmodule rstabs_submod rstabs_factmod => -> /=.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (andb (negb (@submx F n n n W U)) (andb (@submx F n n n W V) true)) *)
rewrite addsmx_sub submx_refl -in_factmod_eq0 val_factmodK.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (andb (negb (andb true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U))) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U))))))) (andb (@submx F n n n W V) true)) *)
move: nzWU; rewrite -[_ == 0](inj_eq val_submod_inj) linear0 => ->.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (andb true (andb (@submx F n n n W V) true)) *)
rewrite -(in_factmodsK sUV) addsmxS // val_factmodS.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
(* Goal: is_true (@submx F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) n (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) WU) (@in_factmod n U n V)) *)
by rewrite -(genmxE (in_factmod U V)) val_submodP.
(* Goal: forall _ : @mx_irreducible gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV), max_submod U V *)
case/mx_irrP; rewrite lt0n {1}genmxE mxrank_eq0 in_factmod_eq0 => ltUV maxV.
(* Goal: max_submod U V *)
split=> // [|W [modW /andP[sUW ltUW] /andP[sWV /negP[]]]]; first exact/andP.
(* Goal: is_true (@submx F n n n V W) *)
rewrite -(in_factmodsK sUV) -(in_factmodsK sUW) addsmxS // val_factmodS.
(* Goal: is_true (@submx F n n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V) (@in_factmod n U n W)) *)
rewrite -genmxE -val_submod1; set VU := <<_>>%MS.
(* Goal: is_true (@submx F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) n (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) VU (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (GRing.one (GRing.Field.ringType F)))) (@in_factmod n U n W)) *)
have sW_VU: (in_factmod U W <= VU)%MS.
(* Goal: is_true (@submx F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) n (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) VU (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (GRing.one (GRing.Field.ringType F)))) (@in_factmod n U n W)) *)
(* Goal: is_true (@submx F n (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n W) VU) *)
by rewrite genmxE -val_factmodS !submxMr.
(* Goal: is_true (@submx F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) n (@mxrank F n n (@cokermx F n n U)) (@val_submod (@mxrank F n n (@cokermx F n n U)) VU (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (GRing.one (GRing.Field.ringType F)))) (@in_factmod n U n W)) *)
rewrite -(in_submodK sW_VU) val_submodS -(genmxE (in_submod _ _)).
(* Goal: is_true (@submx F (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (GRing.one (GRing.Field.ringType F))) (@genmx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@in_submod (@mxrank F n n (@cokermx F n n U)) VU n (@in_factmod n U n W)))) *)
rewrite sub1mx maxV //.
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)))) (@genmx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@in_submod (@mxrank F n n (@cokermx F n n U)) VU n (@in_factmod n U n W))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))))))) *)
(* Goal: is_true (@mxmodule gT G (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@section_repr U V modU modV) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@genmx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@in_submod (@mxrank F n n (@cokermx F n n U)) VU n (@in_factmod n U n W)))) *)
rewrite (eqmx_module _ (genmxE _)) in_submod_module ?genmxE ?submxMr //.
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)))) (@genmx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@in_submod (@mxrank F n n (@cokermx F n n U)) VU n (@in_factmod n U n W))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))))))) *)
(* Goal: is_true (@mxmodule gT G (@mxrank F n n (@cokermx F n n U)) (@factmod_repr gT G n rG U modU) n (@in_factmod n U n W)) *)
by rewrite in_factmod_module addsmx_module.
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V)))) (@genmx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) VU) (@in_submod (@mxrank F n n (@cokermx F n n U)) VU n (@in_factmod n U n W))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))))))) *)
rewrite -submx0 [(_ <= 0)%MS]genmxE -val_submodS linear0 in_submodK //.
(* Goal: is_true (negb (@submx F n (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n W) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@mxrank F (@mxrank F n n (@cokermx F n n U)) (@mxrank F n n (@cokermx F n n U)) (@genmx F n (@mxrank F n n (@cokermx F n n U)) (@in_factmod n U n V))) (@mxrank F n n (@cokermx F n n U)))))) *)
by rewrite eqmx0 submx0 in_factmod_eq0.
Qed.
Lemma max_submod_eqmx U1 U2 V1 V2 :
(U1 :=: U2)%MS -> (V1 :=: V2)%MS -> max_submod U1 V1 -> max_submod U2 V2.
Proof.
(* Goal: forall (_ : @eqmx F n n n U1 U2) (_ : @eqmx F n n n V1 V2) (_ : max_submod U1 V1), max_submod U2 V2 *)
move=> eqU12 eqV12 [ltUV1 maxU1].
(* Goal: max_submod U2 V2 *)
by split=> [|W]; rewrite -(lt_eqmx eqU12) -(lt_eqmx eqV12).
Qed.
Definition mx_subseries := all modG.
Definition mx_composition_series V :=
mx_subseries V /\ (forall i, i < size V -> max_submod (0 :: V)`_i V`_i).
Local Notation mx_series := mx_composition_series.
Fact mx_subseries_module V i : mx_subseries V -> mxmodule rG V`_i.
Proof.
(* Goal: forall _ : is_true (mx_subseries V), is_true (@mxmodule gT G n rG n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V i)) *)
move=> modV; have [|leVi] := ltnP i (size V); first exact: all_nthP.
(* Goal: is_true (@mxmodule gT G n rG n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V i)) *)
by rewrite nth_default ?mxmodule0.
Qed.
Fact mx_subseries_module' V i : mx_subseries V -> mxmodule rG (0 :: V)`_i.
Proof.
(* Goal: forall _ : is_true (mx_subseries V), is_true (@mxmodule gT G n rG n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V) i)) *)
by move=> modV; rewrite mx_subseries_module //= mxmodule0.
Qed.
Definition subseries_repr V i (modV : all modG V) :=
section_repr (mx_subseries_module' i modV) (mx_subseries_module i modV).
Definition series_repr V i (compV : mx_composition_series V) :=
subseries_repr i (proj1 compV).
Lemma mx_series_lt V : mx_composition_series V -> path ltmx 0 V.
Proof.
(* Goal: forall _ : mx_composition_series V, is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V) *)
by case=> _ compV; apply/(pathP 0)=> i /compV[].
Qed.
Lemma max_size_mx_series (V : seq 'M[F]_n) :
path ltmx 0 V -> size V <= \rank (last 0 V).
Proof.
(* Goal: forall _ : is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V), is_true (leq (@size (matrix (GRing.Field.sort F) n n) V) (@mxrank F n n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V))) *)
rewrite -[size V]addn0 -(mxrank0 F n n); elim: V 0 => //= V1 V IHV V0.
(* Goal: forall _ : is_true (andb (@ltmx F n n n V0 V1) (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) V1 V)), is_true (leq (addn (S (@size (matrix (GRing.Field.sort F) n n) V)) (@mxrank F n n V0)) (@mxrank F n n (@last (matrix (GRing.Field.sort F) n n) V1 V))) *)
rewrite ltmxErank -andbA => /and3P[_ ltV01 ltV].
(* Goal: is_true (leq (addn (S (@size (matrix (GRing.Field.sort F) n n) V)) (@mxrank F n n V0)) (@mxrank F n n (@last (matrix (GRing.Field.sort F) n n) V1 V))) *)
by apply: leq_trans (IHV _ ltV); rewrite addSnnS leq_add2l.
Qed.
Lemma mx_series_repr_irr V i (compV : mx_composition_series V) :
i < size V -> mx_irreducible (series_repr i compV).
Lemma mx_series_rcons U V :
mx_series (rcons U V) <-> [/\ mx_series U, modG V & max_submod (last 0 U) V].
Proof.
(* Goal: iff (mx_composition_series (@rcons (matrix (GRing.Field.sort F) n n) U V)) (and3 (mx_composition_series U) (is_true (@mxmodule gT G n rG n V)) (max_submod (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V)) *)
rewrite /mx_series /mx_subseries all_rcons size_rcons -rcons_cons.
(* Goal: iff (and (is_true (andb (@mxmodule gT G n rG n V) (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U))) (forall (i : nat) (_ : is_true (leq (S i) (S (@size (matrix (GRing.Field.sort F) n n) U)))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V) i))) (and3 (and (is_true (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U)) (forall (i : nat) (_ : is_true (leq (S i) (@size (matrix (GRing.Field.sort F) n n) U))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i))) (is_true (@mxmodule gT G n rG n V)) (max_submod (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V)) *)
split=> [ [/andP[modU modV] maxU] | [[modU maxU] modV maxV]].
(* Goal: and (is_true (andb (@mxmodule gT G n rG n V) (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U))) (forall (i : nat) (_ : is_true (leq (S i) (S (@size (matrix (GRing.Field.sort F) n n) U)))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V) i)) *)
(* Goal: and3 (and (is_true (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U)) (forall (i : nat) (_ : is_true (leq (S i) (@size (matrix (GRing.Field.sort F) n n) U))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i))) (is_true (@mxmodule gT G n rG n V)) (max_submod (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V) *)
split=> //; last first.
(* Goal: and (is_true (andb (@mxmodule gT G n rG n V) (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U))) (forall (i : nat) (_ : is_true (leq (S i) (S (@size (matrix (GRing.Field.sort F) n n) U)))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V) i)) *)
(* Goal: and (is_true (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U)) (forall (i : nat) (_ : is_true (leq (S i) (@size (matrix (GRing.Field.sort F) n n) U))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i)) *)
(* Goal: max_submod (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V *)
by have:= maxU _ (leqnn _); rewrite !nth_rcons leqnn ltnn eqxx -last_nth.
(* Goal: and (is_true (andb (@mxmodule gT G n rG n V) (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U))) (forall (i : nat) (_ : is_true (leq (S i) (S (@size (matrix (GRing.Field.sort F) n n) U)))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V) i)) *)
(* Goal: and (is_true (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U)) (forall (i : nat) (_ : is_true (leq (S i) (@size (matrix (GRing.Field.sort F) n n) U))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i)) *)
by split=> // i ltiU; have:= maxU i (ltnW ltiU); rewrite !nth_rcons leqW ltiU.
(* Goal: and (is_true (andb (@mxmodule gT G n rG n V) (@all (matrix (GRing.Field.sort F) n n) (@mxmodule gT G n rG n) U))) (forall (i : nat) (_ : is_true (leq (S i) (S (@size (matrix (GRing.Field.sort F) n n) U)))), max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) V) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V) i)) *)
rewrite modV; split=> // i; rewrite !nth_rcons ltnS leq_eqVlt.
(* Goal: forall _ : is_true (orb (@eq_op nat_eqType i (@size (matrix (GRing.Field.sort F) n n) U)) (leq (S i) (@size (matrix (GRing.Field.sort F) n n) U))), max_submod (if orb (@eq_op nat_eqType i (@size (matrix (GRing.Field.sort F) n n) U)) (leq (S i) (@size (matrix (GRing.Field.sort F) n n) U)) then @nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i else if @eq_op nat_eqType i (@size (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U)) then V else GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (if leq (S i) (@size (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) U) then @nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i else if @eq_op nat_eqType i (@size (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) U) then V else GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
case: eqP => [-> _ | /= _ ltiU]; first by rewrite ltnn ?eqxx -last_nth.
(* Goal: max_submod (if leq (S i) (@size (matrix (GRing.Field.sort F) n n) U) then @nth (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i else if @eq_op nat_eqType i (S (@size (matrix (GRing.Field.sort F) n n) U)) then V else GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (if leq (S i) (@size (matrix (GRing.Field.sort F) n n) U) then @nth (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i else GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
by rewrite ltiU; apply: maxU.
Qed.
Theorem mx_Schreier U :
mx_subseries U -> path ltmx 0 U ->
classically (exists V, [/\ mx_series V, last 0 V :=: 1%:M & subseq U V])%MS.
Proof.
(* Goal: forall (_ : is_true (mx_subseries U)) (_ : is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U)), classically (@ex (list (matrix (GRing.Field.sort F) n n)) (fun V : list (matrix (GRing.Field.sort F) n n) => and3 (mx_composition_series V) (@eqmx F n n n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U V)))) *)
move: U => U0; set U := {1 2}U0; have: subseq U0 U := subseq_refl U.
(* Goal: forall (_ : is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 U)) (_ : is_true (mx_subseries U)) (_ : is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U)), classically (@ex (list (matrix (GRing.Field.sort F) n n)) (fun V : list (matrix (GRing.Field.sort F) n n) => and3 (mx_composition_series V) (@eqmx F n n n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 V)))) *)
pose n' := n.+1; have: n < size U + n' by rewrite leq_addl.
(* Goal: forall (_ : is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) U) n'))) (_ : is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 U)) (_ : is_true (mx_subseries U)) (_ : is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U)), classically (@ex (list (matrix (GRing.Field.sort F) n n)) (fun V : list (matrix (GRing.Field.sort F) n n) => and3 (mx_composition_series V) (@eqmx F n n n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) V) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 V)))) *)
elim: n' U => [|n' IH_U] U ltUn' sU0U modU incU [] // noV.
(* Goal: is_true false *)
(* Goal: is_true false *)
rewrite addn0 ltnNge in ltUn'; case/negP: ltUn'.
(* Goal: is_true false *)
(* Goal: is_true (leq (@size (matrix (GRing.Field.sort F) n n) U) n) *)
by rewrite (leq_trans (max_size_mx_series incU)) ?rank_leq_row.
(* Goal: is_true false *)
apply: (noV); exists U; split => //; first split=> // i lt_iU; last first.
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: @eqmx F n n n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) *)
apply/eqmxP; apply: contraT => neU1.
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: is_true false *)
apply: {IH_U}(IH_U (rcons U 1%:M)) noV.
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (mx_subseries (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) n')) *)
-
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (mx_subseries (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) n')) *)
by rewrite size_rcons addSnnS.
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (mx_subseries (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
-
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (mx_subseries (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
by rewrite (subseq_trans sU0U) ?subseq_rcons.
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (mx_subseries (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
-
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
(* Goal: is_true (mx_subseries (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
by rewrite /mx_subseries all_rcons mxmodule1.
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) *)
by rewrite rcons_path ltmxEneq neU1 submx1 !andbT.
(* Goal: max_submod (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i) *)
set U'i := _`_i; set Ui := _`_i; have defU := cat_take_drop i U.
(* Goal: max_submod U'i Ui *)
have defU'i: U'i = last 0 (take i U).
(* Goal: max_submod U'i Ui *)
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) U'i (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@take (matrix (GRing.Field.sort F) n n) i U)) *)
rewrite (last_nth 0) /U'i -{1}defU -cat_cons nth_cat /=.
(* Goal: max_submod U'i Ui *)
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (if leq (S i) (S (@size (matrix (GRing.Field.sort F) n n) (@take (matrix (GRing.Field.sort F) n n) i U))) then @nth (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@take (matrix (GRing.Field.sort F) n n) i U)) i else @nth (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@drop (matrix (GRing.Field.sort F) n n) i U) (subn i (S (@size (matrix (GRing.Field.sort F) n n) (@take (matrix (GRing.Field.sort F) n n) i U))))) (@nth (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (matrix (GRing.Field.sort F) n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@take (matrix (GRing.Field.sort F) n n) i U)) (@size (matrix (GRing.Field.sort F) n n) (@take (matrix (GRing.Field.sort F) n n) i U))) *)
by rewrite size_take lt_iU leqnn.
(* Goal: max_submod U'i Ui *)
move: incU; rewrite -defU cat_path (drop_nth 0) //= -/Ui -defU'i.
(* Goal: forall _ : is_true (andb (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@take (matrix (GRing.Field.sort F) n n) i U)) (andb (@ltmx F n n n U'i Ui) (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) Ui (@drop (matrix (GRing.Field.sort F) n n) (S i) U)))), max_submod U'i Ui *)
set U' := take i U; set U'' := drop _ U; case/and3P=> incU' ltUi incU''.
(* Goal: max_submod U'i Ui *)
split=> // W [modW ltUW ltWV]; case: notF.
(* Goal: is_true false *)
apply: {IH_U}(IH_U (U' ++ W :: Ui :: U'')) noV; last 2 first.
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
(* Goal: is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) n')) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
(* Goal: is_true (mx_subseries (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
-
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
(* Goal: is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) n')) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
(* Goal: is_true (mx_subseries (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
by rewrite /mx_subseries -drop_nth // all_cat /= modW -all_cat defU.
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
(* Goal: is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) n')) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
-
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
(* Goal: is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) n')) *)
(* Goal: is_true (@path (matrix (GRing.Field.sort F) n n) (@ltmx F n n n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
by rewrite cat_path /= -defU'i; apply/and4P.
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
(* Goal: is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) n')) *)
-
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
(* Goal: is_true (leq (S n) (addn (@size (matrix (GRing.Field.sort F) n n) (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) n')) *)
by rewrite -drop_nth // size_cat /= addnS -size_cat defU addSnnS.
(* Goal: is_true (@subseq (matrix_eqType (GRing.Field.eqType F) n n) U0 (@cat (matrix (GRing.Field.sort F) n n) U' (@cons (matrix (GRing.Field.sort F) n n) W (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) Ui U'')))) *)
by rewrite (subseq_trans sU0U) // -defU cat_subseq // -drop_nth ?subseq_cons.
Qed.
Lemma mx_second_rsim U V (modU : modG U) (modV : modG V) :
let modI := capmx_module modU modV in let modA := addsmx_module modU modV in
mx_rsim (section_repr modI modU) (section_repr modV modA).
Lemma section_eqmx_add U1 U2 V1 V2 modU1 modU2 modV1 modV2 :
(U1 :=: U2)%MS -> (U1 + V1 :=: U2 + V2)%MS ->
mx_rsim (@section_repr U1 V1 modU1 modV1) (@section_repr U2 V2 modU2 modV2).
Lemma section_eqmx U1 U2 V1 V2 modU1 modU2 modV1 modV2
(eqU : (U1 :=: U2)%MS) (eqV : (V1 :=: V2)%MS) :
mx_rsim (@section_repr U1 V1 modU1 modV1) (@section_repr U2 V2 modU2 modV2).
Proof.
(* Goal: @mx_rsim gT G (@mxrank F (@mxrank F n n (@cokermx F n n U1)) (@mxrank F n n (@cokermx F n n U1)) (@genmx F n (@mxrank F n n (@cokermx F n n U1)) (@in_factmod n U1 n V1))) (@section_repr U1 V1 modU1 modV1) (@mxrank F (@mxrank F n n (@cokermx F n n U2)) (@mxrank F n n (@cokermx F n n U2)) (@genmx F n (@mxrank F n n (@cokermx F n n U2)) (@in_factmod n U2 n V2))) (@section_repr U2 V2 modU2 modV2) *)
by apply: section_eqmx_add => //; apply: adds_eqmx.
Qed.
Lemma mx_butterfly U V W modU modV modW :
~~ (U == V)%MS -> max_submod U W -> max_submod V W ->
let modUV := capmx_module modU modV in
max_submod (U :&: V)%MS U
/\ mx_rsim (@section_repr V W modV modW) (@section_repr _ U modUV modU).
Lemma mx_JordanHolder_exists U V :
mx_composition_series U -> modG V -> max_submod V (last 0 U) ->
{W : seq 'M_n | mx_composition_series W & last 0 W = V}.
Proof.
(* Goal: forall (_ : mx_composition_series U) (_ : is_true (@mxmodule gT G n rG n V)) (_ : max_submod V (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U)), @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
elim/last_ind: U V => [|U Um IHU] V compU modV; first by case; rewrite ltmx0.
(* Goal: forall _ : max_submod V (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U Um)), @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
rewrite last_rcons => maxV; case/mx_series_rcons: compU => compU modUm maxUm.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
case eqUV: (last 0 U == V)%MS.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
case/lastP: U eqUV compU {maxUm IHU} => [|U' Um'].
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
(* Goal: forall (_ : @eq bool (andb (@submx F n n n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U' Um')) V) (@submx F n n n V (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U' Um')))) true) (_ : mx_composition_series (@rcons (matrix (GRing.Field.sort F) n n) U' Um')), @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
(* Goal: forall (_ : @eq bool (andb (@submx F n n n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@nil (matrix (GRing.Field.sort F) n n))) V) (@submx F n n n V (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@nil (matrix (GRing.Field.sort F) n n))))) true) (_ : mx_composition_series (@nil (matrix (GRing.Field.sort F) n n))), @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
by rewrite andbC; move/eqmx0P->; exists [::].
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
(* Goal: forall (_ : @eq bool (andb (@submx F n n n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U' Um')) V) (@submx F n n n V (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U' Um')))) true) (_ : mx_composition_series (@rcons (matrix (GRing.Field.sort F) n n) U' Um')), @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
rewrite last_rcons; move/eqmxP=> eqU'V; case/mx_series_rcons=> compU _ maxUm'.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
exists (rcons U' V); last by rewrite last_rcons.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
(* Goal: mx_composition_series (@rcons (matrix (GRing.Field.sort F) n n) U' V) *)
by apply/mx_series_rcons; split => //; apply: max_submod_eqmx maxUm'.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
set Um' := last 0 U in maxUm eqUV; have [modU _] := compU.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
have modUm': modG Um' by rewrite /Um' (last_nth 0) mx_subseries_module'.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
have [|||W compW lastW] := IHU (V :&: Um')%MS; rewrite ?capmx_module //.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
(* Goal: max_submod (@capmx F n n n V Um') (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) *)
by case: (mx_butterfly modUm' modV modUm); rewrite ?eqUV // {1}capmxC.
(* Goal: @sig2 (list (matrix (GRing.Field.sort F) n n)) (fun W : list (matrix (GRing.Field.sort F) n n) => mx_composition_series W) (fun W : list (matrix (GRing.Field.sort F) n n) => @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) W) V) *)
exists (rcons W V); last by rewrite last_rcons.
(* Goal: mx_composition_series (@rcons (matrix (GRing.Field.sort F) n n) W V) *)
apply/mx_series_rcons; split; rewrite // lastW.
(* Goal: max_submod (@capmx F n n n V Um') V *)
by case: (mx_butterfly modV modUm' modUm); rewrite // andbC eqUV.
Qed.
Let rsim_rcons U V compU compUV i : i < size U ->
mx_rsim (@series_repr U i compU) (@series_repr (rcons U V) i compUV).
Proof.
(* Goal: forall _ : is_true (leq (S i) (@size (matrix (GRing.Field.sort F) n n) U)), @mx_rsim gT G (@mxrank F (@mxrank F n n (@cokermx F n n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i))) (@mxrank F n n (@cokermx F n n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i))) (@genmx F n (@mxrank F n n (@cokermx F n n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i))) (@in_factmod n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U) i) n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U i)))) (@series_repr U i compU) (@mxrank F (@mxrank F n n (@cokermx F n n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V)) i))) (@mxrank F n n (@cokermx F n n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V)) i))) (@genmx F n (@mxrank F n n (@cokermx F n n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V)) i))) (@in_factmod n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V)) i) n (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (@rcons (matrix (GRing.Field.sort F) n n) U V) i)))) (@series_repr (@rcons (matrix (GRing.Field.sort F) n n) U V) i compUV) *)
by move=> ltiU; apply: section_eqmx; rewrite -?rcons_cons nth_rcons ?leqW ?ltiU.
Qed.
Let last_mod U (compU : mx_series U) : modG (last 0 U).
Proof.
(* Goal: is_true (@mxmodule gT G n rG n (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) U)) *)
by case: compU => modU _; rewrite (last_nth 0) (mx_subseries_module' _ modU).
Qed.
Let rsim_last U V modUm modV compUV :
mx_rsim (@section_repr (last 0 U) V modUm modV)
(@series_repr (rcons U V) (size U) compUV).
Local Notation rsimT := mx_rsim_trans.
Local Notation rsimC := mx_rsim_sym.
Lemma mx_JordanHolder U V compU compV :
let m := size U in (last 0 U :=: last 0 V)%MS ->
m = size V /\ (exists p : 'S_m, forall i : 'I_m,
mx_rsim (@series_repr U i compU) (@series_repr V (p i) compV)).
Lemma mx_JordanHolder_max U (m := size U) V compU modV :
(last 0 U :=: 1%:M)%MS -> mx_irreducible (@factmod_repr _ G n rG V modV) ->
exists i : 'I_m, mx_rsim (factmod_repr modV) (@series_repr U i compU).
End JordanHolder.
Bind Scope irrType_scope with socle_sort.
Section Regular.
Variables (gT : finGroupType) (G : {group gT}).
Local Notation nG := #|pred_of_set (gval G)|.
Local Notation rF := (GRing.Field.comUnitRingType F) (only parsing).
Local Notation aG := (regular_repr rF G).
Local Notation R_G := (group_ring rF G).
Lemma gring_free : row_free R_G.
Proof.
(* Goal: is_true (@row_free F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@group_ring (GRing.Field.comUnitRingType F) gT G)) *)
apply/row_freeP; exists (lin1_mx (row (gring_index G 1) \o vec_mx)).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@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)))) (@group_ring (GRing.Field.comUnitRingType F) gT G) (@lin1_mx (GRing.Field.ringType F) (muln (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) tt (@row (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_index gT G (oneg (FinGroup.base gT)))) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))) (@scalar_mx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.Field.ringType F))) *)
apply/row_matrixP=> i; rewrite row_mul rowK mul_rV_lin1 /= mxvecK rowK row1.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@delta_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (fun x : Finite.sort (FinGroup.finType (FinGroup.base gT)) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (@gring_index gT G (@mulg (FinGroup.base gT) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) (@gring_index gT G (oneg (FinGroup.base gT)))) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i)))) (@delta_mx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i) *)
by rewrite gring_indexK // mul1g gring_valK.
Qed.
Lemma gring_op_id A : (A \in R_G)%MS -> gring_op aG A = A.
Proof.
(* Goal: forall _ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (@group_ring (GRing.Field.comUnitRingType F) gT G)), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@gring_op (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) A) A *)
case/envelop_mxP=> a ->{A}; rewrite linear_sum.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.Linear.apply (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (@gring_op_linear (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G)) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (a i) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) i))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (a x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x)))) *)
by apply: eq_bigr => x Gx; rewrite linearZ /= gring_opG.
Qed.
Lemma gring_rowK A : (A \in R_G)%MS -> gring_mx aG (gring_row A) = A.
Proof.
(* Goal: forall _ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (@group_ring (GRing.Field.comUnitRingType F) gT G)), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@gring_row (GRing.Field.comUnitRingType F) gT G A)) A *)
exact: gring_op_id.
Qed.
Lemma mem_gring_mx m a (M : 'M_(m, nG)) :
(gring_mx aG a \in M *m R_G)%MS = (a <= M)%MS.
Proof.
(* Goal: @eq bool (@submx F (S O) m (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) a)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) M (@group_ring (GRing.Field.comUnitRingType F) gT G))) (@submx F (S O) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) a M) *)
by rewrite vec_mxK submxMfree ?gring_free.
Qed.
Lemma mem_sub_gring m A (M : 'M_(m, nG)) :
(A \in M *m R_G)%MS = (A \in R_G)%MS && (gring_row A <= M)%MS.
Proof.
(* Goal: @eq bool (@submx F (S O) m (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) M (@group_ring (GRing.Field.comUnitRingType F) gT G))) (andb (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (@group_ring (GRing.Field.comUnitRingType F) gT G)) (@submx F (S O) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row (GRing.Field.comUnitRingType F) gT G A) M)) *)
rewrite -(andb_idl (memmx_subP (submxMl _ _) A)); apply: andb_id2l => R_A.
(* Goal: @eq bool (@submx F (S O) m (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (@mulmx (GRing.Field.ringType F) m (@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)))) (expn (@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 (S O))) M (@group_ring (GRing.Field.comUnitRingType F) gT G))) (@submx F (S O) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row (GRing.Field.comUnitRingType F) gT G A) M) *)
by rewrite -mem_gring_mx gring_rowK.
Qed.
Section GringMx.
Variables (n : nat) (rG : mx_representation F G n).
Lemma gring_mxP a : (gring_mx rG a \in enveloping_algebra_mx rG)%MS.
Proof.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln n n) (@mxvec (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n (@gring_mx (GRing.Field.comUnitRingType F) gT G n rG a)) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G n rG)) *)
by rewrite vec_mxK submxMl.
Qed.
Lemma gring_opM A B :
(B \in R_G)%MS -> gring_op rG (A *m B) = gring_op rG A *m gring_op rG B.
Proof.
(* Goal: forall _ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) B) (@group_ring (GRing.Field.comUnitRingType F) gT G)), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@gring_op (GRing.Field.comUnitRingType F) gT G n rG (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A B)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n n (@gring_op (GRing.Field.comUnitRingType F) gT G n rG A) (@gring_op (GRing.Field.comUnitRingType F) gT G n rG B)) *)
by move=> R_B; rewrite -gring_opJ gring_rowK.
Qed.
Hypothesis irrG : mx_irreducible rG.
Lemma rsim_regular_factmod :
{U : 'M_nG & {modU : mxmodule aG U & mx_rsim rG (factmod_repr modU)}}.
Lemma rsim_regular_series U (compU : mx_composition_series aG U) :
(last 0 U :=: 1%:M)%MS ->
exists i : 'I_(size U), mx_rsim rG (series_repr i compU).
Proof.
(* Goal: forall _ : @eqmx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@scalar_mx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.Field.ringType F))), @ex (ordinal (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U)) (fun i : ordinal (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) => @mx_rsim gT G n rG (@mxrank F (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@genmx F (@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)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@in_factmod (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i))))) (@series_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) U (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i) compU)) *)
move=> lastU; have [V [modV simGV]] := rsim_regular_factmod.
(* Goal: @ex (ordinal (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U)) (fun i : ordinal (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) => @mx_rsim gT G n rG (@mxrank F (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@genmx F (@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)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@in_factmod (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i))))) (@series_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) U (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i) compU)) *)
have irrV := mx_rsim_irr simGV irrG.
(* Goal: @ex (ordinal (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U)) (fun i : ordinal (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) => @mx_rsim gT G n rG (@mxrank F (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@genmx F (@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)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@in_factmod (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i))))) (@series_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) U (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i) compU)) *)
have [i simVU] := mx_JordanHolder_max compU lastU irrV.
(* Goal: @ex (ordinal (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U)) (fun i : ordinal (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) => @mx_rsim gT G n rG (@mxrank F (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@genmx F (@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)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)))) (@in_factmod (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i))))) (@series_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) U (@nat_of_ord (@size (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U) i) compU)) *)
by exists i; apply: mx_rsim_trans simGV simVU.
Qed.
Hypothesis F'G : [char F]^'.-group G.
Lemma rsim_regular_submod :
{U : 'M_nG & {modU : mxmodule aG U & mx_rsim rG (submod_repr modU)}}.
Proof.
(* Goal: @sigT (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun U : matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @sigT (is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U)) (fun modU : is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U) => @mx_rsim gT G n rG (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U) (@submod_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) U modU))) *)
have [V [modV eqG'V]] := rsim_regular_factmod.
(* Goal: @sigT (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun U : matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @sigT (is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U)) (fun modU : is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U) => @mx_rsim gT G n rG (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U) (@submod_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) U modU))) *)
have [U modU defVU dxVU] := mx_Maschke F'G modV (submx1 V).
(* Goal: @sigT (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun U : matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @sigT (is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U)) (fun modU : is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U) => @mx_rsim gT G n rG (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U) (@submod_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) U modU))) *)
exists U; exists modU; apply: mx_rsim_trans eqG'V _.
(* Goal: @mx_rsim gT G (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) V)) (@factmod_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) V modV) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) U) (@submod_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) U modU) *)
by apply: mx_rsim_factmod; rewrite ?mxdirectE /= addsmxC // addnC.
Qed.
End GringMx.
Definition gset_mx (A : {set gT}) := \sum_(x in A) aG x.
Local Notation tG := #|pred_of_set (classes (gval G))|.
Definition classg_base := \matrix_(k < tG) mxvec (gset_mx (enum_val k)).
Let groupCl : {in G, forall x, {subset x ^: G <= G}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @sub_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @sub_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
by move=> x Gx; apply: subsetP; apply: class_subG.
Qed.
Lemma classg_base_free : row_free classg_base.
Proof.
(* Goal: is_true (@row_free F (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) classg_base) *)
rewrite -kermx_eq0; apply/rowV0P=> v /sub_kermxP; rewrite mulmx_sum_row => v0.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G)))))) v (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))))) *)
apply/rowP=> k; rewrite mxE.
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k) (GRing.zero (GRing.Field.zmodType F)) *)
have [x Gx def_k] := imsetP (enum_valP k).
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k) (GRing.zero (GRing.Field.zmodType F)) *)
transitivity (@gring_proj F _ G x (vec_mx 0) 0 0); last first.
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k) (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (S O) (S O) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@vec_mx (GRing.Zmodule.sort (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) *)
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (S O) (S O) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@vec_mx (GRing.Zmodule.sort (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (GRing.zero (GRing.Field.zmodType F)) *)
by rewrite !linear0 !mxE.
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k) (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (S O) (S O) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@vec_mx (GRing.Zmodule.sort (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) *)
rewrite -{}v0 !linear_sum (bigD1 k) //= !linearZ /= rowK mxvecK def_k.
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@GRing.add (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O)) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (S O)) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (gset_mx (@class gT x (@gval gT G))))) (@BigOp.bigop (matrix (GRing.Field.sort F) (S O) (S O)) (ordinal (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) (index_enum (ordinal_finType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))))) (fun i : ordinal (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) => @BigBody (matrix (GRing.Field.sort F) (S O) (S O)) (ordinal (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G)))))) i (@GRing.add (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) (negb (@eq_op (Finite.eqType (ordinal_finType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))))) i k)) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@vec_mx (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Field.sort F) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) i classg_base))))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) *)
rewrite linear_sum (bigD1 x) ?class_refl //= gring_projE // eqxx.
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@GRing.add (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O)) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (S O)) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k) (@GRing.add (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O)) (@GRing.natmul (GRing.Ring.zmodType (matrix_ringType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) O)) (GRing.one (matrix_ringType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) O)) (nat_of_bool true)) (@BigOp.bigop (matrix (GRing.Field.sort F) (S O) (S O)) (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody (matrix (GRing.Field.sort F) (S O) (S O)) (FinGroup.arg_sort (FinGroup.base gT)) i (@GRing.add (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@class gT x (@gval gT G))))) (negb (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) i x))) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@regular_mx (GRing.Field.comUnitRingType F) gT G i)))))) (@BigOp.bigop (matrix (GRing.Field.sort F) (S O) (S O)) (ordinal (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) (index_enum (ordinal_finType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))))) (fun i : ordinal (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) => @BigBody (matrix (GRing.Field.sort F) (S O) (S O)) (ordinal (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G)))))) i (@GRing.add (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) (negb (@eq_op (Finite.eqType (ordinal_finType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))))) i k)) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@vec_mx (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Field.sort F) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) i classg_base))))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) *)
rewrite !big1 ?addr0 ?mxE ?mulr1 // => [k' | y /andP[xGy ne_yx]]; first 1 last.
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))))) k' k)), @eq (matrix (GRing.Field.sort F) (S O) (S O)) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@vec_mx (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k') (@row (GRing.Field.sort F) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) k' classg_base)))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) *)
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (S O)) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@regular_mx (GRing.Field.comUnitRingType F) gT G y)) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) *)
by rewrite gring_projE ?(groupCl Gx xGy) // eq_sym (negPf ne_yx).
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))))) k' k)), @eq (matrix (GRing.Field.sort F) (S O) (S O)) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@vec_mx (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k') (@row (GRing.Field.sort F) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) k' classg_base)))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) *)
rewrite rowK !linearZ /= mxvecK -(inj_eq enum_val_inj) def_k eq_sym.
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@class gT x (@gval gT G)) (@enum_val (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))) k'))), @eq (matrix (GRing.Field.sort F) (S O) (S O)) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (S O)) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k') (@gring_proj (GRing.Field.comUnitRingType F) gT G x (gset_mx (@enum_val (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))) k')))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) *)
have [z Gz ->] := imsetP (enum_valP k').
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@class gT x (@gval gT G)) (@class gT z (@gval gT G)))), @eq (matrix (GRing.Field.sort F) (S O) (S O)) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (S O)) (@fun_of_matrix (GRing.Field.sort F) (S O) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) v (GRing.zero (Zp_zmodType O)) k') (@gring_proj (GRing.Field.comUnitRingType F) gT G x (gset_mx (@class gT z (@gval gT G))))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) *)
move/eqP=> not_Gxz; rewrite linear_sum big1 ?scaler0 //= => y zGy.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (S O)) (@gring_proj (GRing.Field.comUnitRingType F) gT G x (@regular_mx (GRing.Field.comUnitRingType F) gT G y)) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) *)
rewrite gring_projE ?(groupCl Gz zGy) //.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (S O)) (@GRing.natmul (GRing.Ring.zmodType (matrix_ringType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) O)) (GRing.one (matrix_ringType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) O)) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x y))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S O) (S O))) *)
by case: eqP zGy => // <- /class_eqP.
Qed.
Lemma classg_base_center : (classg_base :=: 'Z(R_G))%MS.
Lemma regular_module_ideal m (M : 'M_(m, nG)) :
mxmodule aG M = right_mx_ideal R_G (M *m R_G).
Proof.
(* Goal: @eq bool (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) m M) (@right_mx_ideal F (@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)))) m (@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)))) (@group_ring (GRing.Field.comUnitRingType F) gT G) (@mulmx (GRing.Field.ringType F) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) M (@group_ring (GRing.Field.comUnitRingType F) gT G))) *)
apply/idP/idP=> modM.
(* Goal: is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) m M) *)
(* Goal: is_true (@right_mx_ideal F (@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)))) m (@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)))) (@group_ring (GRing.Field.comUnitRingType F) gT G) (@mulmx (GRing.Field.ringType F) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) M (@group_ring (GRing.Field.comUnitRingType F) gT G))) *)
apply/mulsmx_subP=> A B; rewrite !mem_sub_gring => /andP[R_A M_A] R_B.
(* Goal: is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) m M) *)
(* Goal: is_true (andb (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A B)) (@group_ring (GRing.Field.comUnitRingType F) gT G)) (@submx F (S O) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row (GRing.Field.comUnitRingType F) gT G (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A B)) M)) *)
by rewrite envelop_mxM // gring_row_mul (mxmodule_envelop modM).
(* Goal: is_true (@mxmodule gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) m M) *)
apply/mxmoduleP=> x Gx; apply/row_subP=> i; rewrite row_mul -mem_gring_mx.
(* Goal: is_true (@submx F (S O) m (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@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)))) (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) i M) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x)))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) M (@group_ring (GRing.Field.comUnitRingType F) gT G))) *)
rewrite gring_mxJ // (mulsmx_subP modM) ?envelop_mx_id //.
(* Goal: is_true (@submx F (S O) m (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) i M))) (@mulmx (GRing.Field.ringType F) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) M (@group_ring (GRing.Field.comUnitRingType F) gT G))) *)
by rewrite mem_gring_mx row_sub.
Qed.
Definition irrType := socleType aG.
Identity Coercion type_of_irrType : irrType >-> socleType.
Variable sG : irrType.
Definition irr_degree (i : sG) := \rank (socle_base i).
Lemma irr_degree_gt0 i : 'n_i > 0.
Proof.
(* Goal: is_true (leq (S O) (irr_degree i)) *)
by rewrite lt0n mxrank_eq0; case: (socle_simple i).
Qed.
Definition irr_repr i : mx_representation F G 'n_i := socle_repr i.
Lemma irr_reprE i x : irr_repr i x = submod_mx (socle_module i) x.
Proof.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (irr_degree i) (irr_degree i)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (irr_degree i) (irr_repr i) x) (@submod_mx gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) (@socle_module gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) x) *)
by [].
Qed.
Lemma rfix_regular : (rfix_mx aG G :=: gring_row (gset_mx G))%MS.
Lemma principal_comp_subproof : mxsimple aG (rfix_mx aG G).
Definition principal_comp_def :=
PackSocle (component_socle sG principal_comp_subproof).
Definition principal_comp := locked_with principal_comp_key principal_comp_def.
Local Notation "1" := principal_comp : irrType_scope.
Lemma irr1_rfix : (1%irr :=: rfix_mx aG G)%MS.
Lemma rank_irr1 : \rank 1%irr = 1%N.
Proof.
(* Goal: @eq nat (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG principal_comp)) (S O) *)
apply/eqP; rewrite eqn_leq lt0n mxrank_eq0 nz_socle andbT.
(* Goal: is_true (leq (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG principal_comp)) (S O)) *)
by rewrite irr1_rfix rfix_regular rank_leq_row.
Qed.
Lemma degree_irr1 : 'n_1 = 1%N.
Proof.
(* Goal: @eq nat (irr_degree principal_comp) (S O) *)
apply/eqP; rewrite eqn_leq irr_degree_gt0 -rank_irr1.
(* Goal: is_true (andb (leq (irr_degree principal_comp) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG principal_comp))) true) *)
by rewrite mxrankS ?component_mx_id //; apply: socle_simple.
Qed.
Definition Wedderburn_subring (i : sG) := <<i *m R_G>>%MS.
Local Notation "''R_' i" := (Wedderburn_subring i) : group_ring_scope.
Let sums_R : (\sum_i 'R_i :=: Socle sG *m R_G)%MS.
Proof.
(* Goal: @eqmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (matrix (GRing.Field.sort F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@addsmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (Wedderburn_subring i))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@Socle gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) (@group_ring (GRing.Field.comUnitRingType F) gT G)) *)
apply/eqmxP; set R_S := (_ <= _)%MS.
(* Goal: is_true (andb R_S (@submx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@Socle gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) (@group_ring (GRing.Field.comUnitRingType F) gT G)) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (matrix (GRing.Field.sort F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@addsmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (Wedderburn_subring i))))) *)
have sRS: R_S by apply/sumsmx_subP=> i; rewrite genmxE submxMr ?(sumsmx_sup i).
(* Goal: is_true (andb R_S (@submx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@Socle gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) (@group_ring (GRing.Field.comUnitRingType F) gT G)) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (matrix (GRing.Field.sort F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@addsmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (Wedderburn_subring i))))) *)
rewrite sRS -(mulmxKpV sRS) mulmxA submxMr //; apply/sumsmx_subP=> i _.
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) (@mulmx (GRing.Field.ringType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (matrix (GRing.Field.sort F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@addsmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (Wedderburn_subring i))) (@pinvmx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@Socle gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) (@group_ring (GRing.Field.comUnitRingType F) gT G)))) (@Socle gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG))) *)
rewrite -(submxMfree _ _ gring_free) -(mulmxA _ _ R_G) mulmxKpV //.
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) (@group_ring (GRing.Field.comUnitRingType F) gT G)) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (matrix (GRing.Field.sort F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@addsmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (Wedderburn_subring i)))) *)
by rewrite (sumsmx_sup i) ?genmxE.
Qed.
Lemma Wedderburn_ideal i : mx_ideal R_G 'R_i.
Lemma Wedderburn_direct : mxdirect (\sum_i 'R_i)%MS.
Proof.
(* Goal: is_true (@mxdirect_def F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@sum_mxsum F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@nary_mxsum_expr F (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun _ : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => true) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @trivial_mxsum F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (Wedderburn_subring i)))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (matrix (GRing.Field.sort F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@addsmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (Wedderburn_subring i))))) *)
apply/mxdirectP; rewrite /= sums_R mxrankMfree ?gring_free //.
(* Goal: @eq nat (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@Socle gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (@BigOp.bigop nat (@socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) O (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun j : @socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG => @BigBody nat (@socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) j addn true (@mxrank F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (Wedderburn_subring j)))) *)
rewrite (mxdirectP (Socle_direct sG)); apply: eq_bigr=> i _ /=.
(* Goal: @eq nat (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@mxrank F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (Wedderburn_subring i)) *)
by rewrite genmxE mxrankMfree ?gring_free.
Qed.
Lemma Wedderburn_disjoint i j : i != j -> ('R_i :&: 'R_j)%MS = 0.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (@socle_eqType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) i j)), @eq (matrix (Choice.sort (GRing.Field.choiceType F)) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@capmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (Wedderburn_subring i) (Wedderburn_subring j)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) *)
move=> ne_ij; apply/eqP; rewrite -submx0 capmxC.
(* Goal: is_true (@submx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@capmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (Wedderburn_subring j) (Wedderburn_subring i)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))) *)
by rewrite -(mxdirect_sumsP Wedderburn_direct j) // capmxS // (sumsmx_sup i).
Qed.
Lemma Wedderburn_annihilate i j : i != j -> ('R_i * 'R_j)%MS = 0.
Lemma Wedderburn_mulmx0 i j A B :
i != j -> (A \in 'R_i)%MS -> (B \in 'R_j)%MS -> A *m B = 0.
Hypothesis F'G : [char F]^'.-group G.
Lemma irr_mx_sum : (\sum_(i : sG) i = 1%:M)%MS.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : @socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG => @BigBody (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) i (@addsmx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) true (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i))) (@scalar_mx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.Field.ringType F))) *)
by apply: reducible_Socle1; apply: mx_Maschke.
Qed.
Lemma Wedderburn_sum : (\sum_i 'R_i :=: R_G)%MS.
Proof.
(* Goal: @eqmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (matrix (GRing.Field.sort F) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@addsmx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (Wedderburn_subring i))) (@group_ring (GRing.Field.comUnitRingType F) gT G) *)
by apply: eqmx_trans sums_R _; rewrite /Socle irr_mx_sum mul1mx.
Qed.
Definition Wedderburn_id i :=
vec_mx (mxvec 1%:M *m proj_mx 'R_i (\sum_(j | j != i) 'R_j)%MS).
Local Notation "''e_' i" := (Wedderburn_id i) : group_ring_scope.
Lemma Wedderburn_sum_id : \sum_i 'e_i = 1%:M.
Lemma Wedderburn_id_mem i : ('e_i \in 'R_i)%MS.
Proof.
(* Goal: is_true (@submx F (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i)) (Wedderburn_subring i)) *)
by rewrite vec_mxK proj_mx_sub.
Qed.
Lemma Wedderburn_is_id i : mxring_id 'R_i 'e_i.
Proof.
(* Goal: @mxring_id F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_subring i) (Wedderburn_id i) *)
have ideRi A: (A \in 'R_i)%MS -> 'e_i *m A = A.
(* Goal: @mxring_id F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_subring i) (Wedderburn_id i) *)
(* Goal: forall _ : is_true (@submx F (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (Wedderburn_subring i)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i) A) A *)
move=> RiA; rewrite -{2}[A]mul1mx -Wedderburn_sum_id mulmx_suml.
(* Goal: @mxring_id F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_subring i) (Wedderburn_id i) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i) A) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i) A))) *)
rewrite (bigD1 i) //= big1 ?addr0 // => j ne_ji.
(* Goal: @mxring_id F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_subring i) (Wedderburn_id i) *)
(* Goal: @eq (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@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)))) (Wedderburn_id j) A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) *)
by rewrite (Wedderburn_mulmx0 ne_ji) ?Wedderburn_id_mem.
(* Goal: @mxring_id F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_subring i) (Wedderburn_id i) *)
split=> // [||A RiA]; first 2 [exact: Wedderburn_id_mem].
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (Wedderburn_id i)) A *)
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Wedderburn_id i) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))) *)
apply: contraNneq (nz_socle i) => e0.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (Wedderburn_id i)) A *)
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Field.eqType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) *)
apply/rowV0P=> v; rewrite -mem_gring_mx -(genmxE (i *m _)) => /ideRi.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (Wedderburn_id i)) A *)
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) v)) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) v), @eq (matrix (GRing.Field.sort F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) v (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) *)
by rewrite e0 mul0mx => /(canLR gring_mxK); rewrite linear0.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (Wedderburn_id i)) A *)
rewrite -{2}[A]mulmx1 -Wedderburn_sum_id mulmx_sumr (bigD1 i) //=.
(* Goal: @eq (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (Wedderburn_id i)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (Wedderburn_id i)) (@BigOp.bigop (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i0 : @socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG => @BigBody (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) i0 (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (negb (@eq_op (Finite.eqType (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i0 i)) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (Wedderburn_id i0))))) *)
rewrite big1 ?addr0 // => j; rewrite eq_sym => ne_ij.
(* Goal: @eq (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (Wedderburn_id j)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) *)
by rewrite (Wedderburn_mulmx0 ne_ij) ?Wedderburn_id_mem.
Qed.
Lemma Wedderburn_closed i : ('R_i * 'R_i = 'R_i)%MS.
Lemma Wedderburn_is_ring i : mxring 'R_i.
Proof.
(* Goal: is_true (@mxring F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_subring i)) *)
rewrite /mxring /left_mx_ideal Wedderburn_closed submx_refl.
(* Goal: is_true (andb true (@has_mxring_id F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_subring i))) *)
by apply/mxring_idP; exists 'e_i; apply: Wedderburn_is_id.
Qed.
Lemma Wedderburn_min_ideal m i (E : 'A_(m, nG)) :
E != 0 -> (E <= 'R_i)%MS -> mx_ideal R_G E -> (E :=: 'R_i)%MS.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Zmodule.eqType (GRing.Field.zmodType F)) m (expn (@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 (S O)))) E (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn (@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 (S O)))))))) (_ : is_true (@submx F m (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (expn (@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 (S O))) E (Wedderburn_subring i))) (_ : is_true (@mx_ideal F (@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)))) m (@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)))) (@group_ring (GRing.Field.comUnitRingType F) gT G) E)), @eqmx F m (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (expn (@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 (S O))) E (Wedderburn_subring i) *)
move=> nzE sE_Ri /andP[idlE idrE]; apply/eqmxP; rewrite sE_Ri.
(* Goal: is_true (andb true (@submx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) m (expn (@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 (S O))) (Wedderburn_subring i) E)) *)
pose M := E *m pinvmx R_G; have defE: E = M *m R_G.
(* Goal: is_true (andb true (@submx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) m (expn (@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 (S O))) (Wedderburn_subring i) E)) *)
(* Goal: @eq (matrix (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) m (expn (@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 (S O)))) E (@mulmx (GRing.Field.ringType F) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) M (@group_ring (GRing.Field.comUnitRingType F) gT G)) *)
by rewrite mulmxKpV // (submx_trans sE_Ri) // genmxE submxMl.
(* Goal: is_true (andb true (@submx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) m (expn (@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 (S O))) (Wedderburn_subring i) E)) *)
have modM: mxmodule aG M by rewrite regular_module_ideal -defE.
(* Goal: is_true (andb true (@submx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) m (expn (@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 (S O))) (Wedderburn_subring i) E)) *)
have simSi := socle_simple i; set Si := socle_base i in simSi.
(* Goal: is_true (andb true (@submx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) m (expn (@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 (S O))) (Wedderburn_subring i) E)) *)
have [I [W isoW defW]]:= component_mx_def simSi.
(* Goal: is_true (andb true (@submx F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) m (expn (@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 (S O))) (Wedderburn_subring i) E)) *)
rewrite /'R_i /socle_val /= defW genmxE defE submxMr //.
(* Goal: is_true (@submx F (@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)))) m (@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)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (Finite.sort I) i (@addsmx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) true (W i))) M) *)
apply/sumsmx_subP=> j _.
(* Goal: is_true (@submx F (@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)))) m (@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)))) (W j) M) *)
have simW := mx_iso_simple (isoW j) simSi; have [modW _ minW] := simW.
(* Goal: is_true (@submx F (@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)))) m (@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)))) (W j) M) *)
have [{minW}dxWE | nzWE] := eqVneq (W j :&: M)%MS 0; last first.
(* Goal: is_true (@submx F (@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)))) m (@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)))) (W j) M) *)
(* Goal: is_true (@submx F (@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)))) m (@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)))) (W j) M) *)
by rewrite (sameP capmx_idPl eqmxP) minW ?capmxSl ?capmx_module.
(* Goal: is_true (@submx F (@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)))) m (@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)))) (W j) M) *)
have [_ Rei ideRi _] := Wedderburn_is_id i.
(* Goal: is_true (@submx F (@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)))) m (@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)))) (W j) M) *)
have:= nzE; rewrite -submx0 => /memmx_subP[A E_A].
(* Goal: is_true (@submx F (S O) (expn (@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 (S O))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (expn (@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 (S O))) (expn (@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 (S O)))))) *)
rewrite -(ideRi _ (memmx_subP sE_Ri _ E_A)).
(* Goal: is_true (@submx F (S O) (expn (@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 (S O))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (expn (@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 (S O))) (expn (@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 (S O)))))) *)
have:= E_A; rewrite defE mem_sub_gring => /andP[R_A M_A].
(* Goal: is_true (@submx F (S O) (expn (@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 (S O))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (expn (@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 (S O))) (expn (@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 (S O)))))) *)
have:= Rei; rewrite genmxE mem_sub_gring => /andP[Re].
(* Goal: forall _ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row (GRing.Field.comUnitRingType F) gT G (Wedderburn_id i)) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)), is_true (@submx F (S O) (expn (@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 (S O))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (expn (@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 (S O))) (expn (@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 (S O)))))) *)
rewrite -{2}(gring_rowK Re) /socle_val defW => /sub_sumsmxP[e ->].
(* Goal: is_true (@submx F (S O) (expn (@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 (S O))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@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)))) (e i) (W i))))) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (expn (@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 (S O))) (expn (@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 (S O)))))) *)
rewrite !(linear_sum, mulmx_suml) summx_sub //= => k _.
(* Goal: is_true (@submx F (S O) (expn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S (S O))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@mulmx (GRing.Field.ringType F) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@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)))) (e k) (W k))) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (expn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S (S O))) (expn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S (S O)))))) *)
rewrite -(gring_rowK R_A) -gring_mxA -mulmxA gring_rowK //.
(* Goal: is_true (@submx F (S O) (expn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S (S O))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@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)))) (e k) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (W k) A)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (expn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S (S O))) (expn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S (S O)))))) *)
rewrite ((W k *m _ =P 0) _) ?linear0 ?sub0mx //.
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (W k) A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) *)
have [f _ homWf defWk] := mx_iso_trans (mx_iso_sym (isoW j)) (isoW k).
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (W k) A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) *)
rewrite -submx0 -{k defWk}(eqmxMr _ defWk) -(hom_envelop_mxC homWf) //.
(* Goal: is_true (@submx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (W j) A) f) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) *)
rewrite -(mul0mx _ f) submxMr {f homWf}// -dxWE sub_capmx.
(* Goal: is_true (andb (@submx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (W j) A) (W j)) (@submx F (@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)))) m (@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)))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (W j) A) M)) *)
rewrite (mxmodule_envelop modW) //=; apply/row_subP=> k.
(* Goal: is_true (@submx F (S O) m (@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)))) (@row (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) k (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@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)))) (W j) A)) M) *)
rewrite row_mul -mem_gring_mx -(gring_rowK R_A) gring_mxA gring_rowK //.
(* Goal: is_true (@submx F (S O) m (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@row (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) k (W j))) A)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) M (@group_ring (GRing.Field.comUnitRingType F) gT G))) *)
by rewrite -defE (memmx_subP idlE) // mem_mulsmx ?gring_mxP.
Qed.
Section IrrComponent.
Variables (n : nat) (rG : mx_representation F G n).
Local Notation E_G := (enveloping_algebra_mx rG).
Let not_rsim_op0 (iG j : sG) A :
mx_rsim rG (socle_repr iG) -> iG != j -> (A \in 'R_j)%MS ->
gring_op rG A = 0.
Proof.
(* Goal: forall (_ : @mx_rsim gT G n rG (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@socle_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (_ : is_true (negb (@eq_op (@socle_eqType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) iG j))) (_ : is_true (@submx F (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (Wedderburn_subring j))), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@gring_op (GRing.Field.comUnitRingType F) gT G n rG A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) *)
case/mx_rsim_def=> f [f' _ hom_f] ne_iG_j RjA.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@gring_op (GRing.Field.comUnitRingType F) gT G n rG A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) *)
transitivity (f *m in_submod _ (val_submod 1%:M *m A) *m f').
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) f (@in_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mulmx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F)))) A))) f') (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@gring_op (GRing.Field.comUnitRingType F) gT G n rG A) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) f (@in_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mulmx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F)))) A))) f') *)
have{RjA}: (A \in R_G)%MS by rewrite -Wedderburn_sum (sumsmx_sup j).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) f (@in_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mulmx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F)))) A))) f') (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) *)
(* Goal: forall _ : is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (@group_ring (GRing.Field.comUnitRingType F) gT G)), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@gring_op (GRing.Field.comUnitRingType F) gT G n rG A) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) f (@in_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mulmx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F)))) A))) f') *)
case/envelop_mxP=> a ->{A}; rewrite !(linear_sum, mulmx_suml).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) f (@in_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mulmx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F)))) A))) f') (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.Linear.apply (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n))) (@gring_op_linear (GRing.Field.comUnitRingType F) gT G n rG) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (a i) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) i))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) n (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)))) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)))) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)))))) (@GRing.scale (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)))) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)))) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (matrix_lmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)))))))) (@mulmx_linear (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) f) (@GRing.Linear.apply (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG))) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG))))) (@in_submod_linear (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG))) (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@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)))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@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)))))))))) (@mulmx_linear (GRing.Field.comRingType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F))))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (a i) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) i))))) f'))) *)
by apply: eq_bigr => x Gx; rewrite !linearZ /= -scalemxAl -hom_f ?gring_opG.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) f (@in_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@mulmx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F)))) A))) f') (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) *)
rewrite (_ : _ *m A = 0) ?(linear0, mul0mx) //.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@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))))) (@mulmx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F)))) A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@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)))))) *)
apply/row_matrixP=> i; rewrite row_mul row0 -[row _ _]gring_mxK -gring_row_mul.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@gring_row (GRing.Field.comUnitRingType F) gT G (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_mx (GRing.Field.comUnitRingType F) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) (@row (GRing.Ring.sort (GRing.Field.ringType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) i (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F)))))) A)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) *)
rewrite (Wedderburn_mulmx0 ne_iG_j) ?linear0 // genmxE mem_gring_mx.
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@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)))) (@row (GRing.Ring.sort (GRing.Field.ringType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) i (@val_submod (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (@scalar_mx (GRing.Field.ringType F) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) (GRing.one (GRing.Field.ringType F))))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG iG)) *)
by rewrite (row_subP _) // val_submod1 component_mx_id //; apply: socle_simple.
Qed.
Definition irr_comp := odflt 1%irr [pick i | gring_op rG 'e_i != 0].
Local Notation iG := irr_comp.
Hypothesis irrG : mx_irreducible rG.
Lemma rsim_irr_comp : mx_rsim rG (irr_repr iG).
Lemma irr_comp'_op0 j A : j != iG -> (A \in 'R_j)%MS -> gring_op rG A = 0.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (@socle_eqType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) j irr_comp))) (_ : is_true (@submx F (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (Wedderburn_subring j))), @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n) (@gring_op (GRing.Field.comUnitRingType F) gT G n rG A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n n)) *)
by rewrite eq_sym; apply: not_rsim_op0 rsim_irr_comp.
Qed.
Lemma irr_comp_envelop : ('R_iG *m lin_mx (gring_op rG) :=: E_G)%MS.
Lemma ker_irr_comp_op : ('R_iG :&: kermx (lin_mx (gring_op rG)))%MS = 0.
Lemma regular_op_inj :
{in [pred A | (A \in 'R_iG)%MS] &, injective (gring_op rG)}.
Lemma rank_irr_comp : \rank 'R_iG = \rank E_G.
End IrrComponent.
Lemma irr_comp_rsim n1 n2 rG1 rG2 :
@mx_rsim _ G n1 rG1 n2 rG2 -> irr_comp rG1 = irr_comp rG2.
Proof.
(* Goal: forall _ : @mx_rsim gT G n1 rG1 n2 rG2, @eq (@socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) (@irr_comp n1 rG1) (@irr_comp n2 rG2) *)
case=> f eq_n12; rewrite -eq_n12 in rG2 f * => inj_f hom_f.
(* Goal: @eq (@socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) (@irr_comp n1 rG1) (@irr_comp n1 rG2) *)
congr (odflt _ _); apply: eq_pick => i; rewrite -!mxrank_eq0.
(* Goal: @eq bool (negb (@eq_op nat_eqType (@mxrank F n1 n1 (@gring_op (GRing.Field.comUnitRingType F) gT G n1 rG1 (Wedderburn_id i))) O)) (negb (@eq_op nat_eqType (@mxrank F n1 n1 (@gring_op (GRing.Field.comUnitRingType F) gT G n1 rG2 (Wedderburn_id i))) O)) *)
rewrite -(mxrankMfree _ inj_f); symmetry; rewrite -(eqmxMfull _ inj_f).
(* Goal: @eq bool (negb (@eq_op nat_eqType (@mxrank F n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 f (@gring_op (GRing.Field.comUnitRingType F) gT G n1 rG2 (Wedderburn_id i)))) O)) (negb (@eq_op nat_eqType (@mxrank F n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 (@gring_op (GRing.Field.comUnitRingType F) gT G n1 rG1 (Wedderburn_id i)) f)) O)) *)
have /envelop_mxP[e ->{i}]: ('e_i \in R_G)%MS.
(* Goal: @eq bool (negb (@eq_op nat_eqType (@mxrank F n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 f (@gring_op (GRing.Field.comUnitRingType F) gT G n1 rG2 (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (e x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x))))))) O)) (negb (@eq_op nat_eqType (@mxrank F n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 (@gring_op (GRing.Field.comUnitRingType F) gT G n1 rG1 (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (e x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x))))) f)) O)) *)
(* Goal: is_true (@submx F (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (Wedderburn_id i)) (@group_ring (GRing.Field.comUnitRingType F) gT G)) *)
by rewrite -Wedderburn_sum (sumsmx_sup i) ?Wedderburn_id_mem.
(* Goal: @eq bool (negb (@eq_op nat_eqType (@mxrank F n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 f (@gring_op (GRing.Field.comUnitRingType F) gT G n1 rG2 (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (e x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x))))))) O)) (negb (@eq_op nat_eqType (@mxrank F n1 n1 (@mulmx (GRing.Field.ringType F) n1 n1 n1 (@gring_op (GRing.Field.comUnitRingType F) gT G n1 rG1 (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (e x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x))))) f)) O)) *)
congr (\rank _ != _); rewrite !(mulmx_suml, linear_sum); apply: eq_bigr => x Gx.
(* Goal: @eq (matrix (GRing.Field.sort F) n1 n1) (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1)))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n1 n1)))))) (@mulmx_linear (GRing.Field.comRingType F) n1 n1 n1 f) (@GRing.Linear.apply (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n1 n1) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 n1)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n1 n1))) (@gring_op_linear (GRing.Field.comUnitRingType F) gT G n1 rG2) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (e x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x)))) (@mulmx (GRing.Field.ringType F) n1 n1 n1 (@GRing.Linear.apply (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n1 n1) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) n1 n1)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) n1 n1))) (@gring_op_linear (GRing.Field.comUnitRingType F) gT G n1 rG1) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (e x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x))) f) *)
by rewrite !linearZ -scalemxAl /= !gring_opG ?hom_f.
Qed.
Lemma irr_reprK i : irr_comp (irr_repr i) = i.
Lemma irr_repr'_op0 i j A :
j != i -> (A \in 'R_j)%MS -> gring_op (irr_repr i) A = 0.
Lemma op_Wedderburn_id i : gring_op (irr_repr i) 'e_i = 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (irr_degree i) (irr_degree i)) (@gring_op (GRing.Field.comUnitRingType F) gT G (irr_degree i) (irr_repr i) (Wedderburn_id i)) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (irr_degree i) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) *)
rewrite -(gring_op1 (irr_repr i)) -Wedderburn_sum_id.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (irr_degree i) (irr_degree i)) (@gring_op (GRing.Field.comUnitRingType F) gT G (irr_degree i) (irr_repr i) (Wedderburn_id i)) (@gring_op (GRing.Field.comUnitRingType F) gT G (irr_degree i) (irr_repr i) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) true (Wedderburn_id i)))) *)
rewrite linear_sum (bigD1 i) //= addrC big1 ?add0r // => j neq_ji.
(* Goal: @eq (matrix (GRing.Field.sort F) (irr_degree i) (irr_degree i)) (@gring_op (GRing.Field.comUnitRingType F) gT G (irr_degree i) (irr_repr i) (Wedderburn_id j)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (irr_degree i) (irr_degree i))) *)
exact: irr_repr'_op0 (Wedderburn_id_mem j).
Qed.
Lemma irr_comp_id (M : 'M_nG) (modM : mxmodule aG M) (iM : sG) :
mxsimple aG M -> (M <= iM)%MS -> irr_comp (submod_repr modM) = iM.
Lemma irr1_repr x : x \in G -> irr_repr 1 x = 1%:M.
Hypothesis splitG : group_splitting_field G.
Lemma rank_Wedderburn_subring i : \rank 'R_i = ('n_i ^ 2)%N.
Proof.
(* Goal: @eq nat (@mxrank F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (Wedderburn_subring i)) (expn (irr_degree i) (S (S O))) *)
apply/eqP; rewrite -{1}[i]irr_reprK; have irrSi := socle_irr i.
(* Goal: is_true (@eq_op nat_eqType (@mxrank F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (Wedderburn_subring (@irr_comp (irr_degree i) (irr_repr i)))) (expn (irr_degree i) (S (S O)))) *)
by case/andP: (splitG irrSi) => _; rewrite rank_irr_comp.
Qed.
Lemma sum_irr_degree : (\sum_i 'n_i ^ 2 = nG)%N.
Lemma irr_mx_mult i : socle_mult i = 'n_i.
Proof.
(* Goal: @eq nat (@socle_mult gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) (irr_degree i) *)
rewrite /socle_mult -(mxrankMfree _ gring_free) -genmxE.
(* Goal: @eq nat (divn (@mxrank F (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@genmx F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mulmx (GRing.Field.ringType F) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@socle_val gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) (@group_ring (GRing.Field.comUnitRingType F) gT G)))) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i))) (irr_degree i) *)
by rewrite rank_Wedderburn_subring mulKn ?irr_degree_gt0.
Qed.
Lemma mxtrace_regular :
{in G, forall x, \tr (aG x) = \sum_i \tr (socle_repr i x) *+ 'n_i}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@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)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@socle_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) x)) (irr_degree i))))) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@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)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@socle_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) x)) (irr_degree i)))))) *)
move=> x Gx; have soc1: (Socle sG :=: 1%:M)%MS by rewrite -irr_mx_sum.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@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)))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) x)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@socle_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) x)) (irr_degree i)))) *)
rewrite -(mxtrace_submod1 (Socle_module sG) soc1) // mxtrace_Socle //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun W : @socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (@socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) W (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG W)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG W)) (@socle_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG W) x)) (@socle_mult gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG W)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (index_enum (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) (fun i : Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (Finite.sort (@socle_finType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG)) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (@mxrank F (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i)) (@socle_repr gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG i) x)) (irr_degree i)))) *)
by apply: eq_bigr => i _; rewrite irr_mx_mult.
Qed.
Definition linear_irr := [set i | 'n_i == 1%N].
Lemma irr_degree_abelian : abelian G -> forall i, 'n_i = 1%N.
Proof.
(* Goal: forall (_ : is_true (@abelian gT (@gval gT G))) (i : @socle_sort gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType F) gT G) sG), @eq nat (irr_degree i) (S O) *)
by move=> cGG i; apply: mxsimple_abelian_linear (socle_simple i).
Qed.
Lemma linear_irr_comp i : 'n_i = 1%N -> (i :=: socle_base i)%MS.
Lemma Wedderburn_subring_center i : ('Z('R_i) :=: mxvec 'e_i)%MS.
Lemma Wedderburn_center :
('Z(R_G) :=: \matrix_(i < #|sG|) mxvec 'e_(enum_val i))%MS.
Lemma card_irr : #|sG| = tG.
Section CenterMode.
Variable i : sG.
Let i0 := Ordinal (irr_degree_gt0 i).
Definition irr_mode x := irr_repr i x i0 i0.
Lemma irr_mode1 : irr_mode 1 = 1.
Lemma irr_center_scalar : {in 'Z(G), forall x, irr_repr i x = (irr_mode x)%:M}.
Lemma irr_modeM : {in 'Z(G) &, {morph irr_mode : x y / (x * y)%g >-> x * y}}.
Proof.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)))) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @eq (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (irr_mode ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x0 y0) x y)) ((fun x0 y0 : GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F) => @GRing.mul (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) x0 y0) (irr_mode x) (irr_mode y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base gT)) (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) irr_mode (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x y) (fun x y : GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F) => @GRing.mul (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) x y))) *)
move=> x y Zx Zy; rewrite {1}/irr_mode repr_mxM ?(subsetP (center_sub G)) //.
(* Goal: @eq (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (irr_degree i) (irr_degree i) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (irr_degree i) (irr_degree i) (irr_degree i) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (irr_degree i) (irr_repr i) x) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (irr_degree i) (irr_repr i) y)) i0 i0) (@GRing.mul (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (irr_mode x) (irr_mode y)) *)
by rewrite !irr_center_scalar // -scalar_mxM mxE eqxx.
Qed.
Lemma irr_modeX n : {in 'Z(G), {morph irr_mode : x / (x ^+ n)%g >-> x ^+ n}}.
Lemma irr_mode_unit : {in 'Z(G), forall x, irr_mode x \is a GRing.unit}.
Lemma irr_mode_neq0 : {in 'Z(G), forall x, irr_mode x != 0}.
Lemma irr_modeV : {in 'Z(G), {morph irr_mode : x / (x^-1)%g >-> x^-1}}.
End CenterMode.
Lemma irr1_mode x : x \in G -> irr_mode 1 x = 1.
End Regular.
Local Notation "[ 1 sG ]" := (principal_comp sG) : irrType_scope.
Section LinearIrr.
Variables (gT : finGroupType) (G : {group gT}).
Lemma card_linear_irr (sG : irrType G) :
[char F]^'.-group G -> group_splitting_field G ->
Lemma primitive_root_splitting_abelian (z : F) :
#|G|.-primitive_root z -> abelian G -> group_splitting_field G.
Proof.
(* Goal: forall (_ : is_true (@primitive_root_of_unity (GRing.Field.ringType F) (@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)))) z)) (_ : is_true (@abelian gT (@gval gT G))), @group_splitting_field gT G *)
move=> ozG cGG [|n] rG irrG; first by case/mx_irrP: irrG.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
case: (pickP [pred x in G | ~~ is_scalar_mx (rG x)]) => [x | scalG].
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: forall _ : is_true (@pred_of_simpl (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@SimplPred (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (negb (@is_scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S n) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x))))) x), is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
case/andP=> Gx nscal_rGx; have: horner_mx (rG x) ('X^#|G| - 1) == 0.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n))) (@horner_mx (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (polyX (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (GRing.one (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))))))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)))), is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n))) (@horner_mx (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (polyX (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (GRing.one (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))))))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)))) *)
rewrite rmorphB rmorphX /= horner_mx_C horner_mx_X.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n))) (@horner_mx (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (polyX (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (GRing.one (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))))))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)))), is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n))) (@GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)) (@GRing.exp (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)) (@scalar_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S n) (GRing.one (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)))) *)
rewrite -repr_mxX ?inE // ((_ ^+ _ =P 1)%g _) ?repr_mx1 ?subrr //.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n))) (@horner_mx (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (polyX (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (GRing.one (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))))))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)))), is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@eq_op (FinGroup.eqType (FinGroup.base gT)) (@expgn (FinGroup.base gT) x (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (oneg (FinGroup.base gT))) *)
by rewrite -order_dvdn order_dvdG.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n))) (@horner_mx (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (polyX (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))))) (GRing.one (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))))))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)))), is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
case/idPn; rewrite -mxrank_eq0 -(factor_Xn_sub_1 ozG).
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (negb (@eq_op nat_eqType (@mxrank F (S n) (S n) (@horner_mx (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) nat (GRing.one (poly_ringType (GRing.Field.ringType F))) (index_iota O (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun i : nat => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) nat i (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) (@GRing.exp (GRing.Field.ringType F) z i)))))))) O)) *)
elim: #|G| => [|i IHi]; first by rewrite big_nil horner_mx_C mxrank1.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (negb (@eq_op nat_eqType (@mxrank F (S n) (S n) (@horner_mx (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) nat (GRing.one (poly_ringType (GRing.Field.ringType F))) (index_iota O (S i)) (fun i : nat => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) nat i (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) (@GRing.exp (GRing.Field.ringType F) z i)))))))) O)) *)
rewrite big_nat_recr //= rmorphM mxrankMfree {IHi}//.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@row_free F (S n) (S n) (@GRing.RMorphism.apply (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))) (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n) (Phant (forall _ : GRing.Ring.sort (poly_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)))), GRing.Ring.sort (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n))) (@horner_mx_rmorphism (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F)) n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x)) (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) (@GRing.exp (GRing.Field.ringType F) z i)))))) *)
rewrite row_free_unit rmorphB /= horner_mx_X horner_mx_C.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) (S n) (S n)) (@GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)) (@scalar_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S n) (@GRing.exp (GRing.Field.ringType F) z i)))) (@mem (matrix (GRing.Field.sort F) (S n) (S n)) (predPredType (matrix (GRing.Field.sort F) (S n) (S n))) (@unitmx (GRing.Field.comUnitRingType F) (S n)))) *)
rewrite (mx_Schur irrG) ?subr_eq0 //; last first.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@centgmx (GRing.Field.comUnitRingType F) gT G (S n) rG (@GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)) (@scalar_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S n) (@GRing.exp (GRing.Field.ringType F) z i))))) *)
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType F)) (S n) (S n))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@scalar_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S n) (@GRing.exp (GRing.Field.ringType F) z i)))) *)
by apply: contraNneq nscal_rGx => ->; apply: scalar_mx_is_scalar.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@centgmx (GRing.Field.comUnitRingType F) gT G (S n) rG (@GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x) (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n)) (@scalar_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S n) (@GRing.exp (GRing.Field.ringType F) z i))))) *)
rewrite -memmx_cent_envelop linearB.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@submx F (S O) (muln (S n) (S n)) (muln (S n) (S n)) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n) (S n)))) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n) (S n)) (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n) (S n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n) (S n)))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n) (S n)), GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n) (S n)))))) (mxvec_linear (GRing.Field.ringType F) (S n) (S n)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x)) (@GRing.opp (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n) (S n)))) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n) (S n)) (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n) (S n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n) (S n)))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n) (S n)), GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n) (S n)))))) (mxvec_linear (GRing.Field.ringType F) (S n) (S n)) (@scalar_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S n) (@GRing.exp (GRing.Field.ringType F) z i))))) (@cent_mx F (@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 n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G (S n) rG))) *)
rewrite addmx_sub ?eqmx_opp ?scalar_mx_cent //= memmx_cent_envelop.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@centgmx (GRing.Field.comUnitRingType F) gT G (S n) rG (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x)) *)
by apply/centgmxP=> j Zh_j; rewrite -!repr_mxM // (centsP cGG).
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
pose M := <<delta_mx 0 0 : 'rV[F]_n.+1>>%MS.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
have linM: \rank M = 1%N by rewrite genmxE mxrank_delta.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
have modM: mxmodule rG M.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: is_true (@mxmodule gT G (S n) rG (S n) M) *)
apply/mxmoduleP=> x Gx; move/idPn: (scalG x); rewrite /= Gx negbK.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
(* Goal: forall _ : is_true (@is_scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S n) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x)), is_true (@submx F (S n) (S n) (S n) (@mulmx (GRing.Field.ringType F) (S n) (S n) (S n) M (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n) rG x)) M) *)
by case/is_scalar_mxP=> ? ->; rewrite scalar_mxC submxMl.
(* Goal: is_true (@mx_absolutely_irreducible gT G (S n) rG) *)
apply: linear_mx_abs_irr; apply/eqP; rewrite eq_sym -linM.
(* Goal: is_true (@eq_op nat_eqType (@mxrank F (S n) (S n) M) (S n)) *)
by case/mx_irrP: irrG => _; apply; rewrite // -mxrank_eq0 linM.
Qed.
Lemma cycle_repr_structure x (sG : irrType G) :
G :=: <[x]> -> [char F]^'.-group G -> group_splitting_field G ->
Lemma splitting_cyclic_primitive_root :
cyclic G -> [char F]^'.-group G -> group_splitting_field G ->
Proof.
(* Goal: forall (_ : is_true (@cyclic gT (@gval gT G))) (_ : is_true (@pgroup gT (negn (@GRing.char (GRing.Field.ringType F) (Phant (GRing.Field.sort F)))) (@gval gT G))) (_ : @group_splitting_field gT G), classically (@sig (GRing.Field.sort F) (fun z : GRing.Field.sort F => is_true (@primitive_root_of_unity (GRing.Field.ringType F) (@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)))) z))) *)
case/cyclicP=> x defG F'G splitF; case=> // IH.
(* Goal: is_true false *)
wlog sG: / irrType G by apply: socle_exists.
(* Goal: is_true false *)
have [w prim_w _] := cycle_repr_structure sG defG F'G splitF.
(* Goal: is_true false *)
by apply: IH; exists w.
Qed.
End LinearIrr.
End FieldRepr.
Arguments rfix_mx {F gT G%g n%N} rG H%g.
Arguments gset_mx F {gT} G%g A%g.
Arguments classg_base F {gT} G%g _%g : extra scopes.
Arguments irrType F {gT} G%g.
Arguments mxmoduleP {F gT G n rG m U}.
Arguments envelop_mxP {F gT G n rG A}.
Arguments hom_mxP {F gT G n rG m f W}.
Arguments mx_Maschke [F gT G n] rG _ [U].
Arguments rfix_mxP {F gT G n rG m W}.
Arguments cyclic_mxP {F gT G n rG u v}.
Arguments annihilator_mxP {F gT G n rG u A}.
Arguments row_hom_mxP {F gT G n rG u v}.
Arguments mxsimple_isoP {F gT G n rG U V}.
Arguments socle_exists [F gT G n].
Arguments socleP {F gT G n rG sG0 W W'}.
Arguments mx_abs_irrP {F gT G n rG}.
Arguments socle_rsimP {F gT G n rG sG W1 W2}.
Arguments val_submod {F n U m} W.
Arguments in_submod {F n} U {m} W.
Arguments val_submodK {F n U m} W : rename.
Arguments in_submodK {F n U m} [W] sWU.
Arguments val_submod_inj {F n U m} [W1 W2] : rename.
Arguments val_factmod {F n U m} W.
Arguments in_factmod {F n} U {m} W.
Arguments val_factmodK {F n U m} W : rename.
Arguments in_factmodK {F n} U {m} [W] sWU.
Arguments val_factmod_inj {F n U m} [W1 W2] : rename.
Notation "'Cl" := (Clifford_action _) : action_scope.
Arguments gring_row {R gT G} A.
Arguments gring_rowK {F gT G} [A] RG_A.
Bind Scope irrType_scope with socle_sort.
Notation "[ 1 sG ]" := (principal_comp sG) : irrType_scope.
Arguments irr_degree {F gT G%G sG} i%irr.
Arguments irr_repr {F gT G%G sG} i%irr _%g : extra scopes.
Arguments irr_mode {F gT G%G sG} i%irr z%g : rename.
Notation "''n_' i" := (irr_degree i) : group_ring_scope.
Notation "''R_' i" := (Wedderburn_subring i) : group_ring_scope.
Notation "''e_' i" := (Wedderburn_id i) : group_ring_scope.
Section DecideRed.
Import MatrixFormula.
Local Notation term := GRing.term.
Local Notation True := GRing.True.
Local Notation And := GRing.And (only parsing).
Local Notation morphAnd f := ((big_morph f) true andb).
Local Notation eval := GRing.eval.
Local Notation holds := GRing.holds.
Local Notation qf_form := GRing.qf_form.
Local Notation qf_eval := GRing.qf_eval.
Section Definitions.
Variables (F : fieldType) (gT : finGroupType) (G : {group gT}) (n : nat).
Variable rG : mx_representation F G n.
Definition mxmodule_form (U : 'M[term F]_n) :=
\big[And/True]_(x in G) submx_form (mulmx_term U (mx_term (rG x))) U.
Lemma mxmodule_form_qf U : qf_form (mxmodule_form U).
Proof.
(* Goal: is_true (@GRing.qf_form (GRing.Field.unitRingType F) (mxmodule_form U)) *)
by rewrite (morphAnd (@qf_form _)) ?big1 //= => x _; rewrite submx_form_qf.
Qed.
Lemma eval_mxmodule U e :
qf_eval e (mxmodule_form U) = mxmodule rG (eval_mx e U).
Proof.
(* Goal: @eq bool (@GRing.qf_eval (GRing.Field.unitRingType F) e (mxmodule_form U)) (@mxmodule F gT G n rG n (@eval_mx F e n n U)) *)
rewrite (morphAnd (qf_eval e)) //= big_andE /=.
(* Goal: @eq bool (@FiniteQuant.quant0b (FinGroup.arg_finType (FinGroup.base gT)) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @FiniteQuant.all_in (FinGroup.arg_finType (FinGroup.base gT)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (FiniteQuant.Quantified (@GRing.qf_eval (GRing.Field.unitRingType F) e (@submx_form F n n n (@mulmx_term F n n n U (@mx_term F n n (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) n rG i))) U))) i)) (@mxmodule F gT G n rG n (@eval_mx F e n n U)) *)
apply/forallP/mxmoduleP=> Umod x; move/implyP: (Umod x); by rewrite eval_submx eval_mulmx eval_mx_term.
Qed.
Definition mxnonsimple_form (U : 'M[term F]_n) :=
let V := vec_mx (row_var F (n * n) 0) in
let nzV := (~ mxrank_form 0 V)%T in
let properVU := (submx_form V U /\ ~ submx_form U V)%T in
(Exists_row_form (n * n) 0 (mxmodule_form V /\ nzV /\ properVU))%T.
End Definitions.
Variables (F : decFieldType) (gT : finGroupType) (G : {group gT}) (n : nat).
Variable rG : mx_representation F G n.
Definition mxnonsimple_sat U :=
GRing.sat (@row_env _ (n * n) [::]) (mxnonsimple_form rG (mx_term U)).
Lemma mxnonsimpleP U :
U != 0 -> reflect (mxnonsimple rG U) (mxnonsimple_sat U).
Lemma dec_mxsimple_exists (U : 'M_n) :
mxmodule rG U -> U != 0 -> {V | mxsimple rG V & V <= U}%MS.
Proof.
(* Goal: forall (_ : is_true (@mxmodule (GRing.DecidableField.fieldType F) gT G n rG n U)) (_ : is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType (GRing.DecidableField.fieldType F)) n n) U (GRing.zero (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) n n))))), @sig2 (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => @mxsimple (GRing.DecidableField.fieldType F) gT G n rG V) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => is_true (@submx (GRing.DecidableField.fieldType F) n n n V U)) *)
elim: {U}_.+1 {-2}U (ltnSn (\rank U)) => // m IHm U leUm modU nzU.
(* Goal: @sig2 (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => @mxsimple (GRing.DecidableField.fieldType F) gT G n rG V) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => is_true (@submx (GRing.DecidableField.fieldType F) n n n V U)) *)
have [nsimU | simU] := mxnonsimpleP nzU; last first.
(* Goal: @sig2 (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => @mxsimple (GRing.DecidableField.fieldType F) gT G n rG V) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => is_true (@submx (GRing.DecidableField.fieldType F) n n n V U)) *)
(* Goal: @sig2 (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => @mxsimple (GRing.DecidableField.fieldType F) gT G n rG V) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => is_true (@submx (GRing.DecidableField.fieldType F) n n n V U)) *)
by exists U; first apply/mxsimpleP.
(* Goal: @sig2 (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => @mxsimple (GRing.DecidableField.fieldType F) gT G n rG V) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => is_true (@submx (GRing.DecidableField.fieldType F) n n n V U)) *)
move: (xchooseP nsimU); move: (xchoose _) => W /and4P[modW sWU nzW ltWU].
(* Goal: @sig2 (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => @mxsimple (GRing.DecidableField.fieldType F) gT G n rG V) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => is_true (@submx (GRing.DecidableField.fieldType F) n n n V U)) *)
case: (IHm W) => // [|V simV sVW]; first exact: leq_trans ltWU _.
(* Goal: @sig2 (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => @mxsimple (GRing.DecidableField.fieldType F) gT G n rG V) (fun V : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) n n => is_true (@submx (GRing.DecidableField.fieldType F) n n n V U)) *)
by exists V; last apply: submx_trans sVW sWU.
Qed.
Lemma dec_mx_reducible_semisimple U :
mxmodule rG U -> mx_completely_reducible rG U -> mxsemisimple rG U.
Lemma DecSocleType : socleType rG.
End DecideRed.
Prenex Implicits mxmodule_form mxnonsimple_form mxnonsimple_sat.
Section ChangeOfField.
Variables (aF rF : fieldType) (f : {rmorphism aF -> rF}).
Local Notation "A ^f" := (map_mx (GRing.RMorphism.apply f) A) : ring_scope.
Variables (gT : finGroupType) (G : {group gT}).
Section OneRepresentation.
Variables (n : nat) (rG : mx_representation aF G n).
Local Notation rGf := (map_repr f rG).
Lemma map_rfix_mx H : (rfix_mx rG H)^f = rfix_mx rGf H.
Lemma rcent_map A : rcent rGf A^f = rcent rG A.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rcent (GRing.Field.comUnitRingType rF) gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n A)) (@rcent (GRing.Field.comUnitRingType aF) gT G n rG A) *)
by apply/setP=> x; rewrite !inE -!map_mxM inj_eq //; apply: map_mx_inj.
Qed.
Lemma rstab_map m (U : 'M_(m, n)) : rstab rGf U^f = rstab rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstab (GRing.Field.comUnitRingType rF) gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG) m (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n U)) (@rstab (GRing.Field.comUnitRingType aF) gT G n rG m U) *)
by apply/setP=> x; rewrite !inE -!map_mxM inj_eq //; apply: map_mx_inj.
Qed.
Lemma rstabs_map m (U : 'M_(m, n)) : rstabs rGf U^f = rstabs rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstabs rF gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG) m (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n U)) (@rstabs aF gT G n rG m U) *)
by apply/setP=> x; rewrite !inE -!map_mxM ?map_submx.
Qed.
Lemma centgmx_map A : centgmx rGf A^f = centgmx rG A.
Proof.
(* Goal: @eq bool (@centgmx (GRing.Field.comUnitRingType rF) gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n A)) (@centgmx (GRing.Field.comUnitRingType aF) gT G n rG A) *)
by rewrite /centgmx rcent_map.
Qed.
Lemma mxmodule_map m (U : 'M_(m, n)) : mxmodule rGf U^f = mxmodule rG U.
Proof.
(* Goal: @eq bool (@mxmodule rF gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG) m (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n U)) (@mxmodule aF gT G n rG m U) *)
by rewrite /mxmodule rstabs_map.
Qed.
Lemma mxsimple_map (U : 'M_n) : mxsimple rGf U^f -> mxsimple rG U.
Proof.
(* Goal: forall _ : @mxsimple rF gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n U), @mxsimple aF gT G n rG U *)
case; rewrite map_mx_eq0 // mxmodule_map // => modU nzU minU.
(* Goal: @mxsimple aF gT G n rG U *)
split=> // V modV sVU nzV; rewrite -(map_submx f).
(* Goal: is_true (@submx rF n n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n U) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n V)) *)
by rewrite (minU V^f) //= ?mxmodule_map ?map_mx_eq0 // map_submx.
Qed.
Lemma mx_irr_map : mx_irreducible rGf -> mx_irreducible rG.
Proof.
(* Goal: forall _ : @mx_irreducible rF gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG), @mx_irreducible aF gT G n rG *)
by move=> irrGf; apply: mxsimple_map; rewrite map_mx1.
Qed.
Lemma rker_map : rker rGf = rker rG.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rker (GRing.Field.comUnitRingType rF) gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG)) (@rker (GRing.Field.comUnitRingType aF) gT G n rG) *)
by rewrite /rker -rstab_map map_mx1.
Qed.
Lemma map_mx_faithful : mx_faithful rGf = mx_faithful rG.
Proof.
(* Goal: @eq bool (@mx_faithful (GRing.Field.comUnitRingType rF) gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG)) (@mx_faithful (GRing.Field.comUnitRingType aF) gT G n rG) *)
by rewrite /mx_faithful rker_map.
Qed.
Lemma map_mx_abs_irr :
mx_absolutely_irreducible rGf = mx_absolutely_irreducible rG.
Proof.
(* Goal: @eq bool (@mx_absolutely_irreducible rF gT G n (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n rG)) (@mx_absolutely_irreducible aF gT G n rG) *)
by rewrite /mx_absolutely_irreducible -map_enveloping_algebra_mx row_full_map.
Qed.
End OneRepresentation.
Lemma mx_rsim_map n1 n2 rG1 rG2 :
@mx_rsim _ _ G n1 rG1 n2 rG2 -> mx_rsim (map_repr f rG1) (map_repr f rG2).
Proof.
(* Goal: forall _ : @mx_rsim aF gT G n1 rG1 n2 rG2, @mx_rsim rF gT G n1 (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n1 rG1) n2 (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n2 rG2) *)
case=> g eqn12 inj_g hom_g.
(* Goal: @mx_rsim rF gT G n1 (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n1 rG1) n2 (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G n2 rG2) *)
by exists g^f => // [|x Gx]; rewrite ?row_free_map // -!map_mxM ?hom_g.
Qed.
Lemma map_section_repr n (rG : mx_representation aF G n) rGf U V
(modU : mxmodule rG U) (modV : mxmodule rG V)
(modUf : mxmodule rGf U^f) (modVf : mxmodule rGf V^f) :
map_repr f rG =1 rGf ->
mx_rsim (map_repr f (section_repr modU modV)) (section_repr modUf modVf).
Lemma map_regular_subseries U i (modU : mx_subseries (regular_repr aF G) U)
(modUf : mx_subseries (regular_repr rF G) [seq M^f | M <- U]) :
mx_rsim (map_repr f (subseries_repr i modU)) (subseries_repr i modUf).
Proof.
(* Goal: @mx_rsim rF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@subseries_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) U i modU)) (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@map (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun M : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) M) U)) i))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@map (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun M : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) M) U)) i))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@map (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun M : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) M) U)) i))) (@in_factmod rF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@map (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun M : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) M) U)) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@map (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun M : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) M) U) i)))) (@subseries_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@map (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun M : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) => @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) M) U) i modUf) *)
set mf := map _ in modUf *; rewrite /subseries_repr.
(* Goal: @mx_rsim rF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@section_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i) (@mx_subseries_module' aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) U i modU) (@mx_subseries_module aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) U i modU))) (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@in_factmod rF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i)))) (@section_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i) (@mx_subseries_module' rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (mf U) i modUf) (@mx_subseries_module rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (mf U) i modUf)) *)
do 2!move: (mx_subseries_module' _ _) (mx_subseries_module _ _).
(* Goal: forall (mx_subseries_module' : is_true (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (mx_subseries_module : is_true (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i))) (mx_subseries_module'0 : is_true (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (mx_subseries_module0 : is_true (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i))), @mx_rsim rF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@section_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i) mx_subseries_module'0 mx_subseries_module0)) (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@in_factmod rF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i)))) (@section_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i) mx_subseries_module' mx_subseries_module) *)
have mf_i V: nth 0^f (mf V) i = (V`_i)^f.
(* Goal: forall (mx_subseries_module' : is_true (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (mx_subseries_module : is_true (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i))) (mx_subseries_module'0 : is_true (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (mx_subseries_module0 : is_true (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i))), @mx_rsim rF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@section_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i) mx_subseries_module'0 mx_subseries_module0)) (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@in_factmod rF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i)))) (@section_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i) mx_subseries_module' mx_subseries_module) *)
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@nth (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (mf V) i) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) V i)) *)
case: (ltnP i (size V)) => [ltiV | leVi]; first exact: nth_map.
(* Goal: forall (mx_subseries_module' : is_true (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (mx_subseries_module : is_true (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i))) (mx_subseries_module'0 : is_true (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (mx_subseries_module0 : is_true (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i))), @mx_rsim rF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@section_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i) mx_subseries_module'0 mx_subseries_module0)) (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@in_factmod rF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i)))) (@section_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i) mx_subseries_module' mx_subseries_module) *)
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@nth (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (mf V) i) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) V i)) *)
by rewrite !nth_default ?size_map.
(* Goal: forall (mx_subseries_module' : is_true (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (mx_subseries_module : is_true (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i))) (mx_subseries_module'0 : is_true (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (mx_subseries_module0 : is_true (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i))), @mx_rsim rF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@section_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i) mx_subseries_module'0 mx_subseries_module0)) (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i))) (@in_factmod rF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i)))) (@section_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U)) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (mf U) i) mx_subseries_module' mx_subseries_module) *)
rewrite -(map_mx0 f) mf_i (mf_i (0 :: U)) => modUi'f modUif modUi' modUi.
(* Goal: @mx_rsim rF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@section_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i) modUi' modUi)) (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i)))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i)))) (@in_factmod rF (@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)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i))))) (@section_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)) modUi'f modUif) *)
by apply: map_section_repr; apply: map_regular_repr.
Qed.
Lemma extend_group_splitting_field :
group_splitting_field aF G -> group_splitting_field rF G.
Proof.
(* Goal: forall _ : @group_splitting_field aF gT G, @group_splitting_field rF gT G *)
move=> splitG n rG irrG.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
have modU0: all ((mxmodule (regular_repr aF G)) #|G|) [::] by [].
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
apply: (mx_Schreier modU0 _) => // [[U [compU lastU _]]]; have [modU _]:= compU.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
pose Uf := map (map_mx f) U.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
have{lastU} lastUf: (last 0 Uf :=: 1%:M)%MS.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: @eqmx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@last (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) (@scalar_mx (GRing.Field.ringType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.one (GRing.Field.ringType rF))) *)
by rewrite -(map_mx0 f) -(map_mx1 f) last_map; apply/map_eqmx.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
have modUf: mx_subseries (regular_repr rF G) Uf.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: is_true (@mx_subseries rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) Uf) *)
rewrite /mx_subseries all_map; apply: etrans modU; apply: eq_all => Ui /=.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: @eq bool (@mxmodule rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) Ui)) (@mxmodule aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) Ui) *)
rewrite -mxmodule_map; apply: eq_subset_r => x.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@rstabs rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) Ui))))) (@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)) (@rstabs rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) Ui))))) *)
by rewrite !inE map_regular_repr.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
have absUf i: i < size U -> mx_absolutely_irreducible (subseries_repr i modUf).
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: forall _ : is_true (leq (S i) (@size (matrix (GRing.Field.sort aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) U)), is_true (@mx_absolutely_irreducible rF gT G (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i))) (@in_factmod rF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf i)))) (@subseries_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) Uf i modUf)) *)
move=> lt_i_U; rewrite -(mx_rsim_abs_irr (map_regular_subseries i modU _)).
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: is_true (@mx_absolutely_irreducible rF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@map_repr (GRing.Field.comUnitRingType aF) (GRing.Field.comUnitRingType rF) f gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@subseries_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) U i modU))) *)
rewrite map_mx_abs_irr; apply: splitG.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: @mx_irreducible aF gT G (@mxrank aF (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@genmx aF (@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)))) (@mxrank aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx aF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i))) (@in_factmod aF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType aF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i)))) (@subseries_repr aF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType aF) gT G) U i modU) *)
by apply: mx_rsim_irr (mx_series_repr_irr compU lt_i_U); apply: section_eqmx.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
have compUf: mx_composition_series (regular_repr rF G) Uf.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: @mx_composition_series rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) Uf *)
split=> // i; rewrite size_map => ltiU.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: @max_submod rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf i) *)
move/max_submodP: (mx_abs_irrW (absUf i ltiU)); apply.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: is_true (@submx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf i)) *)
rewrite -{2}(map_mx0 f) -map_cons !(nth_map 0) ?leqW //.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: is_true (@submx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.Additive.apply (GRing.Ring.zmodType (GRing.Field.ringType aF)) (GRing.Ring.zmodType (GRing.Field.ringType rF)) (Phant (forall _ : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF)), GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF)))) (@GRing.RMorphism.additive (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U) i)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) U i))) *)
by rewrite map_submx // ltmxW // (pathP _ (mx_series_lt compU)).
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
have [[i ltiU] simUi] := rsim_regular_series irrG compUf lastUf.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
have{simUi} simUi: mx_rsim rG (subseries_repr i modUf).
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
(* Goal: @mx_rsim rF gT G n rG (@mxrank rF (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i))) (@genmx rF (@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)))) (@mxrank rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@cokermx rF (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i))) (@in_factmod rF (@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)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@cons (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf) i) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType rF) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) Uf i)))) (@subseries_repr rF gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType rF) gT G) Uf i modUf) *)
by apply: mx_rsim_trans simUi _; apply: section_eqmx.
(* Goal: is_true (@mx_absolutely_irreducible rF gT G n rG) *)
by rewrite (mx_rsim_abs_irr simUi) absUf; rewrite size_map in ltiU.
Qed.
End ChangeOfField.
Module Import MatrixGenField.
Record gen_of {F : fieldType} {gT : finGroupType} {G : {group gT}} {n' : nat}
{rG : mx_representation F G n'.+1} {A : 'M[F]_n'.+1}
(irrG : mx_irreducible rG) (cGA : centgmx rG A) :=
Gen {rVval : 'rV[F]_(degree_mxminpoly A)}.
Local Arguments rVval {F gT G%G n'%N rG A%R irrG cGA} x%R : rename.
Bind Scope ring_scope with gen_of.
Section GenField.
Variables (F : fieldType) (gT : finGroupType) (G : {group gT}) (n' : nat).
Local Notation n := n'.+1.
Variables (rG : mx_representation F G n) (A : 'M[F]_n).
Local Notation d := (degree_mxminpoly A).
Local Notation Ad := (powers_mx A d).
Local Notation pA := (mxminpoly A).
Let d_gt0 := mxminpoly_nonconstant A.
Local Notation irr := mx_irreducible.
Hypotheses (irrG : irr rG) (cGA : centgmx rG A).
Notation FA := (gen_of irrG cGA).
Let inFA := Gen irrG cGA.
Canonical gen_subType := Eval hnf in [newType for rVval : FA -> 'rV_d].
Definition gen_eqMixin := Eval hnf in [eqMixin of FA by <:].
Canonical gen_eqType := Eval hnf in EqType FA gen_eqMixin.
Definition gen_choiceMixin := [choiceMixin of FA by <:].
Canonical gen_choiceType := Eval hnf in ChoiceType FA gen_choiceMixin.
Definition gen0 := inFA 0.
Definition genN (x : FA) := inFA (- val x).
Definition genD (x y : FA) := inFA (val x + val y).
Lemma gen_addA : associative genD.
Proof.
(* Goal: @associative (@gen_of F gT G n' rG A irrG cGA) genD *)
by move=> x y z; apply: val_inj; rewrite /= addrA.
Qed.
Lemma gen_addC : commutative genD.
Proof.
(* Goal: @commutative (@gen_of F gT G n' rG A irrG cGA) (@gen_of F gT G n' rG A irrG cGA) genD *)
by move=> x y; apply: val_inj; rewrite /= addrC.
Qed.
Lemma gen_add0r : left_id gen0 genD.
Proof.
(* Goal: @left_id (@gen_of F gT G n' rG A irrG cGA) (@gen_of F gT G n' rG A irrG cGA) gen0 genD *)
by move=> x; apply: val_inj; rewrite /= add0r.
Qed.
Lemma gen_addNr : left_inverse gen0 genN genD.
Proof.
(* Goal: @left_inverse (@gen_of F gT G n' rG A irrG cGA) (@gen_of F gT G n' rG A irrG cGA) (@gen_of F gT G n' rG A irrG cGA) gen0 genN genD *)
by move=> x; apply: val_inj; rewrite /= addNr.
Qed.
Definition gen_zmodMixin := ZmodMixin gen_addA gen_addC gen_add0r gen_addNr.
Canonical gen_zmodType := Eval hnf in ZmodType FA gen_zmodMixin.
Definition pval (x : FA) := rVpoly (val x).
Definition mxval (x : FA) := horner_mx A (pval x).
Definition gen (x : F) := inFA (poly_rV x%:P).
Lemma genK x : mxval (gen x) = x%:M.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (mxval (gen x)) (@scalar_mx (GRing.Field.ringType F) (S n') x) *)
by rewrite /mxval [pval _]poly_rV_K ?horner_mx_C // size_polyC; case: (x != 0).
Qed.
Lemma mxval_inj : injective mxval.
Proof.
(* Goal: @injective (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (@gen_of F gT G n' rG A irrG cGA) mxval *)
exact: inj_comp horner_rVpoly_inj val_inj.
Qed.
Lemma mxval0 : mxval 0 = 0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (mxval (GRing.zero gen_zmodType)) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) *)
by rewrite /mxval [pval _]raddf0 rmorph0.
Qed.
Lemma mxvalN : {morph mxval : x / - x}.
Proof.
(* Goal: @morphism_1 (@gen_of F gT G n' rG A irrG cGA) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) mxval (fun x : @gen_of F gT G n' rG A irrG cGA => @GRing.opp gen_zmodType x) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) => @GRing.opp (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) x) *)
by move=> x; rewrite /mxval [pval _]raddfN rmorphN.
Qed.
Lemma mxvalD : {morph mxval : x y / x + y}.
Proof.
(* Goal: @morphism_2 (@gen_of F gT G n' rG A irrG cGA) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) mxval (fun x y : @gen_of F gT G n' rG A irrG cGA => @GRing.add gen_zmodType x y) (fun x y : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) => @GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) x y) *)
by move=> x y; rewrite /mxval [pval _]raddfD rmorphD.
Qed.
Definition mxval_sum := big_morph mxval mxvalD mxval0.
Definition gen1 := inFA (poly_rV 1).
Definition genM x y := inFA (poly_rV (pval x * pval y %% pA)).
Definition genV x := inFA (poly_rV (mx_inv_horner A (mxval x)^-1)).
Lemma mxval_gen1 : mxval gen1 = 1%:M.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (mxval gen1) (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F)))) *)
by rewrite /mxval [pval _]poly_rV_K ?size_poly1 // horner_mx_C.
Qed.
Lemma mxval_genM : {morph mxval : x y / genM x y >-> x *m y}.
Proof.
(* Goal: @morphism_2 (@gen_of F gT G n' rG A irrG cGA) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) mxval (fun x y : @gen_of F gT G n' rG A irrG cGA => genM x y) (fun x y : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) => @mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (S n') (S n') x y) *)
move=> x y; rewrite /mxval [pval _]poly_rV_K ?size_mod_mxminpoly //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (@horner_mx (GRing.Field.comRingType F) n' A (Pdiv.Field.modp (GRing.Field.idomainType F) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) (pval x) (pval y)) (@mxminpoly F n' A))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (S n') (S n') (@horner_mx (GRing.Field.comRingType F) n' A (pval x)) (@horner_mx (GRing.Field.comRingType F) n' A (pval y))) *)
by rewrite -horner_mxK mx_inv_hornerK ?horner_mx_mem // rmorphM.
Qed.
Lemma mxval_genV : {morph mxval : x / genV x >-> invmx x}.
Proof.
(* Goal: @morphism_1 (@gen_of F gT G n' rG A irrG cGA) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) mxval (fun x : @gen_of F gT G n' rG A irrG cGA => genV x) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) => @invmx (GRing.Field.comUnitRingType F) (S n') x) *)
move=> x; rewrite /mxval [pval _]poly_rV_K ?size_poly ?mx_inv_hornerK //.
(* Goal: is_true (@submx F (S O) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') (mxval x))) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) *)
pose m B : 'M[F]_(n * n) := lin_mx (mulmxr B); set B := mxval x.
(* Goal: is_true (@submx F (S O) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') B)) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) *)
case uB: (B \is a GRing.unit); last by rewrite invr_out ?uB ?horner_mx_mem.
(* Goal: is_true (@submx F (S O) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') B)) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) *)
have defAd: Ad = Ad *m m B *m m B^-1.
(* Goal: is_true (@submx F (S O) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') B)) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (@degree_mxminpoly F n' A) (muln (S n') (S n'))) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A)) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A)) (m B)) (m (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') B))) *)
apply/row_matrixP=> i.
(* Goal: is_true (@submx F (S O) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') B)) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (muln (S n') (S n'))) (@row (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (@degree_mxminpoly F n' A) (muln (S n') (S n')) i (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) (@row (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (@degree_mxminpoly F n' A) (muln (S n') (S n')) i (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A)) (m B)) (m (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') B)))) *)
by rewrite !row_mul mul_rV_lin /= mx_rV_lin /= mulmxK ?vec_mxK.
(* Goal: is_true (@submx F (S O) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') B)) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) *)
rewrite -[B^-1]mul1mx -(mul_vec_lin (mulmxr_linear _ _)) defAd submxMr //.
(* Goal: is_true (@submx F (S O) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n') (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S n') (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A)) (m B))) *)
rewrite -mxval_gen1 (submx_trans (horner_mx_mem _ _)) // {1}defAd.
(* Goal: is_true (@submx F (@degree_mxminpoly F n' A) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A)) (m B)) (m (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType F) n') B))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A)) (m B))) *)
rewrite -(geq_leqif (mxrank_leqif_sup _)) ?mxrankM_maxl // -{}defAd.
(* Goal: is_true (@submx F (@degree_mxminpoly F n' A) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A)) (m B)) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) *)
apply/row_subP=> i; rewrite row_mul rowK mul_vec_lin /= -{2}[A]horner_mx_X.
(* Goal: is_true (@submx F (S O) (@degree_mxminpoly F n' A) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@mulmx (GRing.Field.ringType F) (S n') (S n') (S n') (@GRing.exp (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') (@horner_mx (GRing.Field.comRingType F) n' A (polyX (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (@nat_of_ord (@degree_mxminpoly F n' A) i)) B)) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A))) *)
by rewrite -rmorphX mulmxE -rmorphM horner_mx_mem.
Qed.
Lemma gen_mulA : associative genM.
Proof.
(* Goal: @associative (@gen_of F gT G n' rG A irrG cGA) genM *)
by move=> x y z; apply: mxval_inj; rewrite !mxval_genM mulmxA.
Qed.
Lemma gen_mulC : commutative genM.
Proof.
(* Goal: @commutative (@gen_of F gT G n' rG A irrG cGA) (@gen_of F gT G n' rG A irrG cGA) genM *)
by move=> x y; rewrite /genM mulrC.
Qed.
Lemma gen_mul1r : left_id gen1 genM.
Proof.
(* Goal: @left_id (@gen_of F gT G n' rG A irrG cGA) (@gen_of F gT G n' rG A irrG cGA) gen1 genM *)
by move=> x; apply: mxval_inj; rewrite mxval_genM mxval_gen1 mul1mx.
Qed.
Lemma gen_mulDr : left_distributive genM +%R.
Proof.
(* Goal: @left_distributive (@gen_of F gT G n' rG A irrG cGA) (@gen_of F gT G n' rG A irrG cGA) genM (@GRing.add gen_zmodType) *)
by move=> x y z; apply: mxval_inj; rewrite !(mxvalD, mxval_genM) mulmxDl.
Qed.
Lemma gen_ntriv : gen1 != 0.
Proof.
(* Goal: is_true (negb (@eq_op gen_eqType gen1 (GRing.zero gen_zmodType))) *)
by rewrite -(inj_eq mxval_inj) mxval_gen1 mxval0 oner_eq0.
Qed.
Definition gen_ringMixin :=
ComRingMixin gen_mulA gen_mulC gen_mul1r gen_mulDr gen_ntriv.
Lemma mxvalM : {morph mxval : x y / x * y >-> x *m y}.
Proof.
(* Goal: @morphism_2 (@gen_of F gT G n' rG A irrG cGA) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) mxval (fun x y : @gen_of F gT G n' rG A irrG cGA => @GRing.mul gen_ringType x y) (fun x y : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) => @mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (S n') (S n') x y) *)
exact: mxval_genM.
Qed.
Lemma mxval_sub : additive mxval.
Proof.
(* Goal: @GRing.Additive.axiom gen_zmodType (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) mxval *)
by move=> x y; rewrite mxvalD mxvalN.
Qed.
Canonical mxval_additive := Additive mxval_sub.
Lemma mxval_is_multiplicative : multiplicative mxval.
Proof.
(* Goal: @GRing.RMorphism.mixin_of gen_ringType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') mxval *)
by split; [apply: mxvalM | apply: mxval1].
Qed.
Canonical mxval_rmorphism := AddRMorphism mxval_is_multiplicative.
Lemma mxval_centg x : centgmx rG (mxval x).
Proof.
(* Goal: is_true (@centgmx (GRing.Field.comUnitRingType F) gT G (S n') rG (mxval x)) *)
rewrite [mxval _]horner_rVpoly -memmx_cent_envelop vec_mxK {x}mulmx_sub //.
(* Goal: is_true (@submx F (@degree_mxminpoly F n' A) (muln (S n') (S n')) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (@degree_mxminpoly F n' A)) (@cent_mx F (@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 n') (@enveloping_algebra_mx (GRing.Field.comUnitRingType F) gT G (S n') rG))) *)
apply/row_subP=> k; rewrite rowK memmx_cent_envelop; apply/centgmxP => g Gg /=.
(* Goal: @eq (matrix (GRing.Field.sort F) (S n') (S n')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S n') (S n') (S n') (@GRing.exp (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') A (@nat_of_ord (@degree_mxminpoly F n' A) k)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S n') (S n') (S n') (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g) (@GRing.exp (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') A (@nat_of_ord (@degree_mxminpoly F n' A) k))) *)
by rewrite !mulmxE commrX // /GRing.comm -mulmxE (centgmxP cGA).
Qed.
Lemma gen_mulVr : GRing.Field.axiom genV.
Proof.
(* Goal: @GRing.Field.axiom gen_ringType genV *)
move=> x; rewrite -(inj_eq mxval_inj) mxval0.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (mxval x) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))))), @eq (GRing.Ring.sort gen_ringType) (@GRing.mul gen_ringType (genV x) x) (GRing.one gen_ringType) *)
move/(mx_Schur irrG (mxval_centg x)) => u_x.
(* Goal: @eq (GRing.Ring.sort gen_ringType) (@GRing.mul gen_ringType (genV x) x) (GRing.one gen_ringType) *)
by apply: mxval_inj; rewrite mxvalM mxval_genV mxval1 mulVmx.
Qed.
Lemma gen_invr0 : genV 0 = 0.
Proof.
(* Goal: @eq (@gen_of F gT G n' rG A irrG cGA) (genV (GRing.zero gen_zmodType)) (GRing.zero gen_zmodType) *)
by apply: mxval_inj; rewrite mxval_genV !mxval0 -{2}invr0.
Qed.
Definition gen_unitRingMixin := FieldUnitMixin gen_mulVr gen_invr0.
Canonical gen_unitRingType :=
Eval hnf in UnitRingType FA gen_unitRingMixin.
Canonical gen_comUnitRingType := Eval hnf in [comUnitRingType of FA].
Definition gen_fieldMixin :=
@FieldMixin _ _ _ _ : GRing.Field.mixin_of gen_unitRingType.
Definition gen_idomainMixin := FieldIdomainMixin gen_fieldMixin.
Canonical gen_idomainType := Eval hnf in IdomainType FA gen_idomainMixin.
Canonical gen_fieldType := Eval hnf in FieldType FA gen_fieldMixin.
Lemma mxvalV : {morph mxval : x / x^-1 >-> invmx x}.
Proof.
(* Goal: @morphism_1 (@gen_of F gT G n' rG A irrG cGA) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) mxval (fun x : @gen_of F gT G n' rG A irrG cGA => @GRing.inv gen_unitRingType x) (fun x : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) => @invmx (GRing.Field.comUnitRingType F) (S n') x) *)
exact: mxval_genV.
Qed.
Lemma gen_is_rmorphism : rmorphism gen.
Proof.
(* Goal: @GRing.RMorphism.class_of (GRing.Field.ringType F) gen_ringType gen *)
split=> [x y|]; first by apply: mxval_inj; rewrite genK !rmorphB /= !genK.
(* Goal: @GRing.RMorphism.mixin_of (GRing.Field.ringType F) gen_ringType gen *)
by split=> // x y; apply: mxval_inj; rewrite genK !rmorphM /= !genK.
Qed.
Canonical gen_additive := Additive gen_is_rmorphism.
Canonical gen_rmorphism := RMorphism gen_is_rmorphism.
Definition groot := inFA (poly_rV ('X %% pA)).
Lemma mxval_groot : mxval groot = A.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (mxval groot) A *)
rewrite /mxval [pval _]poly_rV_K ?size_mod_mxminpoly // -horner_mxK.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (@horner_mx (GRing.Field.comRingType F) n' A (@mx_inv_horner F n' A (@horner_mx (GRing.Field.comRingType F) n' A (polyX (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)))))) A *)
by rewrite mx_inv_hornerK ?horner_mx_mem // horner_mx_X.
Qed.
Lemma mxval_grootX k : mxval (groot ^+ k) = A ^+ k.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (mxval (@GRing.exp gen_ringType groot k)) (@GRing.exp (matrix_ringType (GRing.Field.ringType F) n') A k) *)
by rewrite rmorphX /= mxval_groot.
Qed.
Lemma map_mxminpoly_groot : (map_poly gen pA).[groot] = 0.
Lemma non_linear_gen_reducible :
d > 1 -> mxnonsimple (map_repr gen_rmorphism rG) 1%:M.
Proof.
(* Goal: forall _ : is_true (leq (S (S O)) (@degree_mxminpoly F n' A)), @mxnonsimple gen_fieldType gT G (S n') (@map_repr (GRing.Field.comUnitRingType F) gen_comUnitRingType gen_rmorphism gT G (S n') rG) (@scalar_mx (GRing.Field.ringType gen_fieldType) (S n') (GRing.one (GRing.Field.ringType gen_fieldType))) *)
rewrite ltnNge mxminpoly_linear_is_scalar => Anscal.
(* Goal: @mxnonsimple gen_fieldType gT G (S n') (@map_repr (GRing.Field.comUnitRingType F) gen_comUnitRingType gen_rmorphism gT G (S n') rG) (@scalar_mx (GRing.Field.ringType gen_fieldType) (S n') (GRing.one (GRing.Field.ringType gen_fieldType))) *)
pose Af := map_mx gen A; exists (kermx (Af - groot%:M)).
(* Goal: is_true (andb (@mxmodule gen_fieldType gT G (S n') (@map_repr (GRing.Field.comUnitRingType F) gen_comUnitRingType gen_rmorphism gT G (S n') rG) (S n') (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot))))) (andb (@submx gen_fieldType (S n') (S n') (S n') (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (@scalar_mx (GRing.Field.ringType gen_fieldType) (S n') (GRing.one (GRing.Field.ringType gen_fieldType)))) (andb (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n'))))) (leq (S (@mxrank gen_fieldType (S n') (S n') (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))))) (@mxrank gen_fieldType (S n') (S n') (@scalar_mx (GRing.Field.ringType gen_fieldType) (S n') (GRing.one (GRing.Field.ringType gen_fieldType)))))))) *)
rewrite submx1 kermx_centg_module /=; last first.
(* Goal: is_true (andb (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n'))))) (leq (S (@mxrank gen_fieldType (S n') (S n') (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))))) (@mxrank gen_fieldType (S n') (S n') (@scalar_mx (GRing.Field.ringType gen_fieldType) (S n') (GRing.one (GRing.Field.ringType gen_fieldType)))))) *)
(* Goal: is_true (@centgmx (GRing.Field.comUnitRingType gen_fieldType) gT G (S n') (@map_repr (GRing.Field.comUnitRingType F) gen_comUnitRingType gen_rmorphism gT G (S n') rG) (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) *)
apply/centgmxP=> z Gz; rewrite mulmxBl mulmxBr scalar_mxC.
(* Goal: is_true (andb (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n'))))) (leq (S (@mxrank gen_fieldType (S n') (S n') (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))))) (@mxrank gen_fieldType (S n') (S n') (@scalar_mx (GRing.Field.ringType gen_fieldType) (S n') (GRing.one (GRing.Field.ringType gen_fieldType)))))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType gen_fieldType))) (S n') (S n')) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType gen_fieldType))) (S n') (S n')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType gen_fieldType)) (S n') (S n') (S n') Af (@repr_mx (GRing.Field.comUnitRingType gen_fieldType) gT (@gval gT G) (S n') (@map_repr (GRing.Field.comUnitRingType F) gen_comUnitRingType gen_rmorphism gT G (S n') rG) z)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType gen_fieldType))) (S n') (S n')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType gen_fieldType)) (S n') (S n') (S n') (@scalar_mx gen_ringType (S n') groot) (@repr_mx (GRing.Field.comUnitRingType gen_fieldType) gT (@gval gT G) (S n') (@map_repr (GRing.Field.comUnitRingType F) gen_comUnitRingType gen_rmorphism gT G (S n') rG) z)))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType gen_fieldType))) (S n') (S n')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType gen_fieldType)) (S n') (S n') (S n') (@repr_mx (GRing.Field.comUnitRingType gen_fieldType) gT (@gval gT G) (S n') (@map_repr (GRing.Field.comUnitRingType F) gen_comUnitRingType gen_rmorphism gT G (S n') rG) z) Af) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType gen_fieldType))) (S n') (S n')) (@mulmx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType gen_fieldType))) (S n') (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType gen_fieldType))) (S n') groot) (@repr_mx (GRing.Field.comUnitRingType gen_fieldType) gT (@gval gT G) (S n') (@map_repr (GRing.Field.comUnitRingType F) gen_comUnitRingType gen_rmorphism gT G (S n') rG) z)))) *)
by rewrite -!map_mxM 1?(centgmxP cGA).
(* Goal: is_true (andb (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n'))))) (leq (S (@mxrank gen_fieldType (S n') (S n') (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))))) (@mxrank gen_fieldType (S n') (S n') (@scalar_mx (GRing.Field.ringType gen_fieldType) (S n') (GRing.one (GRing.Field.ringType gen_fieldType)))))) *)
rewrite andbC mxrank_ker -subn_gt0 mxrank1 subKn ?rank_leq_row // lt0n.
(* Goal: is_true (andb (negb (@eq_op nat_eqType (@mxrank gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) O)) (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n')))))) *)
rewrite mxrank_eq0 subr_eq0; case: eqP => [defAf | _].
(* Goal: is_true (andb (negb false) (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n')))))) *)
(* Goal: is_true (andb (negb true) (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n')))))) *)
rewrite -(map_mx_is_scalar gen_rmorphism) -/Af in Anscal.
(* Goal: is_true (andb (negb false) (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n')))))) *)
(* Goal: is_true (andb (negb true) (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n')))))) *)
by case/is_scalar_mxP: Anscal; exists groot.
(* Goal: is_true (andb (negb false) (negb (@eq_op (matrix_eqType (GRing.Field.eqType gen_fieldType) (S n') (S n')) (@kermx gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType gen_fieldType) (S n') (S n')))))) *)
rewrite -mxrank_eq0 mxrank_ker subn_eq0 row_leq_rank.
(* Goal: is_true (andb (negb false) (negb (@row_free gen_fieldType (S n') (S n') (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) Af (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@scalar_mx gen_ringType (S n') groot)))))) *)
apply/row_freeP=> [[XA' XAK]].
(* Goal: False *)
have pAf0: (mxminpoly Af).[groot] == 0.
(* Goal: False *)
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType gen_fieldType))) (@horner (GRing.Field.ringType gen_fieldType) (@mxminpoly gen_fieldType n' Af) groot) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType gen_fieldType)))) *)
by rewrite mxminpoly_map ?map_mxminpoly_groot.
(* Goal: False *)
have{pAf0} [q def_pAf]:= factor_theorem _ _ pAf0.
(* Goal: False *)
have q_nz: q != 0.
(* Goal: False *)
(* Goal: is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType gen_fieldType)) q (GRing.zero (poly_zmodType (GRing.Field.ringType gen_fieldType))))) *)
case: eqP (congr1 (fun p : {poly _} => size p) def_pAf) => // ->.
(* Goal: False *)
(* Goal: forall _ : @eq nat (@size (GRing.Ring.sort (GRing.Field.ringType gen_fieldType)) (@polyseq (GRing.Field.ringType gen_fieldType) (@mxminpoly gen_fieldType n' Af))) (@size (GRing.Ring.sort (GRing.Field.ringType gen_fieldType)) (@polyseq (GRing.Field.ringType gen_fieldType) (@GRing.mul (poly_ringType (GRing.Field.ringType gen_fieldType)) (GRing.zero (poly_zmodType (GRing.Field.ringType gen_fieldType))) (@GRing.add (poly_zmodType (GRing.Field.ringType gen_fieldType)) (polyX (GRing.Field.ringType gen_fieldType)) (@GRing.opp (poly_zmodType (GRing.Field.ringType gen_fieldType)) (@polyC (GRing.Field.ringType gen_fieldType) groot)))))), is_true (negb true) *)
by rewrite size_mxminpoly mul0r size_poly0.
(* Goal: False *)
have qAf0: horner_mx Af q = 0.
(* Goal: False *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType gen_comRingType) n'))) (@horner_mx gen_comRingType n' Af q) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType gen_comRingType) n'))) *)
rewrite -[_ q]mulr1 -[1]XAK mulrA -{2}(horner_mx_X Af) -(horner_mx_C Af).
(* Goal: False *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType gen_comRingType) n'))) (@GRing.mul (matrix_ringType (GRing.ComRing.ringType gen_comRingType) n') (@GRing.mul (matrix_ringType (GRing.ComRing.ringType gen_comRingType) n') (@horner_mx gen_comRingType n' Af q) (@GRing.add (matrix_zmodType gen_zmodType (S n') (S n')) (@horner_mx gen_comRingType n' Af (polyX (GRing.ComRing.ringType gen_comRingType))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType gen_ringType) (S n') (S n')) (@horner_mx gen_comRingType n' Af (@polyC (GRing.ComRing.ringType gen_comRingType) groot))))) XA') (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType gen_comRingType) n'))) *)
by rewrite -rmorphB -rmorphM -def_pAf /= mx_root_minpoly mul0r.
(* Goal: False *)
have{qAf0} := dvdp_leq q_nz (mxminpoly_min qAf0); rewrite def_pAf.
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType gen_fieldType))) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType gen_fieldType)) (@GRing.mul (poly_ringType (GRing.Field.ringType gen_fieldType)) q (@GRing.add (poly_zmodType (GRing.Field.ringType gen_fieldType)) (polyX (GRing.Field.ringType gen_fieldType)) (@GRing.opp (poly_zmodType (GRing.Field.ringType gen_fieldType)) (@polyC (GRing.Field.ringType gen_fieldType) groot)))))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType gen_fieldType))) (@polyseq (GRing.IntegralDomain.ringType (GRing.Field.idomainType gen_fieldType)) q))), False *)
by rewrite size_Mmonic ?monicXsubC // polyseqXsubC addn2 ltnn.
Qed.
Definition subbase nA (B : 'rV_nA) : 'M_(nA * d, n) :=
\matrix_ik mxvec (\matrix_(i, k) (row (B 0 i) (A ^+ k))) 0 ik.
Lemma gen_dim_ex_proof : exists nA, [exists B : 'rV_nA, row_free (subbase B)].
Proof.
(* Goal: @ex nat (fun nA : nat => is_true (negb (@FiniteQuant.quant0b (matrix_finType (ordinal_finType (S n')) (S O) nA) (fun B : matrix (Finite.sort (ordinal_finType (S n'))) (S O) nA => @FiniteQuant.ex (matrix_finType (ordinal_finType (S n')) (S O) nA) (FiniteQuant.Quantified (@row_free F (muln nA (@degree_mxminpoly F n' A)) (S n') (@subbase nA B))) B)))) *)
by exists 0%N; apply/existsP; exists 0.
Qed.
Lemma gen_dim_ub_proof nA :
[exists B : 'rV_nA, row_free (subbase B)] -> (nA <= n)%N.
Proof.
(* Goal: forall _ : is_true (negb (@FiniteQuant.quant0b (matrix_finType (ordinal_finType (S n')) (S O) nA) (fun B : matrix (Finite.sort (ordinal_finType (S n'))) (S O) nA => @FiniteQuant.ex (matrix_finType (ordinal_finType (S n')) (S O) nA) (FiniteQuant.Quantified (@row_free F (muln nA (@degree_mxminpoly F n' A)) (S n') (@subbase nA B))) B))), is_true (leq nA (S n')) *)
case/existsP=> B /eqnP def_nAd.
(* Goal: is_true (leq nA (S n')) *)
by rewrite (leq_trans _ (rank_leq_col (subbase B))) // def_nAd leq_pmulr.
Qed.
Definition gen_dim := ex_maxn gen_dim_ex_proof gen_dim_ub_proof.
Notation nA := gen_dim.
Definition gen_base : 'rV_nA := odflt 0 [pick B | row_free (subbase B)].
Definition base := subbase gen_base.
Lemma base_free : row_free base.
Proof.
(* Goal: is_true (@row_free F (muln gen_dim (@degree_mxminpoly F n' A)) (S n') base) *)
rewrite /base /gen_base /nA; case: pickP => //; case: ex_maxnP => nA_max.
(* Goal: forall (_ : is_true (negb (@FiniteQuant.quant0b (matrix_finType (ordinal_finType (S n')) (S O) nA_max) (fun B : matrix (Finite.sort (ordinal_finType (S n'))) (S O) nA_max => @FiniteQuant.ex (matrix_finType (ordinal_finType (S n')) (S O) nA_max) (FiniteQuant.Quantified (@row_free F (muln nA_max (@degree_mxminpoly F n' A)) (S n') (@subbase nA_max B))) B)))) (_ : forall (j : nat) (_ : is_true (negb (@FiniteQuant.quant0b (matrix_finType (ordinal_finType (S n')) (S O) j) (fun B : matrix (Finite.sort (ordinal_finType (S n'))) (S O) j => @FiniteQuant.ex (matrix_finType (ordinal_finType (S n')) (S O) j) (FiniteQuant.Quantified (@row_free F (muln j (@degree_mxminpoly F n' A)) (S n') (@subbase j B))) B)))), is_true (leq j nA_max)) (_ : @eqfun bool (Finite.sort (matrix_finType (ordinal_finType (S n')) (S O) nA_max)) (fun B : Finite.sort (matrix_finType (ordinal_finType (S n')) (S O) nA_max) => @row_free F (muln nA_max (@degree_mxminpoly F n' A)) (S n') (@subbase nA_max B)) (fun _ : Finite.sort (matrix_finType (ordinal_finType (S n')) (S O) nA_max) => false)), is_true (@row_free F (muln nA_max (@degree_mxminpoly F n' A)) (S n') (@subbase nA_max (@Option.default (GRing.Zmodule.sort (FinRing.Zmodule.zmodType (matrix_finZmodType (Zp_finZmodType n') (S O) nA_max))) (GRing.zero (FinRing.Zmodule.zmodType (matrix_finZmodType (Zp_finZmodType n') (S O) nA_max))) (@None (Finite.sort (matrix_finType (ordinal_finType (S n')) (S O) nA_max)))))) *)
by case/existsP=> B Bfree _ no_free; rewrite no_free in Bfree.
Qed.
Lemma base_full : row_full base.
Lemma gen_dim_factor : (nA * d)%N = n.
Proof.
(* Goal: @eq nat (muln gen_dim (@degree_mxminpoly F n' A)) (S n') *)
by rewrite -(eqnP base_free) (eqnP base_full).
Qed.
Lemma gen_dim_gt0 : nA > 0.
Proof.
(* Goal: is_true (leq (S O) gen_dim) *)
by case: posnP gen_dim_factor => // ->.
Qed.
Section Bijection.
Variable m : nat.
Definition in_gen (W : 'M[F]_(m, n)) : 'M[FA]_(m, nA) :=
\matrix_(i, j) inFA (row j (vec_mx (row i W *m pinvmx base))).
Definition val_gen (W : 'M[FA]_(m, nA)) : 'M[F]_(m, n) :=
\matrix_i (mxvec (\matrix_j val (W i j)) *m base).
Lemma in_genK : cancel in_gen val_gen.
Lemma val_genK : cancel val_gen in_gen.
Proof.
(* Goal: @cancel (matrix (GRing.Field.sort F) m (S n')) (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) val_gen in_gen *)
move=> W; apply/matrixP=> i j; apply: val_inj; rewrite mxE /= rowK.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A)) (@row (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) j (@vec_mx (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) (@mulmx (GRing.Field.ringType F) (S O) (S n') (muln gen_dim (@degree_mxminpoly F n' A)) (@mulmx (GRing.Field.ringType F) (S O) (muln gen_dim (@degree_mxminpoly F n' A)) (S n') (@mxvec (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) (@matrix_of_fun (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) matrix_key (fun (j : Finite.sort (ordinal_finType gen_dim)) (j0 : Finite.sort (ordinal_finType (@degree_mxminpoly F n' A))) => @fun_of_matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A) (@val (matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A)) (fun _ : matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A) => true) gen_subType (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim W i j)) (GRing.zero (Zp_zmodType O)) j0))) base) (@pinvmx F (muln gen_dim (@degree_mxminpoly F n' A)) (S n') base)))) (@rVval F gT G n' rG A irrG cGA (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim W i j)) *)
case/row_freeP: base_free => B' BB'; rewrite -[_ *m _]mulmx1 -BB' mulmxA.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A)) (@row (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) j (@vec_mx (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) (@mulmx (GRing.Field.ringType F) (S O) (S n') (muln gen_dim (@degree_mxminpoly F n' A)) (@mulmx (GRing.Field.ringType F) (S O) (muln gen_dim (@degree_mxminpoly F n' A)) (S n') (@mulmx (GRing.Field.ringType F) (S O) (S n') (muln gen_dim (@degree_mxminpoly F n' A)) (@mulmx (GRing.Field.ringType F) (S O) (muln gen_dim (@degree_mxminpoly F n' A)) (S n') (@mxvec (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) (@matrix_of_fun (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) matrix_key (fun (j : Finite.sort (ordinal_finType gen_dim)) (j0 : Finite.sort (ordinal_finType (@degree_mxminpoly F n' A))) => @fun_of_matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A) (@val (matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A)) (fun _ : matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A) => true) gen_subType (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim W i j)) (GRing.zero (Zp_zmodType O)) j0))) base) (@pinvmx F (muln gen_dim (@degree_mxminpoly F n' A)) (S n') base)) base) B'))) (@rVval F gT G n' rG A irrG cGA (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim W i j)) *)
by rewrite mulmxKpV ?submxMl // -mulmxA BB' mulmx1 mxvecK rowK.
Qed.
Lemma in_gen0 : in_gen 0 = 0.
Proof.
(* Goal: @eq (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (in_gen (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S n')))) (GRing.zero (matrix_zmodType gen_zmodType m gen_dim)) *)
by apply/matrixP=> i j; rewrite !mxE !(mul0mx, linear0).
Qed.
Lemma val_gen0 : val_gen 0 = 0.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m (S n')) (val_gen (GRing.zero (matrix_zmodType gen_zmodType m gen_dim))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S n'))) *)
by apply: (canLR in_genK); rewrite in_gen0.
Qed.
Lemma in_genN : {morph in_gen : W / - W}.
Lemma val_genN : {morph val_gen : W / - W}.
Proof.
(* Goal: @morphism_1 (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (matrix (GRing.Field.sort F) m (S n')) val_gen (fun W : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @GRing.opp (matrix_zmodType gen_zmodType m gen_dim) W) (fun W : matrix (GRing.Field.sort F) m (S n') => @GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m (S n')) W) *)
by move=> W; apply: (canLR in_genK); rewrite in_genN val_genK.
Qed.
Lemma in_genD : {morph in_gen : U V / U + V}.
Lemma val_genD : {morph val_gen : U V / U + V}.
Proof.
(* Goal: @morphism_2 (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (matrix (GRing.Field.sort F) m (S n')) val_gen (fun U V : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @GRing.add (matrix_zmodType gen_zmodType m gen_dim) U V) (fun U V : matrix (GRing.Field.sort F) m (S n') => @GRing.add (matrix_zmodType (GRing.Field.zmodType F) m (S n')) U V) *)
by move=> U V; apply: (canLR in_genK); rewrite in_genD !val_genK.
Qed.
Definition in_gen_sum := big_morph in_gen in_genD in_gen0.
Definition val_gen_sum := big_morph val_gen val_genD val_gen0.
Lemma in_genZ a : {morph in_gen : W / a *: W >-> gen a *: W}.
End Bijection.
Prenex Implicits val_genK in_genK.
Lemma val_gen_rV (w : 'rV_nA) :
val_gen w = mxvec (\matrix_j val (w 0 j)) *m base.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (S n')) (@val_gen (S O) w) (@mulmx (GRing.Field.ringType F) (S O) (muln gen_dim (@degree_mxminpoly F n' A)) (S n') (@mxvec (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) (@matrix_of_fun (GRing.Field.sort F) gen_dim (@degree_mxminpoly F n' A) matrix_key (fun (j : Finite.sort (ordinal_finType gen_dim)) (j0 : Finite.sort (ordinal_finType (@degree_mxminpoly F n' A))) => @fun_of_matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A) (@val (matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A)) (fun _ : matrix (GRing.Field.sort F) (S O) (@degree_mxminpoly F n' A) => true) gen_subType (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) (S O) gen_dim w (GRing.zero (Zp_zmodType O)) j)) (GRing.zero (Zp_zmodType O)) j0))) base) *)
by apply/rowP=> j; rewrite mxE.
Qed.
Section Bijection2.
Variable m : nat.
Lemma val_gen_row W (i : 'I_m) : val_gen (row i W) = row i (val_gen W).
Lemma in_gen_row W (i : 'I_m) : in_gen (row i W) = row i (in_gen W).
Proof.
(* Goal: @eq (matrix (@gen_of F gT G n' rG A irrG cGA) (S O) gen_dim) (@in_gen (S O) (@row (GRing.Field.sort F) m (S n') i W)) (@row (@gen_of F gT G n' rG A irrG cGA) m gen_dim i (@in_gen m W)) *)
by apply: (canLR val_genK); rewrite val_gen_row in_genK.
Qed.
Lemma row_gen_sum_mxval W (i : 'I_m) :
row i (val_gen W) = \sum_j row (gen_base 0 j) (mxval (W i j)).
Lemma val_genZ x : {morph @val_gen m : W / x *: W >-> W *m mxval x}.
Proof.
(* Goal: @morphism_1 (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (matrix (GRing.Field.sort F) m (S n')) (@val_gen m) (fun W : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @GRing.scale gen_ringType (matrix_lmodType gen_ringType m gen_dim) x W) (fun W : matrix (GRing.Field.sort F) m (S n') => @mulmx (GRing.Field.ringType F) m (S n') (S n') W (mxval x)) *)
move=> W; apply/row_matrixP=> i; rewrite row_mul !row_gen_sum_mxval.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (S n')) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (S n'))) (Finite.sort (ordinal_finType gen_dim)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (S n'))) (index_enum (ordinal_finType gen_dim)) (fun j : Finite.sort (ordinal_finType gen_dim) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (S n'))) (Finite.sort (ordinal_finType gen_dim)) j (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (S n'))) true (@row (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S n') (S n') (@fun_of_matrix (GRing.Zmodule.sort (FinRing.Zmodule.zmodType (Zp_finZmodType n'))) (S O) gen_dim gen_base (GRing.zero (Zp_zmodType O)) j) (mxval (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim (@GRing.scale gen_ringType (matrix_lmodType gen_ringType m gen_dim) x W) i j))))) (@mulmx (GRing.Field.ringType F) (S O) (S n') (S n') (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (S n'))) (Finite.sort (ordinal_finType gen_dim)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (S n'))) (index_enum (ordinal_finType gen_dim)) (fun j : Finite.sort (ordinal_finType gen_dim) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (S n'))) (Finite.sort (ordinal_finType gen_dim)) j (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) (S n'))) true (@row (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S n') (S n') (@fun_of_matrix (GRing.Zmodule.sort (FinRing.Zmodule.zmodType (Zp_finZmodType n'))) (S O) gen_dim gen_base (GRing.zero (Zp_zmodType O)) j) (mxval (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim W i j))))) (mxval x)) *)
by rewrite mulmx_suml; apply: eq_bigr => j _; rewrite mxE mulrC mxvalM row_mul.
Qed.
End Bijection2.
Lemma submx_in_gen m1 m2 (U : 'M_(m1, n)) (V : 'M_(m2, n)) :
(U <= V -> in_gen U <= in_gen V)%MS.
Proof.
(* Goal: forall _ : is_true (@submx F m1 m2 (S n') U V), is_true (@submx gen_fieldType m1 m2 gen_dim (@in_gen m1 U) (@in_gen m2 V)) *)
move=> sUV; apply/row_subP=> i; rewrite -in_gen_row.
(* Goal: is_true (@submx gen_fieldType (S O) m2 gen_dim (@in_gen (S O) (@row (GRing.Field.sort F) m1 (S n') i U)) (@in_gen m2 V)) *)
case/submxP: (row_subP sUV i) => u ->{i}.
(* Goal: is_true (@submx gen_fieldType (S O) m2 gen_dim (@in_gen (S O) (@mulmx (GRing.Field.ringType F) (S O) m2 (S n') u V)) (@in_gen m2 V)) *)
rewrite mulmx_sum_row in_gen_sum summx_sub // => j _.
(* Goal: is_true (@submx gen_fieldType (S O) m2 gen_dim (@in_gen (S O) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S n')) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2 u (GRing.zero (Zp_zmodType O)) j) (@row (GRing.Ring.sort (GRing.Field.ringType F)) m2 (S n') j V))) (@in_gen m2 V)) *)
by rewrite in_genZ in_gen_row scalemx_sub ?row_sub.
Qed.
Lemma submx_in_gen_eq m1 m2 (U : 'M_(m1, n)) (V : 'M_(m2, n)) :
(V *m A <= V -> (in_gen U <= in_gen V) = (U <= V))%MS.
Proof.
(* Goal: forall _ : is_true (@submx F m2 m2 (S n') (@mulmx (GRing.Field.ringType F) m2 (S n') (S n') V A) V), @eq bool (@submx gen_fieldType m1 m2 gen_dim (@in_gen m1 U) (@in_gen m2 V)) (@submx F m1 m2 (S n') U V) *)
move=> sVA_V; apply/idP/idP=> siUV; last exact: submx_in_gen.
(* Goal: is_true (@submx F m1 m2 (S n') U V) *)
apply/row_subP=> i; rewrite -[row i U]in_genK in_gen_row.
(* Goal: is_true (@submx F (S O) m2 (S n') (@val_gen (S O) (@row (@gen_of F gT G n' rG A irrG cGA) m1 gen_dim i (@in_gen m1 U))) V) *)
case/submxP: (row_subP siUV i) => u ->{i U siUV}.
(* Goal: is_true (@submx F (S O) m2 (S n') (@val_gen (S O) (@mulmx (GRing.Field.ringType gen_fieldType) (S O) m2 gen_dim u (@in_gen m2 V))) V) *)
rewrite mulmx_sum_row val_gen_sum summx_sub // => j _.
(* Goal: is_true (@submx F (S O) m2 (S n') (@val_gen (S O) (@GRing.scale (GRing.Field.ringType gen_fieldType) (matrix_lmodType (GRing.Field.ringType gen_fieldType) (S O) gen_dim) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType gen_fieldType)) (S O) m2 u (GRing.zero (Zp_zmodType O)) j) (@row (GRing.Ring.sort (GRing.Field.ringType gen_fieldType)) m2 gen_dim j (@in_gen m2 V)))) V) *)
rewrite val_genZ val_gen_row in_genK rowE -mulmxA mulmx_sub //.
(* Goal: is_true (@submx F m2 m2 (S n') (@mulmx (GRing.Field.ringType F) m2 (S n') (S n') V (mxval (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType gen_fieldType)) (S O) m2 u (GRing.zero (Zp_zmodType O)) j))) V) *)
rewrite [mxval _]horner_poly mulmx_sumr summx_sub // => [[k _]] _ /=.
(* Goal: is_true (@submx F m2 m2 (S n') (@mulmx (GRing.Field.ringType F) m2 (S n') (S n') V (@GRing.mul (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (@nth (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (@polyseq (GRing.ComRing.ringType (GRing.Field.comRingType F)) (pval (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) (S O) m2 u (GRing.zero (Zp_zmodType O)) j))) k)) (@GRing.exp (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') A k))) V) *)
rewrite mulmxA mul_mx_scalar -scalemxAl scalemx_sub {u j}//.
(* Goal: is_true (@submx F m2 m2 (S n') (@mulmx (GRing.Field.ringType F) m2 (S n') (S n') V (@GRing.exp (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') A k)) V) *)
elim: k => [|k IHk]; first by rewrite mulmx1.
(* Goal: is_true (@submx F m2 m2 (S n') (@mulmx (GRing.Field.ringType F) m2 (S n') (S n') V (@GRing.exp (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') A (S k))) V) *)
by rewrite exprSr mulmxA (submx_trans (submxMr A IHk)).
Qed.
Definition gen_mx g := \matrix_i in_gen (row (gen_base 0 i) (rG g)).
Let val_genJmx m :
{in G, forall g, {morph @val_gen m : W / W *m gen_mx g >-> W *m rG g}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun g : FinGroup.arg_sort (FinGroup.base gT) => @morphism_1 (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (matrix (GRing.Field.sort F) m (S n')) (@val_gen m) (fun W : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @mulmx gen_ringType m gen_dim gen_dim W (gen_mx g)) (fun W : matrix (GRing.Field.sort F) m (S n') => @mulmx (GRing.Field.ringType F) m (S n') (S n') W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g))) (inPhantom (forall g : FinGroup.arg_sort (FinGroup.base gT), @morphism_1 (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (matrix (GRing.Field.sort F) m (S n')) (@val_gen m) (fun W : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @mulmx gen_ringType m gen_dim gen_dim W (gen_mx g)) (fun W : matrix (GRing.Field.sort F) m (S n') => @mulmx (GRing.Field.ringType F) m (S n') (S n') W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g)))) *)
move=> g Gg /= W; apply/row_matrixP=> i; rewrite -val_gen_row !row_mul.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (S n')) (@val_gen (S O) (@mulmx gen_ringType (S O) gen_dim gen_dim (@row (GRing.Ring.sort gen_ringType) m gen_dim i W) (gen_mx g))) (@mulmx (GRing.Field.ringType F) (S O) (S n') (S n') (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (S n') i (@val_gen m W)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g)) *)
rewrite mulmx_sum_row val_gen_sum row_gen_sum_mxval mulmx_suml.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (S n')) (@BigOp.bigop (matrix (GRing.Field.sort F) (S O) (S n')) (Finite.sort (ordinal_finType gen_dim)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (S n'))) (index_enum (ordinal_finType gen_dim)) (fun i0 : Finite.sort (ordinal_finType gen_dim) => @BigBody (matrix (GRing.Field.sort F) (S O) (S n')) (Finite.sort (ordinal_finType gen_dim)) i0 (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S O) (S n'))) true (@val_gen (S O) (@GRing.scale gen_ringType (matrix_lmodType gen_ringType (S O) gen_dim) (@fun_of_matrix (GRing.Ring.sort gen_ringType) (S O) gen_dim (@row (GRing.Ring.sort gen_ringType) m gen_dim i W) (GRing.zero (Zp_zmodType O)) i0) (@row (GRing.Ring.sort gen_ringType) gen_dim gen_dim i0 (gen_mx g)))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n'))) (Finite.sort (ordinal_finType gen_dim)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n'))) (index_enum (ordinal_finType gen_dim)) (fun i0 : Finite.sort (ordinal_finType gen_dim) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n'))) (Finite.sort (ordinal_finType gen_dim)) i0 (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n'))) true (@mulmx (GRing.Field.ringType F) (S O) (S n') (S n') (@row (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S n') (S n') (@fun_of_matrix (GRing.Zmodule.sort (FinRing.Zmodule.zmodType (Zp_finZmodType n'))) (S O) gen_dim gen_base (GRing.zero (Zp_zmodType O)) i0) (mxval (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim W i i0))) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g)))) *)
apply: eq_bigr => /= j _; rewrite val_genZ rowK in_genK mxE -!row_mul.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (S n')) (@row (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n') (@fun_of_matrix (GRing.Zmodule.sort (FinRing.Zmodule.zmodType (Zp_finZmodType n'))) (S O) gen_dim gen_base (GRing.zero (Zp_zmodType O)) j) (@mulmx (GRing.Field.ringType F) (S n') (S n') (S n') (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g) (mxval (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim W i j)))) (@row (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n') (@fun_of_matrix (ordinal (S n')) (S O) gen_dim gen_base (GRing.zero (Zp_zmodType O)) j) (@mulmx (GRing.Field.ringType F) (S n') (S n') (S n') (mxval (@fun_of_matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim W i j)) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g))) *)
by rewrite (centgmxP (mxval_centg _)).
Qed.
Lemma gen_mx_repr : mx_repr G gen_mx.
Canonical gen_repr := MxRepresentation gen_mx_repr.
Local Notation rGA := gen_repr.
Lemma val_genJ m :
{in G, forall g, {morph @val_gen m : W / W *m rGA g >-> W *m rG g}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun g : FinGroup.arg_sort (FinGroup.base gT) => @morphism_1 (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (matrix (GRing.Field.sort F) m (S n')) (@val_gen m) (fun W : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @mulmx gen_ringType m gen_dim gen_dim W (@repr_mx gen_comUnitRingType gT (@gval gT G) gen_dim gen_repr g)) (fun W : matrix (GRing.Field.sort F) m (S n') => @mulmx (GRing.Field.ringType F) m (S n') (S n') W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g))) (inPhantom (forall g : FinGroup.arg_sort (FinGroup.base gT), @morphism_1 (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (matrix (GRing.Field.sort F) m (S n')) (@val_gen m) (fun W : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @mulmx gen_ringType m gen_dim gen_dim W (@repr_mx gen_comUnitRingType gT (@gval gT G) gen_dim gen_repr g)) (fun W : matrix (GRing.Field.sort F) m (S n') => @mulmx (GRing.Field.ringType F) m (S n') (S n') W (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g)))) *)
exact: val_genJmx.
Qed.
Lemma in_genJ m :
{in G, forall g, {morph @in_gen m : v / v *m rG g >-> v *m rGA g}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun g : FinGroup.arg_sort (FinGroup.base gT) => @morphism_1 (matrix (GRing.Field.sort F) m (S n')) (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (@in_gen m) (fun v : matrix (GRing.Field.sort F) m (S n') => @mulmx (GRing.Field.ringType F) m (S n') (S n') v (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g)) (fun v : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @mulmx gen_ringType m gen_dim gen_dim v (@repr_mx gen_comUnitRingType gT (@gval gT G) gen_dim gen_repr g))) (inPhantom (forall g : FinGroup.arg_sort (FinGroup.base gT), @morphism_1 (matrix (GRing.Field.sort F) m (S n')) (matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim) (@in_gen m) (fun v : matrix (GRing.Field.sort F) m (S n') => @mulmx (GRing.Field.ringType F) m (S n') (S n') v (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g)) (fun v : matrix (@gen_of F gT G n' rG A irrG cGA) m gen_dim => @mulmx gen_ringType m gen_dim gen_dim v (@repr_mx gen_comUnitRingType gT (@gval gT G) gen_dim gen_repr g)))) *)
by move=> g Gg /= v; apply: (canLR val_genK); rewrite val_genJ ?in_genK.
Qed.
Lemma rfix_gen (H : {set gT}) :
H \subset G -> (rfix_mx rGA H :=: in_gen (rfix_mx rG H))%MS.
Definition rowval_gen m U :=
<<\matrix_ik
mxvec (\matrix_(i < m, k < d) (row i (val_gen U) *m A ^+ k)) 0 ik>>%MS.
Lemma submx_rowval_gen m1 m2 (U : 'M_(m1, n)) (V : 'M_(m2, nA)) :
(U <= rowval_gen V)%MS = (in_gen U <= V)%MS.
Lemma rowval_genK m (U : 'M_(m, nA)) : (in_gen (rowval_gen U) :=: U)%MS.
Proof.
(* Goal: @eqmx gen_fieldType (S n') m gen_dim (@in_gen (S n') (@rowval_gen m U)) U *)
apply/eqmxP; rewrite -submx_rowval_gen submx_refl /=.
(* Goal: is_true (@submx gen_fieldType m (S n') gen_dim U (@in_gen (S n') (@rowval_gen m U))) *)
by rewrite -{1}[U]val_genK submx_in_gen // submx_rowval_gen val_genK.
Qed.
Lemma rowval_gen_stable m (U : 'M_(m, nA)) :
(rowval_gen U *m A <= rowval_gen U)%MS.
Proof.
(* Goal: is_true (@submx F (S n') (S n') (S n') (@mulmx (GRing.Field.ringType F) (S n') (S n') (S n') (@rowval_gen m U) A) (@rowval_gen m U)) *)
rewrite -[A]mxval_groot -{1}[_ U]in_genK -val_genZ.
(* Goal: is_true (@submx F (S n') (S n') (S n') (@val_gen (S n') (@GRing.scale gen_ringType (matrix_lmodType gen_ringType (S n') gen_dim) groot (@in_gen (S n') (@rowval_gen m U)))) (@rowval_gen m U)) *)
by rewrite submx_rowval_gen val_genK scalemx_sub // rowval_genK.
Qed.
Lemma rstab_in_gen m (U : 'M_(m, n)) : rstab rGA (in_gen U) = rstab rG U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstab gen_comUnitRingType gT G gen_dim gen_repr m (@in_gen m U)) (@rstab (GRing.Field.comUnitRingType F) gT G (S n') rG m U) *)
apply/setP=> x; rewrite !inE; case Gx: (x \in G) => //=.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType gen_comUnitRingType)) m gen_dim) (@mulmx (GRing.ComUnitRing.ringType gen_comUnitRingType) m gen_dim gen_dim (@in_gen m U) (gen_mx x)) (@in_gen m U)) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) m (S n')) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m (S n') (S n') U (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG x)) U) *)
by rewrite -in_genJ // (inj_eq (can_inj in_genK)).
Qed.
Lemma rstabs_in_gen m (U : 'M_(m, n)) :
rstabs rG U \subset rstabs rGA (in_gen U).
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)) (@rstabs F gT G (S n') rG m U))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@rstabs gen_fieldType gT G gen_dim gen_repr m (@in_gen m U))))) *)
apply/subsetP=> x; rewrite !inE => /andP[Gx nUx].
(* Goal: is_true (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@submx gen_fieldType m m gen_dim (@mulmx (GRing.Field.ringType gen_fieldType) m gen_dim gen_dim (@in_gen m U) (@repr_mx (GRing.Field.comUnitRingType gen_fieldType) gT (@gval gT G) gen_dim gen_repr x)) (@in_gen m U))) *)
by rewrite -in_genJ Gx // submx_in_gen.
Qed.
Lemma rstabs_rowval_gen m (U : 'M_(m, nA)) :
rstabs rG (rowval_gen U) = rstabs rGA U.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rstabs F gT G (S n') rG (S n') (@rowval_gen m U)) (@rstabs gen_fieldType gT G gen_dim gen_repr m U) *)
apply/setP=> x; rewrite !inE; case Gx: (x \in G) => //=.
(* Goal: @eq bool (@submx F (S n') (S n') (S n') (@mulmx (GRing.Field.ringType F) (S n') (S n') (S n') (@rowval_gen m U) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG x)) (@rowval_gen m U)) (@submx gen_fieldType m m gen_dim (@mulmx (GRing.Field.ringType gen_fieldType) m gen_dim gen_dim U (gen_mx x)) U) *)
by rewrite submx_rowval_gen in_genJ // (eqmxMr _ (rowval_genK U)).
Qed.
Lemma mxmodule_rowval_gen m (U : 'M_(m, nA)) :
mxmodule rG (rowval_gen U) = mxmodule rGA U.
Proof.
(* Goal: @eq bool (@mxmodule F gT G (S n') rG (S n') (@rowval_gen m U)) (@mxmodule gen_fieldType gT G gen_dim gen_repr m U) *)
by rewrite /mxmodule rstabs_rowval_gen.
Qed.
Lemma gen_mx_irr : mx_irreducible rGA.
Proof.
(* Goal: @mx_irreducible gen_fieldType gT G gen_dim gen_repr *)
apply/mx_irrP; split=> [|U Umod nzU]; first exact: gen_dim_gt0.
(* Goal: is_true (@row_full gen_fieldType gen_dim gen_dim U) *)
rewrite -sub1mx -rowval_genK -submx_rowval_gen submx_full //.
(* Goal: is_true (@row_full F (S n') (S n') (@rowval_gen gen_dim U)) *)
case/mx_irrP: irrG => _; apply; first by rewrite mxmodule_rowval_gen.
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) (S n') (S n')) (@rowval_gen gen_dim U) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n') (S n'))))) *)
rewrite -(inj_eq (can_inj in_genK)) in_gen0.
(* Goal: is_true (negb (@eq_op (matrix_eqType gen_eqType (S n') gen_dim) (@in_gen (S n') (@rowval_gen gen_dim U)) (GRing.zero (matrix_zmodType gen_zmodType (S n') gen_dim)))) *)
by rewrite -mxrank_eq0 rowval_genK mxrank_eq0.
Qed.
Lemma rker_gen : rker rGA = rker rG.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@rker gen_comUnitRingType gT G gen_dim gen_repr) (@rker (GRing.Field.comUnitRingType F) gT G (S n') rG) *)
apply/setP=> g; rewrite !inE !mul1mx; case Gg: (g \in G) => //=.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType gen_comUnitRingType)) gen_dim gen_dim) (gen_mx g) (@scalar_mx (GRing.ComUnitRing.ringType gen_comUnitRingType) gen_dim (GRing.one (GRing.ComUnitRing.ringType gen_comUnitRingType)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))) (S n') (S n')) (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S n') (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))))) *)
apply/eqP/eqP=> g1; apply/row_matrixP=> i.
(* Goal: @eq (matrix (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType gen_comUnitRingType))) (S O) gen_dim) (@row (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType gen_comUnitRingType))) gen_dim gen_dim i (gen_mx g)) (@row (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType gen_comUnitRingType))) gen_dim gen_dim i (@scalar_mx (GRing.ComUnitRing.ringType gen_comUnitRingType) gen_dim (GRing.one (GRing.ComUnitRing.ringType gen_comUnitRingType)))) *)
(* Goal: @eq (matrix (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (S O) (S n')) (@row (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (S n') (S n') i (@repr_mx (GRing.Field.comUnitRingType F) gT (@gval gT G) (S n') rG g)) (@row (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)))) (S n') (S n') i (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) (S n') (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F))))) *)
by apply: (can_inj in_genK); rewrite rowE in_genJ //= g1 mulmx1 row1.
(* Goal: @eq (matrix (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType gen_comUnitRingType))) (S O) gen_dim) (@row (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType gen_comUnitRingType))) gen_dim gen_dim i (gen_mx g)) (@row (Equality.sort (GRing.Ring.eqType (GRing.ComUnitRing.ringType gen_comUnitRingType))) gen_dim gen_dim i (@scalar_mx (GRing.ComUnitRing.ringType gen_comUnitRingType) gen_dim (GRing.one (GRing.ComUnitRing.ringType gen_comUnitRingType)))) *)
by apply: (can_inj val_genK); rewrite rowE val_genJ //= g1 mulmx1 row1.
Qed.
Lemma gen_mx_faithful : mx_faithful rGA = mx_faithful rG.
Proof.
(* Goal: @eq bool (@mx_faithful gen_comUnitRingType gT G gen_dim gen_repr) (@mx_faithful (GRing.Field.comUnitRingType F) gT G (S n') rG) *)
by rewrite /mx_faithful rker_gen.
Qed.
End GenField.
Section DecideGenField.
Import MatrixFormula.
Variable F : decFieldType.
Local Notation False := GRing.False.
Local Notation True := GRing.True.
Local Notation Bool b := (GRing.Bool b%bool).
Local Notation term := (GRing.term F).
Local Notation form := (GRing.formula F).
Local Notation morphAnd f := ((big_morph f) true andb).
Variables (gT : finGroupType) (G : {group gT}) (n' : nat).
Local Notation n := n'.+1.
Variables (rG : mx_representation F G n) (A : 'M[F]_n).
Hypotheses (irrG : mx_irreducible rG) (cGA : centgmx rG A).
Local Notation FA := (gen_of irrG cGA).
Local Notation inFA := (Gen irrG cGA).
Local Notation d := (degree_mxminpoly A).
Let d_gt0 : d > 0 := mxminpoly_nonconstant A.
Local Notation Ad := (powers_mx A d).
Let mxT (u : 'rV_d) := vec_mx (mulmx_term u (mx_term Ad)).
Let eval_mxT e u : eval_mx e (mxT u) = mxval (inFA (eval_mx e u)).
Proof.
(* Goal: @eq (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S n') (S n')) (@eval_mx (GRing.DecidableField.fieldType F) e (S n') (S n') (mxT u)) (@mxval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@Gen (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@eval_mx (GRing.DecidableField.fieldType F) e (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) u))) *)
by rewrite eval_vec_mx eval_mulmx eval_mx_term [mxval _]horner_rVpoly.
Qed.
Let Ad'T := mx_term (pinvmx Ad).
Let mulT (u v : 'rV_d) := mulmx_term (mxvec (mulmx_term (mxT u) (mxT v))) Ad'T.
Lemma eval_mulT e u v :
eval_mx e (mulT u v) = val (inFA (eval_mx e u) * inFA (eval_mx e v)).
Proof.
(* Goal: @eq (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) e (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT u v)) (@val (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (@GRing.mul (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (@Gen (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@eval_mx (GRing.DecidableField.fieldType F) e (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) u)) (@Gen (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@eval_mx (GRing.DecidableField.fieldType F) e (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) v)))) *)
rewrite !(eval_mulmx, eval_mxvec) !eval_mxT eval_mx_term.
(* Goal: @eq (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@mulmx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (muln (S n') (S n')) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mxvec (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S n') (S n') (@mulmx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S n') (S n') (S n') (@mxval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@Gen (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@eval_mx (GRing.DecidableField.fieldType F) e (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) u))) (@mxval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@Gen (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@eval_mx (GRing.DecidableField.fieldType F) e (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) v))))) (@pinvmx (GRing.DecidableField.fieldType F) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (muln (S n') (S n')) (@powers_mx (GRing.DecidableField.comRingType F) n' A (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)))) (@val (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (@GRing.mul (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (@Gen (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@eval_mx (GRing.DecidableField.fieldType F) e (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) u)) (@Gen (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@eval_mx (GRing.DecidableField.fieldType F) e (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) v)))) *)
by apply: (can_inj rVpolyK); rewrite -mxvalM [rVpoly _]horner_rVpolyK.
Qed.
Fixpoint gen_term t := match t with
| 'X_k => row_var _ d k
| x%:T => mx_term (val (x : FA))
| n1%:R => mx_term (val (n1%:R : FA))%R
| t1 + t2 => \row_i (gen_term t1 0%R i + gen_term t2 0%R i)
| - t1 => \row_i (- gen_term t1 0%R i)
| t1 *+ n1 => mulmx_term (mx_term n1%:R%:M)%R (gen_term t1)
| t1 * t2 => mulT (gen_term t1) (gen_term t2)
| t1^-1 => gen_term t1
| t1 ^+ n1 => iter n1 (mulT (gen_term t1)) (mx_term (val (1%R : FA)))
end%T.
Definition gen_env (e : seq FA) := row_env (map val e).
Lemma nth_map_rVval (e : seq FA) j : (map val e)`_j = val e`_j.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A))) (@map (@sub_sort (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@val (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) e) j) (@val (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (@nth (GRing.Zmodule.sort (@gen_zmodType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (GRing.zero (@gen_zmodType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) e j)) *)
case: (ltnP j (size e)) => [| leej]; first exact: (nth_map 0 0).
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A))) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A))) (@map (@sub_sort (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@val (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) e) j) (@val (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (@nth (GRing.Zmodule.sort (@gen_zmodType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (GRing.zero (@gen_zmodType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) e j)) *)
by rewrite !nth_default ?size_map.
Qed.
Lemma set_nth_map_rVval (e : seq FA) j v :
set_nth 0 (map val e) j v = map val (set_nth 0 e j (inFA v)).
Lemma eval_gen_term e t :
GRing.rterm t -> eval_mx (gen_env e) (gen_term t) = val (GRing.eval e t).
Proof.
(* Goal: forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@val (matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (fun _ : matrix (GRing.Field.sort (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) => true) (@gen_subType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) *)
elim: t => //=.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) *)
(* Goal: forall (n : nat) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (GRing.one (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) n)))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) (GRing.one (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) n)) *)
(* Goal: forall (r : @gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA r))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA r) *)
(* Goal: forall (n : nat) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (row_var (GRing.DecidableField.fieldType F) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) n)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@nth (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (GRing.zero (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) e n)) *)
-
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) *)
(* Goal: forall (n : nat) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (GRing.one (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) n)))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) (GRing.one (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) n)) *)
(* Goal: forall (r : @gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA r))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA r) *)
(* Goal: forall (n : nat) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (row_var (GRing.DecidableField.fieldType F) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) n)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@nth (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (GRing.zero (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) e n)) *)
by move=> k _; apply/rowP=> i; rewrite !mxE /= nth_row_env nth_map_rVval.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) *)
(* Goal: forall (n : nat) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (GRing.one (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) n)))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) (GRing.one (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) n)) *)
(* Goal: forall (r : @gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA r))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA r) *)
-
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) *)
(* Goal: forall (n : nat) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (GRing.one (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) n)))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) (GRing.one (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) n)) *)
(* Goal: forall (r : @gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA r))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA r) *)
by move=> x _; rewrite eval_mx_term.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) *)
(* Goal: forall (n : nat) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (GRing.one (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) n)))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) (GRing.one (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) n)) *)
-
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) *)
(* Goal: forall (n : nat) (_ : is_true true), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (GRing.one (@gen_ringType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) n)))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) (GRing.one (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA))) n)) *)
by move=> x _; rewrite eval_mx_term.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) *)
-
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) *)
move=> t1 IH1 t2 IH2 /andP[rt1 rt2]; rewrite -{}IH1 // -{}IH2 //.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
(* Goal: @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Add (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t1) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t2) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t1)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t2))) *)
by apply/rowP=> k; rewrite !mxE.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
-
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@matrix_of_fun (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) matrix_key (fun (_ : ordinal (S O)) (i : ordinal (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) => @GRing.Opp (GRing.DecidableField.sort F) (@fun_of_matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t) (GRing.zero (Zp_zmodType O)) i)))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) *)
by move=> t1 IH1 rt1; rewrite -{}IH1 //; apply/rowP=> k; rewrite !mxE.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
-
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mulmx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@mx_term (GRing.DecidableField.fieldType F) (S O) (S O) (@scalar_mx (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n))) (gen_term t))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
move=> t1 IH1 n1 rt1; rewrite eval_mulmx eval_mx_term mul_scalar_mx.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
(* Goal: @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@GRing.scale (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (matrix_lmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (GRing.one (GRing.Field.ringType (GRing.DecidableField.fieldType F))) n1) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t1))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.natmul (GRing.UnitRing.zmodType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t1) n1)) *)
by rewrite scaler_nat {}IH1 //; elim: n1 => //= n1 IHn1; rewrite !mulrS IHn1.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
-
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (t0 : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t0)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (_ : is_true (andb (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t) (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t0))), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t) (gen_term t0))) (@poly_rV (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType (GRing.DecidableField.fieldType F)))) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (Pdiv.Field.modp (GRing.Field.idomainType (GRing.DecidableField.fieldType F)) (@GRing.mul (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t)) (@pval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t0))) (@mxminpoly (GRing.DecidableField.fieldType F) n' A))) *)
by move=> t1 IH1 t2 IH2 /andP[rt1 rt2]; rewrite eval_mulT IH1 ?IH2.
(* Goal: forall (t : GRing.term (@gen_of (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (_ : forall _ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (gen_term t)) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t))) (n : nat) (_ : is_true (@GRing.rterm (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) t)), @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n (mulT (gen_term t)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t) n)) *)
move=> t1 IH1 n1 /IH1 {IH1}IH1.
(* Goal: @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n1 (mulT (gen_term t1)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F)))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t1) n1)) *)
elim: n1 => [|n1 IHn1] /=; first by rewrite eval_mx_term.
(* Goal: @eq (matrix (GRing.DecidableField.sort F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) (@eval_mx (GRing.DecidableField.fieldType F) (gen_env e) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (mulT (gen_term t1) (@iter (matrix (GRing.term (GRing.DecidableField.sort F)) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A)) n1 (mulT (gen_term t1)) (@mx_term (GRing.DecidableField.fieldType F) (S O) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (@poly_rV (GRing.Field.ringType (GRing.DecidableField.fieldType F)) (@degree_mxminpoly (GRing.DecidableField.fieldType F) n' A) (GRing.one (poly_ringType (GRing.Field.ringType (GRing.DecidableField.fieldType F))))))))) (@rVval (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA (@GRing.exp (GRing.UnitRing.ringType (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA)) (@GRing.eval (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e t1) (S n1))) *)
by rewrite eval_mulT exprS IH1 IHn1.
Qed.
Fixpoint gen_form f := match f with
| Bool b => Bool b
| t1 == t2 => mxrank_form 0 (gen_term (t1 - t2))
| GRing.Unit t1 => mxrank_form 1 (gen_term t1)
| f1 /\ f2 => gen_form f1 /\ gen_form f2
| f1 \/ f2 => gen_form f1 \/ gen_form f2
| f1 ==> f2 => gen_form f1 ==> gen_form f2
| ~ f1 => ~ gen_form f1
| ('exists 'X_k, f1) => Exists_row_form d k (gen_form f1)
| ('forall 'X_k, f1) => ~ Exists_row_form d k (~ (gen_form f1))
end%T.
Lemma sat_gen_form e f : GRing.rformula f ->
Definition gen_sat e f := GRing.sat (gen_env e) (gen_form (GRing.to_rform f)).
Lemma gen_satP : GRing.DecidableField.axiom gen_sat.
Proof.
(* Goal: @GRing.DecidableField.axiom (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) gen_sat *)
move=> e f; have [tor rto] := GRing.to_rformP e f.
(* Goal: Bool.reflect (@GRing.holds (@gen_unitRingType (GRing.DecidableField.fieldType F) gT G n' rG A irrG cGA) e f) (gen_sat e f) *)
exact: (iffP (sat_gen_form e (GRing.to_rform_rformula f))).
Qed.
Definition gen_decFieldMixin := DecFieldMixin gen_satP.
Canonical gen_decFieldType := Eval hnf in DecFieldType FA gen_decFieldMixin.
End DecideGenField.
Section FiniteGenField.
Variables (F : finFieldType) (gT : finGroupType) (G : {group gT}) (n' : nat).
Local Notation n := n'.+1.
Variables (rG : mx_representation F G n) (A : 'M[F]_n).
Hypotheses (irrG : mx_irreducible rG) (cGA : centgmx rG A).
Notation FA := (gen_of irrG cGA).
Definition gen_countMixin := (sub_countMixin (gen_subType irrG cGA)).
Canonical gen_countType := Eval hnf in CountType FA gen_countMixin.
Canonical gen_subCountType := Eval hnf in [subCountType of FA].
Definition gen_finMixin := [finMixin of FA by <:].
Canonical gen_finType := Eval hnf in FinType FA gen_finMixin.
Canonical gen_subFinType := Eval hnf in [subFinType of FA].
Canonical gen_finZmodType := Eval hnf in [finZmodType of FA].
Canonical gen_baseFinGroupType := Eval hnf in [baseFinGroupType of FA for +%R].
Canonical gen_finGroupType := Eval hnf in [finGroupType of FA for +%R].
Canonical gen_finRingType := Eval hnf in [finRingType of FA].
Canonical gen_finComRingType := Eval hnf in [finComRingType of FA].
Canonical gen_finUnitRingType := Eval hnf in [finUnitRingType of FA].
Canonical gen_finComUnitRingType := Eval hnf in [finComUnitRingType of FA].
Canonical gen_finIdomainType := Eval hnf in [finIdomainType of FA].
Canonical gen_finFieldType := Eval hnf in [finFieldType of FA].
Lemma card_gen : #|{:FA}| = (#|F| ^ degree_mxminpoly A)%N.
Proof.
(* Goal: @eq nat (@card gen_finType (@mem (@gen_of (FinRing.Field.fieldType F) gT G n' rG A irrG cGA) (predPredType (@gen_of (FinRing.Field.fieldType F) gT G n' rG A irrG cGA : predArgType)) (@sort_of_simpl_pred (@gen_of (FinRing.Field.fieldType F) gT G n' rG A irrG cGA : predArgType) (pred_of_argType (@gen_of (FinRing.Field.fieldType F) gT G n' rG A irrG cGA : predArgType))))) (expn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (@degree_mxminpoly (FinRing.Field.fieldType F) n' A)) *)
by rewrite card_sub card_matrix mul1n.
Qed.
End FiniteGenField.
End MatrixGenField.
Bind Scope ring_scope with gen_of.
Arguments rVval {F gT G%G n'%N rG A%R irrG cGA} x%R : rename.
Prenex Implicits gen_of Gen rVval pval mxval gen groot.
Arguments subbase {F n'} A {nA}.
Prenex Implicits gen_dim gen_base base val_gen gen_mx rowval_gen.
Arguments in_gen {F gT G n' rG A} irrG cGA {m} W.
Arguments in_genK {F gT G n' rG A} irrG cGA {m} W : rename.
Arguments val_genK {F gT G n' rG A irrG cGA m} W : rename.
Prenex Implicits gen_env gen_term gen_form gen_sat.
Canonical gen_subType.
Canonical gen_eqType.
Canonical gen_choiceType.
Canonical gen_countType.
Canonical gen_subCountType.
Canonical gen_finType.
Canonical gen_subFinType.
Canonical gen_zmodType.
Canonical gen_finZmodType.
Canonical gen_baseFinGroupType.
Canonical gen_finGroupType.
Canonical gen_ringType.
Canonical gen_finRingType.
Canonical gen_comRingType.
Canonical gen_finComRingType.
Canonical gen_unitRingType.
Canonical gen_finUnitRingType.
Canonical gen_comUnitRingType.
Canonical gen_finComUnitRingType.
Canonical gen_idomainType.
Canonical gen_finIdomainType.
Canonical gen_fieldType.
Canonical gen_finFieldType.
Canonical gen_decFieldType.
Section BuildSplittingField.
Implicit Type gT : finGroupType.
Implicit Type F : fieldType.
Lemma group_splitting_field_exists gT (G : {group gT}) F :
classically {Fs : fieldType & {rmorphism F -> Fs}
& group_splitting_field Fs G}.
Lemma group_closure_field_exists gT F :
classically {Fs : fieldType & {rmorphism F -> Fs}
& group_closure_field Fs gT}.
Proof.
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => group_closure_field Fs gT)) *)
set n := #|{group gT}|.
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => group_closure_field Fs gT)) *)
suffices: classically {Fs : fieldType & {rmorphism F -> Fs} & forall G : {group gT}, enum_rank G < n -> group_splitting_field Fs G}.
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) n)), @group_splitting_field Fs gT G)) *)
(* Goal: forall _ : classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) n)), @group_splitting_field Fs gT G)), classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => group_closure_field Fs gT)) *)
-
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) n)), @group_splitting_field Fs gT G)) *)
(* Goal: forall _ : classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) n)), @group_splitting_field Fs gT G)), classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => group_closure_field Fs gT)) *)
apply: classic_bind => [[Fs f splitFs]] _ -> //.
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) n)), @group_splitting_field Fs gT G)) *)
(* Goal: @sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => group_closure_field Fs gT) *)
by exists Fs => // G; apply: splitFs.
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) n)), @group_splitting_field Fs gT G)) *)
elim: (n) => [|i IHi]; first by move=> _ -> //; exists F => //; exists id.
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) (S i))), @group_splitting_field Fs gT G)) *)
apply: classic_bind IHi => [[F' f splitF']].
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) (S i))), @group_splitting_field Fs gT G)) *)
have [le_n_i _ -> // | lt_i_n] := leqP n i.
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) (S i))), @group_splitting_field Fs gT G)) *)
(* Goal: @sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) (S i))), @group_splitting_field Fs gT G) *)
by exists F' => // G _; apply: splitF'; apply: leq_trans le_n_i.
(* Goal: classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) (S i))), @group_splitting_field Fs gT G)) *)
have:= @group_splitting_field_exists _ (enum_val (Ordinal lt_i_n)) F'.
(* Goal: forall _ : classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F') (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F', GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => @group_splitting_field Fs gT (@enum_val (group_of_finType gT) (fun _ : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => true) (@Ordinal n i lt_i_n)))), classically (@sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x0 : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x0))) (@enum_rank (group_of_finType gT) G))) (S i))), @group_splitting_field Fs gT G)) *)
apply: classic_bind => [[Fs f' splitFs]] _ -> //.
(* Goal: @sigT2 GRing.Field.type (fun Fs : GRing.Field.type => @GRing.RMorphism.map (GRing.Field.ringType F) (GRing.Field.ringType Fs) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort Fs))) (fun Fs : GRing.Field.type => forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) (S i))), @group_splitting_field Fs gT G) *)
exists Fs => [|G]; first exact: [rmorphism of (f' \o f)].
(* Goal: forall _ : is_true (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) (S i)), @group_splitting_field Fs gT G *)
rewrite ltnS leq_eqVlt -{1}[i]/(val (Ordinal lt_i_n)) val_eqE.
(* Goal: forall _ : is_true (orb (@eq_op (@sub_eqType nat_eqType (fun x : nat => leq (S x) (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x0 : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x0)))) (ordinal_subType (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))))) (@enum_rank (group_of_finType gT) G) (@Ordinal n i lt_i_n)) (leq (S (@nat_of_ord (@card (group_of_finType gT) (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (fun x : Finite.sort (group_of_finType gT) => @pred_of_simpl (Equality.sort (Finite.eqType (group_of_finType gT))) (pred_of_argType (Equality.sort (Finite.eqType (group_of_finType gT)))) x))) (@enum_rank (group_of_finType gT) G))) i)), @group_splitting_field Fs gT G *)
case/predU1P=> [defG | ltGi]; first by rewrite -[G]enum_rankK defG.
(* Goal: @group_splitting_field Fs gT G *)
by apply: (extend_group_splitting_field f'); apply: splitF'.
Qed.
Lemma group_closure_closed_field (F : closedFieldType) gT :
group_closure_field F gT.
Proof.
(* Goal: group_closure_field (GRing.ClosedField.fieldType F) gT *)
move=> G [|n] rG irrG; first by case/mx_irrP: irrG.
(* Goal: is_true (@mx_absolutely_irreducible (GRing.ClosedField.fieldType F) gT G (S n) rG) *)
apply: cent_mx_scalar_abs_irr => //; rewrite leqNgt.
(* Goal: is_true (negb (leq (S (S O)) (@mxrank (GRing.ClosedField.fieldType F) (muln (S n) (S n)) (muln (S n) (S n)) (@cent_mx (GRing.ClosedField.fieldType F) (@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 n) (@enveloping_algebra_mx (GRing.Field.comUnitRingType (GRing.ClosedField.fieldType F)) gT G (S n) rG))))) *)
apply/(has_non_scalar_mxP (scalar_mx_cent _ _)) => [[A cGA nscalA]].
(* Goal: False *)
have [a]: exists a, eigenvalue A a.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
(* Goal: @ex (GRing.Field.sort (GRing.ClosedField.fieldType F)) (fun a : GRing.Field.sort (GRing.ClosedField.fieldType F) => is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a)) *)
pose P := mxminpoly A; pose d := degree_mxminpoly A.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
(* Goal: @ex (GRing.Field.sort (GRing.ClosedField.fieldType F)) (fun a : GRing.Field.sort (GRing.ClosedField.fieldType F) => is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a)) *)
have Pd1: P`_d = 1.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
(* Goal: @ex (GRing.Field.sort (GRing.ClosedField.fieldType F)) (fun a : GRing.Field.sort (GRing.ClosedField.fieldType F) => is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a)) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (@polyseq (GRing.Field.ringType (GRing.ClosedField.fieldType F)) P) d) (GRing.one (GRing.Field.ringType (GRing.ClosedField.fieldType F))) *)
by rewrite -(eqP (mxminpoly_monic A)) /lead_coef size_mxminpoly.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
(* Goal: @ex (GRing.Field.sort (GRing.ClosedField.fieldType F)) (fun a : GRing.Field.sort (GRing.ClosedField.fieldType F) => is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a)) *)
have d_gt0: d > 0 := mxminpoly_nonconstant A.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
(* Goal: @ex (GRing.Field.sort (GRing.ClosedField.fieldType F)) (fun a : GRing.Field.sort (GRing.ClosedField.fieldType F) => is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a)) *)
have [a def_ad] := solve_monicpoly (nth 0 (- P)) d_gt0.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
(* Goal: @ex (GRing.Field.sort (GRing.ClosedField.fieldType F)) (fun a : GRing.Field.sort (GRing.ClosedField.fieldType F) => is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a)) *)
exists a; rewrite eigenvalue_root_min -/P /root -oppr_eq0 -hornerN.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (@horner (GRing.Field.ringType (GRing.ClosedField.fieldType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F))) P) a) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F))))) *)
rewrite horner_coef size_opp size_mxminpoly -/d big_ord_recr -def_ad.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (@Monoid.operator (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (GRing.add_monoid (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (@GRing.exp (GRing.ClosedField.ringType F) a d) (@GRing.mul (GRing.Field.ringType (GRing.ClosedField.fieldType F)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F)))) (@polyseq (GRing.Field.ringType (GRing.ClosedField.fieldType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F))) P)) (@nat_of_ord (S d) (@ord_max d))) (@GRing.exp (GRing.Field.ringType (GRing.ClosedField.fieldType F)) a (@nat_of_ord (S d) (@ord_max d))))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F))))) *)
by rewrite coefN Pd1 mulN1r /= subrr.
(* Goal: forall _ : is_true (@eigenvalue (GRing.ClosedField.fieldType F) (S n) A a), False *)
case/negP; rewrite kermx_eq0 row_free_unit (mx_Schur irrG) ?subr_eq0 //.
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType (GRing.ClosedField.fieldType F))) (S n) (S n))) A (@scalar_mx (GRing.Field.ringType (GRing.ClosedField.fieldType F)) (S n) a))) *)
(* Goal: is_true (@centgmx (GRing.Field.comUnitRingType (GRing.ClosedField.fieldType F)) gT G (S n) rG (@GRing.add (matrix_zmodType (GRing.Field.zmodType (GRing.ClosedField.fieldType F)) (S n) (S n)) A (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType (GRing.ClosedField.fieldType F))) (S n) (S n)) (@scalar_mx (GRing.Field.ringType (GRing.ClosedField.fieldType F)) (S n) a)))) *)
by rewrite -memmx_cent_envelop -raddfN linearD addmx_sub ?scalar_mx_cent.
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType (GRing.ClosedField.fieldType F))) (S n) (S n))) A (@scalar_mx (GRing.Field.ringType (GRing.ClosedField.fieldType F)) (S n) a))) *)
by apply: contraNneq nscalA => ->; apply: scalar_mx_is_scalar.
Qed.
End BuildSplittingField.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Monoid_cat.
Section Def.
Variable E : SET.
Definition endo_comp : law_of_composition (Hom E E).
Proof.
(* Goal: Carrier (law_of_composition (@Hom SET E E)) *)
unfold law_of_composition in |- *.
(* Goal: Carrier (@Hom SET (cart (@Hom SET E E) (@Hom SET E E)) (@Hom SET E E)) *)
apply (Build_Map (Ap:=fun x : cart (Hom E E) (Hom E E) => comp_map_map (proj1 x) (proj2 x))).
(* Goal: @fun_compatible (cart (@Hom SET E E) (@Hom SET E E)) (MAP E E) (fun x : Carrier (cart (@Hom SET E E) (@Hom SET E E)) => @comp_map_map E E E (@proj1 (@Hom SET E E) (@Hom SET E E) x) (@proj2 (@Hom SET E E) (@Hom SET E E) x)) *)
red in |- *.
(* Goal: forall (x y : Carrier (cart (@Hom SET E E) (@Hom SET E E))) (_ : @Equal (cart (@Hom SET E E) (@Hom SET E E)) x y), @Equal (MAP E E) (@comp_map_map E E E (@proj1 (@Hom SET E E) (@Hom SET E E) x) (@proj2 (@Hom SET E E) (@Hom SET E E) x)) (@comp_map_map E E E (@proj1 (@Hom SET E E) (@Hom SET E E) y) (@proj2 (@Hom SET E E) (@Hom SET E E) y)) *)
auto with algebra.
Qed.
Definition Endo_SET_sgroup : SGROUP.
Proof.
(* Goal: Ob SGROUP *)
apply (Build_sgroup (sgroup_set:=Hom E E)).
(* Goal: sgroup_on (@Hom SET E E) *)
apply (Build_sgroup_on (E:=Hom E E) (sgroup_law_map:=endo_comp)).
(* Goal: @associative (@Hom SET E E) endo_comp *)
red in |- *.
(* Goal: forall x y z : Carrier (@Hom SET E E), @Equal (@Hom SET E E) (@Ap (cart (@Hom SET E E) (@Hom SET E E)) (@Hom SET E E) endo_comp (@couple (@Hom SET E E) (@Hom SET E E) (@Ap (cart (@Hom SET E E) (@Hom SET E E)) (@Hom SET E E) endo_comp (@couple (@Hom SET E E) (@Hom SET E E) x y)) z)) (@Ap (cart (@Hom SET E E) (@Hom SET E E)) (@Hom SET E E) endo_comp (@couple (@Hom SET E E) (@Hom SET E E) x (@Ap (cart (@Hom SET E E) (@Hom SET E E)) (@Hom SET E E) endo_comp (@couple (@Hom SET E E) (@Hom SET E E) y z)))) *)
simpl in |- *.
(* Goal: forall x y z : Map E E, @Map_eq E E (@comp_map_map E E E (@comp_map_map E E E x y) z) (@comp_map_map E E E x (@comp_map_map E E E y z)) *)
unfold Map_eq in |- *; auto with algebra.
Qed.
Definition Endo_SET : MONOID.
Proof.
(* Goal: Ob MONOID *)
apply (Build_monoid (monoid_sgroup:=Endo_SET_sgroup)).
(* Goal: monoid_on Endo_SET_sgroup *)
apply (Build_monoid_on (A:=Endo_SET_sgroup) (monoid_unit:=Id E)).
(* Goal: @unit_l (sgroup_set Endo_SET_sgroup) (@sgroup_law_map (sgroup_set Endo_SET_sgroup) (sgroup_on_def Endo_SET_sgroup)) (Id E) *)
(* Goal: @unit_r (sgroup_set Endo_SET_sgroup) (@sgroup_law_map (sgroup_set Endo_SET_sgroup) (sgroup_on_def Endo_SET_sgroup)) (Id E) *)
red in |- *.
(* Goal: @unit_l (sgroup_set Endo_SET_sgroup) (@sgroup_law_map (sgroup_set Endo_SET_sgroup) (sgroup_on_def Endo_SET_sgroup)) (Id E) *)
(* Goal: forall x : Carrier (sgroup_set Endo_SET_sgroup), @Equal (sgroup_set Endo_SET_sgroup) (@Ap (cart (sgroup_set Endo_SET_sgroup) (sgroup_set Endo_SET_sgroup)) (sgroup_set Endo_SET_sgroup) (@sgroup_law_map (sgroup_set Endo_SET_sgroup) (sgroup_on_def Endo_SET_sgroup)) (@couple (sgroup_set Endo_SET_sgroup) (sgroup_set Endo_SET_sgroup) x (Id E))) x *)
simpl in |- *.
(* Goal: @unit_l (sgroup_set Endo_SET_sgroup) (@sgroup_law_map (sgroup_set Endo_SET_sgroup) (sgroup_on_def Endo_SET_sgroup)) (Id E) *)
(* Goal: forall x : Map E E, @Map_eq E E (@comp_map_map E E E x (Id E)) x *)
unfold Map_eq in |- *; auto with algebra.
(* Goal: @unit_l (sgroup_set Endo_SET_sgroup) (@sgroup_law_map (sgroup_set Endo_SET_sgroup) (sgroup_on_def Endo_SET_sgroup)) (Id E) *)
red in |- *.
(* Goal: forall x : Carrier (sgroup_set Endo_SET_sgroup), @Equal (sgroup_set Endo_SET_sgroup) (@Ap (cart (sgroup_set Endo_SET_sgroup) (sgroup_set Endo_SET_sgroup)) (sgroup_set Endo_SET_sgroup) (@sgroup_law_map (sgroup_set Endo_SET_sgroup) (sgroup_on_def Endo_SET_sgroup)) (@couple (sgroup_set Endo_SET_sgroup) (sgroup_set Endo_SET_sgroup) (Id E) x)) x *)
simpl in |- *.
(* Goal: forall x : Map E E, @Map_eq E E (@comp_map_map E E E (Id E) x) x *)
unfold Map_eq in |- *; auto with algebra.
Qed.
End Def. |
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Group_util.
Require Export Abelian_group_facts.
Section Free_abelian_group_def.
Variable V : SET.
Inductive FaG : Type :=
| Var : V -> FaG
| Law : FaG -> FaG -> FaG
| Unit : FaG
| Inv : FaG -> FaG.
Inductive eqFaG : FaG -> FaG -> Prop :=
| eqFaG_Var : forall x y : V, Equal x y -> (eqFaG (Var x) (Var y):Prop)
| eqFaG_law :
forall x x' y y' : FaG,
eqFaG x x' -> eqFaG y y' -> (eqFaG (Law x y) (Law x' y'):Prop)
| eqFaG_law_assoc :
forall x y z : FaG, eqFaG (Law (Law x y) z) (Law x (Law y z)):Prop
| eqFaG_law0r : forall x : FaG, eqFaG (Law x Unit) x:Prop
| eqFaG_inv : forall x y : FaG, eqFaG x y -> eqFaG (Inv x) (Inv y)
| eqFaG_invr : forall x : FaG, eqFaG (Law x (Inv x)) Unit
| eqFaG_refl : forall x : FaG, eqFaG x x:Prop
| eqFaG_sym : forall x y : FaG, eqFaG x y -> (eqFaG y x:Prop)
| eqFaG_trans :
forall x y z : FaG, eqFaG x y -> eqFaG y z -> (eqFaG x z:Prop)
| eqFaG_com : forall x y : FaG, eqFaG (Law x y) (Law y x).
Hint Resolve eqFaG_Var eqFaG_law eqFaG_law_assoc eqFaG_law0r eqFaG_invr
eqFaG_refl eqFaG_com: algebra.
Hint Immediate eqFaG_sym: algebra.
Lemma eqFaG_Equiv : equivalence eqFaG.
Proof.
(* Goal: @equivalence FaG eqFaG *)
red in |- *.
(* Goal: and (@reflexive FaG eqFaG) (@partial_equivalence FaG eqFaG) *)
split; [ try assumption | idtac ].
(* Goal: @partial_equivalence FaG eqFaG *)
(* Goal: @reflexive FaG eqFaG *)
exact eqFaG_refl.
(* Goal: @partial_equivalence FaG eqFaG *)
red in |- *.
(* Goal: and (@transitive FaG eqFaG) (@symmetric FaG eqFaG) *)
split; [ try assumption | idtac ].
(* Goal: @symmetric FaG eqFaG *)
(* Goal: @transitive FaG eqFaG *)
exact eqFaG_trans.
(* Goal: @symmetric FaG eqFaG *)
exact eqFaG_sym.
Qed.
Definition FaG_set := Build_Setoid eqFaG_Equiv.
Definition FreeAbelianGroup : ABELIAN_GROUP.
Proof.
(* Goal: Ob ABELIAN_GROUP *)
apply (BUILD_ABELIAN_GROUP (E:=FaG_set) (genlaw:=Law) (e:=Unit) (geninv:=Inv)).
(* Goal: forall x y : Carrier FaG_set, @Equal FaG_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaG_set, @Equal FaG_set (Law x (Inv x)) Unit *)
(* Goal: forall (x y : Carrier FaG_set) (_ : @Equal FaG_set x y), @Equal FaG_set (Inv x) (Inv y) *)
(* Goal: forall x : Carrier FaG_set, @Equal FaG_set (Law x Unit) x *)
(* Goal: forall x y z : Carrier FaG_set, @Equal FaG_set (Law (Law x y) z) (Law x (Law y z)) *)
(* Goal: forall (x x' y y' : Carrier FaG_set) (_ : @Equal FaG_set x x') (_ : @Equal FaG_set y y'), @Equal FaG_set (Law x y) (Law x' y') *)
exact eqFaG_law.
(* Goal: forall x y : Carrier FaG_set, @Equal FaG_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaG_set, @Equal FaG_set (Law x (Inv x)) Unit *)
(* Goal: forall (x y : Carrier FaG_set) (_ : @Equal FaG_set x y), @Equal FaG_set (Inv x) (Inv y) *)
(* Goal: forall x : Carrier FaG_set, @Equal FaG_set (Law x Unit) x *)
(* Goal: forall x y z : Carrier FaG_set, @Equal FaG_set (Law (Law x y) z) (Law x (Law y z)) *)
exact eqFaG_law_assoc.
(* Goal: forall x y : Carrier FaG_set, @Equal FaG_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaG_set, @Equal FaG_set (Law x (Inv x)) Unit *)
(* Goal: forall (x y : Carrier FaG_set) (_ : @Equal FaG_set x y), @Equal FaG_set (Inv x) (Inv y) *)
(* Goal: forall x : Carrier FaG_set, @Equal FaG_set (Law x Unit) x *)
exact eqFaG_law0r.
(* Goal: forall x y : Carrier FaG_set, @Equal FaG_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaG_set, @Equal FaG_set (Law x (Inv x)) Unit *)
(* Goal: forall (x y : Carrier FaG_set) (_ : @Equal FaG_set x y), @Equal FaG_set (Inv x) (Inv y) *)
exact eqFaG_inv.
(* Goal: forall x y : Carrier FaG_set, @Equal FaG_set (Law x y) (Law y x) *)
(* Goal: forall x : Carrier FaG_set, @Equal FaG_set (Law x (Inv x)) Unit *)
exact eqFaG_invr.
(* Goal: forall x y : Carrier FaG_set, @Equal FaG_set (Law x y) (Law y x) *)
exact eqFaG_com.
Qed.
Section Universal_prop.
Variable G : ABELIAN_GROUP.
Variable f : Hom V G.
Fixpoint FaG_lift_fun (p : FreeAbelianGroup) : G :=
match p with
| Var v => f v
| Law p1 p2 => sgroup_law _ (FaG_lift_fun p1) (FaG_lift_fun p2)
| Unit => monoid_unit G
| Inv p1 => group_inverse G (FaG_lift_fun p1)
end.
Definition FaG_lift : Hom FreeAbelianGroup G.
Proof.
(* Goal: Carrier (@Hom ABELIAN_GROUP FreeAbelianGroup G) *)
apply (BUILD_HOM_GROUP (G:=FreeAbelianGroup) (G':=G) (ff:=FaG_lift_fun)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) (monoid_on_def (group_monoid (abelian_group_group FreeAbelianGroup))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G))) (monoid_on_def (group_monoid (abelian_group_group G)))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) x y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x) (FaG_lift_fun y)) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x) (FaG_lift_fun y) *)
intros x y H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) (monoid_on_def (group_monoid (abelian_group_group FreeAbelianGroup))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G))) (monoid_on_def (group_monoid (abelian_group_group G)))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) x y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x) (FaG_lift_fun y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x) (FaG_lift_fun y) *)
elim H'; simpl in |- *; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) (monoid_on_def (group_monoid (abelian_group_group FreeAbelianGroup))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G))) (monoid_on_def (group_monoid (abelian_group_group G)))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) x y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x) (FaG_lift_fun y)) *)
(* Goal: forall (x y z : FaG) (_ : eqFaG x y) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x) (FaG_lift_fun y)) (_ : eqFaG y z) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun y) (FaG_lift_fun z)), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x) (FaG_lift_fun z) *)
intros x0 y0 z H'0 H'1 H'2 H'3; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) (monoid_on_def (group_monoid (abelian_group_group FreeAbelianGroup))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G))) (monoid_on_def (group_monoid (abelian_group_group G)))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) x y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x) (FaG_lift_fun y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0) (FaG_lift_fun z) *)
apply Trans with (FaG_lift_fun y0); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) (monoid_on_def (group_monoid (abelian_group_group FreeAbelianGroup))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G))) (monoid_on_def (group_monoid (abelian_group_group G)))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) x y)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x) (FaG_lift_fun y)) *)
simpl in |- *; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) (monoid_on_def (group_monoid (abelian_group_group FreeAbelianGroup))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G))) (monoid_on_def (group_monoid (abelian_group_group G)))) *)
simpl in |- *; auto with algebra.
Qed.
Definition FaG_var : Hom V FreeAbelianGroup.
Proof.
(* Goal: Carrier (@Hom SET V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))))) *)
apply (Build_Map (A:=V) (B:=FreeAbelianGroup) (Ap:=Var)).
(* Goal: @fun_compatible V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))) Var *)
red in |- *.
(* Goal: forall (x y : Carrier V) (_ : @Equal V x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))) (Var x) (Var y) *)
simpl in |- *; auto with algebra.
Qed.
Lemma FaG_comp_prop :
Equal f (comp_hom (FaG_lift:Hom (FreeAbelianGroup:SET) G) FaG_var).
Proof.
(* Goal: @Equal (@Hom SET V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G))))) f (@comp_hom SET V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup)))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) (monoid_sgroup (group_monoid (abelian_group_group G))) (@monoid_sgroup_hom (group_monoid (abelian_group_group FreeAbelianGroup)) (group_monoid (abelian_group_group G)) FaG_lift) : Carrier (@Hom SET (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group FreeAbelianGroup))) : Ob SET) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))))) FaG_var) *)
simpl in |- *.
(* Goal: @Map_eq V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) f (@comp_hom SET V FaG_set (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@f2 (@Group_util.G FaG_set Law Unit Inv eqFaG_law eqFaG_law_assoc eqFaG_law0r eqFaG_inv eqFaG_invr) (abelian_group_group G) FaG_lift_fun (fun (x y : FaG) (H' : eqFaG x y) => @eqFaG_ind (fun x0 y0 : FaG => @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0) (FaG_lift_fun y0)) (fun (x0 y0 : Carrier V) (H : @Equal V x0 y0) => @Ap_comp V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) f f x0 y0 H (@Refl (MAP V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G))))) f)) (fun (x0 x' y0 y' : FaG) (_ : eqFaG x0 x') (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0) (FaG_lift_fun x')) (_ : eqFaG y0 y') (H2 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun y0) (FaG_lift_fun y')) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x0) (FaG_lift_fun x') (FaG_lift_fun y0) (FaG_lift_fun y') H0 H2) (fun x0 y0 z : FaG => @SGROUP_assoc (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x0) (FaG_lift_fun y0) (FaG_lift_fun z)) (fun x0 : FaG => @MONOID_unit_r (group_monoid (abelian_group_group G)) (FaG_lift_fun x0)) (fun (x0 y0 : FaG) (_ : eqFaG x0 y0) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0) (FaG_lift_fun y0)) => @GROUP_comp (abelian_group_group G) (FaG_lift_fun x0) (FaG_lift_fun y0) H0) (fun x0 : FaG => @GROUP_inverse_r (abelian_group_group G) (FaG_lift_fun x0)) (fun x0 : FaG => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0)) (fun (x0 y0 : FaG) (_ : eqFaG x0 y0) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0) (FaG_lift_fun y0)) => @Sym (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0) (FaG_lift_fun y0) H0) (fun (x0 y0 z : FaG) (_ : eqFaG x0 y0) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0) (FaG_lift_fun y0)) (_ : eqFaG y0 z) (H'3 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun y0) (FaG_lift_fun z)) => @Trans (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x0) (FaG_lift_fun y0) (FaG_lift_fun z) H'1 H'3) (fun x0 y0 : FaG => @ABELIAN_GROUP_com G (FaG_lift_fun x0) (FaG_lift_fun y0)) x y H')) FaG_var) *)
red in |- *.
(* Goal: forall x : Carrier V, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@Ap V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) f x) (@Ap V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@comp_hom SET V FaG_set (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@f2 (@Group_util.G FaG_set Law Unit Inv eqFaG_law eqFaG_law_assoc eqFaG_law0r eqFaG_inv eqFaG_invr) (abelian_group_group G) FaG_lift_fun (fun (x0 y : FaG) (H' : eqFaG x0 y) => @eqFaG_ind (fun x1 y0 : FaG => @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x1) (FaG_lift_fun y0)) (fun (x1 y0 : Carrier V) (H : @Equal V x1 y0) => @Ap_comp V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) f f x1 y0 H (@Refl (MAP V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G))))) f)) (fun (x1 x' y0 y' : FaG) (_ : eqFaG x1 x') (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x1) (FaG_lift_fun x')) (_ : eqFaG y0 y') (H2 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun y0) (FaG_lift_fun y')) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x1) (FaG_lift_fun x') (FaG_lift_fun y0) (FaG_lift_fun y') H0 H2) (fun x1 y0 z : FaG => @SGROUP_assoc (monoid_sgroup (group_monoid (abelian_group_group G))) (FaG_lift_fun x1) (FaG_lift_fun y0) (FaG_lift_fun z)) (fun x1 : FaG => @MONOID_unit_r (group_monoid (abelian_group_group G)) (FaG_lift_fun x1)) (fun (x1 y0 : FaG) (_ : eqFaG x1 y0) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x1) (FaG_lift_fun y0)) => @GROUP_comp (abelian_group_group G) (FaG_lift_fun x1) (FaG_lift_fun y0) H0) (fun x1 : FaG => @GROUP_inverse_r (abelian_group_group G) (FaG_lift_fun x1)) (fun x1 : FaG => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x1)) (fun (x1 y0 : FaG) (_ : eqFaG x1 y0) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x1) (FaG_lift_fun y0)) => @Sym (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x1) (FaG_lift_fun y0) H0) (fun (x1 y0 z : FaG) (_ : eqFaG x1 y0) (H'1 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x1) (FaG_lift_fun y0)) (_ : eqFaG y0 z) (H'3 : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun y0) (FaG_lift_fun z)) => @Trans (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (FaG_lift_fun x1) (FaG_lift_fun y0) (FaG_lift_fun z) H'1 H'3) (fun x1 y0 : FaG => @ABELIAN_GROUP_com G (FaG_lift_fun x1) (FaG_lift_fun y0)) x0 y H')) FaG_var) x) *)
simpl in |- *.
(* Goal: forall x : Carrier V, @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@Ap V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) f x) (@Ap V (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) f x) *)
auto with algebra.
Qed.
End Universal_prop.
End Free_abelian_group_def.
Hint Resolve FaG_comp_prop: algebra.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Union.
Require Export Singleton.
Require Export Diff.
Require Export Classical_Prop.
Section fparts_in_def.
Variable E : Setoid.
Definition add_part (A : part_set E) (x : E) := union A (single x).
Lemma add_part_comp :
forall (A A' : part_set E) (x x' : E),
Equal A A' -> Equal x x' -> Equal (add_part A x) (add_part A' x').
Proof.
(* Goal: forall (A A' : Carrier (part_set E)) (x x' : Carrier E) (_ : @Equal (part_set E) A A') (_ : @Equal E x x'), @Equal (part_set E) (add_part A x) (add_part A' x') *)
unfold add_part in |- *; auto with algebra.
Qed.
Hint Resolve add_part_comp: algebra.
Lemma add_part_in : forall (A : part_set E) (x : E), in_part x (add_part A x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E), @in_part E x (add_part A x) *)
simpl in |- *; auto with algebra.
Qed.
Hint Resolve add_part_in: algebra.
Lemma add_part_com :
forall (A : part_set E) (x y : E),
Equal (add_part (add_part A x) y) (add_part (add_part A y) x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E), @Equal (part_set E) (add_part (add_part A x) y) (add_part (add_part A y) x) *)
unfold add_part in |- *.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E), @Equal (part_set E) (@union E (@union E A (@single E x)) (@single E y)) (@union E (@union E A (@single E y)) (@single E x)) *)
intros.
(* Goal: @Equal (part_set E) (@union E (@union E A (@single E x)) (@single E y)) (@union E (@union E A (@single E y)) (@single E x)) *)
apply Trans with (union A (union (single x) (single y))); auto with algebra.
(* Goal: @Equal (part_set E) (@union E A (@union E (@single E x) (@single E y))) (@union E (@union E A (@single E y)) (@single E x)) *)
apply Trans with (union A (union (single y) (single x))); auto with algebra.
Qed.
Hint Immediate add_part_com: algebra.
Lemma add_in :
forall (A : part_set E) (x : E), in_part x A -> Equal (add_part A x) A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x A), @Equal (part_set E) (add_part A x) A *)
intro A.
(* Goal: forall (x : Carrier E) (_ : @in_part E x A), @Equal (part_set E) (add_part A x) A *)
case A.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (Pred_compatible_prf : @pred_compatible E Pred_fun) (x : Carrier E) (_ : @in_part E x (@Build_Predicate E Pred_fun Pred_compatible_prf)), @Equal (part_set E) (add_part (@Build_Predicate E Pred_fun Pred_compatible_prf) x) (@Build_Predicate E Pred_fun Pred_compatible_prf) *)
simpl in |- *; unfold pred_compatible, eq_part, in_part in |- *; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : forall (x y : Carrier E) (_ : Pred_fun x) (_ : @Equal E y x), Pred_fun y) (x : Carrier E) (_ : Pred_fun x) (x0 : Carrier E), and (forall _ : or (Pred_fun x0) (@Equal E x0 x), Pred_fun x0) (forall _ : Pred_fun x0, or (Pred_fun x0) (@Equal E x0 x)) *)
intuition eauto.
Qed.
Hint Resolve add_in: algebra.
Lemma add_part_in_el_diff :
forall (A : part_set E) (x y : E),
in_part y (add_part A x) -> ~ Equal y x -> in_part y A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E) (_ : @in_part E y (add_part A x)) (_ : not (@Equal E y x)), @in_part E y A *)
simpl in |- *.
(* Goal: forall (A : Predicate E) (x y : Carrier E) (_ : or (@in_part E y A) (@Equal E y x)) (_ : not (@Equal E y x)), @in_part E y A *)
unfold eq_part, add_part, union, single in |- *; simpl in |- *.
(* Goal: forall (A : Predicate E) (x y : Carrier E) (_ : or (@in_part E y A) (@Equal E y x)) (_ : not (@Equal E y x)), @in_part E y A *)
intro.
(* Goal: forall (x y : Carrier E) (_ : or (@in_part E y A) (@Equal E y x)) (_ : not (@Equal E y x)), @in_part E y A *)
case A; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (x y : Carrier E) (_ : or (Pred_fun y) (@Equal E y x)) (_ : not (@Equal E y x)), Pred_fun y *)
intros a pa.
(* Goal: forall (x y : Carrier E) (_ : or (a y) (@Equal E y x)) (_ : not (@Equal E y x)), a y *)
intuition.
Qed.
Lemma add_part_in_el_not_in :
forall (A : part_set E) (x y : E),
in_part y (add_part A x) -> ~ in_part y A -> Equal y x.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E) (_ : @in_part E y (add_part A x)) (_ : not (@in_part E y A)), @Equal E y x *)
simpl in |- *.
(* Goal: forall (A : Predicate E) (x y : Carrier E) (_ : or (@in_part E y A) (@Equal E y x)) (_ : not (@in_part E y A)), @Equal E y x *)
unfold eq_part, add_part, union, single in |- *; simpl in |- *.
(* Goal: forall (A : Predicate E) (x y : Carrier E) (_ : or (@in_part E y A) (@Equal E y x)) (_ : not (@in_part E y A)), @Equal E y x *)
intro.
(* Goal: forall (x y : Carrier E) (_ : or (@in_part E y A) (@Equal E y x)) (_ : not (@in_part E y A)), @Equal E y x *)
case A; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (x y : Carrier E) (_ : or (Pred_fun y) (@Equal E y x)) (_ : not (Pred_fun y)), @Equal E y x *)
intros a pa.
(* Goal: forall (x y : Carrier E) (_ : or (a y) (@Equal E y x)) (_ : not (a y)), @Equal E y x *)
intuition.
Qed.
Lemma add_part_simpl :
forall (A B : part_set E) (x : E),
~ in_part x A ->
~ in_part x B -> Equal (add_part A x) (add_part B x) -> Equal A B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) (add_part A x) (add_part B x)), @Equal (part_set E) A B *)
intros A B.
(* Goal: forall (x : Carrier E) (_ : not (@in_part E x A)) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) (add_part A x) (add_part B x)), @Equal (part_set E) A B *)
case A; case B; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (Pred_compatible_prf : @pred_compatible E Pred_fun) (Pred_fun0 : forall _ : Carrier E, Prop) (Pred_compatible_prf0 : @pred_compatible E Pred_fun0) (x : Carrier E) (_ : not (Pred_fun0 x)) (_ : not (Pred_fun x)) (_ : @eq_part E (add_part (@Build_Predicate E Pred_fun0 Pred_compatible_prf0) x) (add_part (@Build_Predicate E Pred_fun Pred_compatible_prf) x)), @eq_part E (@Build_Predicate E Pred_fun0 Pred_compatible_prf0) (@Build_Predicate E Pred_fun Pred_compatible_prf) *)
intros a pa b pb.
(* Goal: forall (x : Carrier E) (_ : not (b x)) (_ : not (a x)) (_ : @eq_part E (add_part (@Build_Predicate E b pb) x) (add_part (@Build_Predicate E a pa) x)), @eq_part E (@Build_Predicate E b pb) (@Build_Predicate E a pa) *)
unfold eq_part, add_part, union, single in |- *; simpl in |- *.
(* Goal: forall (x : Carrier E) (_ : not (b x)) (_ : not (a x)) (_ : forall x0 : Carrier E, and (forall _ : or (b x0) (@Equal E x0 x), or (a x0) (@Equal E x0 x)) (forall _ : or (a x0) (@Equal E x0 x), or (b x0) (@Equal E x0 x))) (x0 : Carrier E), and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
intros.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
elim (classic (Equal x x0)); intros.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
split; intros.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: b x0 *)
(* Goal: a x0 *)
apply pa with x; auto with algebra.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: b x0 *)
(* Goal: a x *)
cut (b x).
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: b x0 *)
(* Goal: b x *)
(* Goal: forall _ : b x, a x *)
intro.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: b x0 *)
(* Goal: b x *)
(* Goal: a x *)
absurd (b x); auto with algebra.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: b x0 *)
(* Goal: b x *)
apply pb with x0; auto with algebra.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: b x0 *)
cut (a x).
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: a x *)
(* Goal: forall _ : a x, b x0 *)
intro.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: a x *)
(* Goal: b x0 *)
absurd (a x); auto with algebra.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
(* Goal: a x *)
apply pa with x0; auto with algebra.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
elim (H1 x0); intros.
(* Goal: and (forall _ : b x0, a x0) (forall _ : a x0, b x0) *)
split; intros.
(* Goal: b x0 *)
(* Goal: a x0 *)
lapply H3.
(* Goal: b x0 *)
(* Goal: or (b x0) (@Equal E x0 x) *)
(* Goal: forall _ : or (a x0) (@Equal E x0 x), a x0 *)
intros.
(* Goal: b x0 *)
(* Goal: or (b x0) (@Equal E x0 x) *)
(* Goal: a x0 *)
elim H6; intros.
(* Goal: b x0 *)
(* Goal: or (b x0) (@Equal E x0 x) *)
(* Goal: a x0 *)
(* Goal: a x0 *)
auto with algebra.
(* Goal: b x0 *)
(* Goal: or (b x0) (@Equal E x0 x) *)
(* Goal: a x0 *)
absurd (Equal x0 x); auto with algebra.
(* Goal: b x0 *)
(* Goal: or (b x0) (@Equal E x0 x) *)
left; auto with algebra.
(* Goal: b x0 *)
lapply H4; intros.
(* Goal: or (a x0) (@Equal E x0 x) *)
(* Goal: b x0 *)
elim H6; intros.
(* Goal: or (a x0) (@Equal E x0 x) *)
(* Goal: b x0 *)
(* Goal: b x0 *)
auto with algebra.
(* Goal: or (a x0) (@Equal E x0 x) *)
(* Goal: b x0 *)
absurd (Equal x0 x); auto with algebra.
(* Goal: or (a x0) (@Equal E x0 x) *)
left.
(* Goal: a x0 *)
auto with algebra.
Qed.
Definition minus_part (A : part_set E) (x : E) := diff A (single x).
Lemma minus_part_comp :
forall (A A' : part_set E) (x x' : E),
Equal A A' -> Equal x x' -> Equal (minus_part A x) (minus_part A' x').
Proof.
(* Goal: forall (A A' : Carrier (part_set E)) (x x' : Carrier E) (_ : @Equal (part_set E) A A') (_ : @Equal E x x'), @Equal (part_set E) (minus_part A x) (minus_part A' x') *)
unfold minus_part in |- *; auto with algebra.
Qed.
Hint Resolve minus_part_comp: algebra.
Lemma minus_part_not_in :
forall (A : part_set E) (x : E), ~ in_part x (minus_part A x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E), not (@in_part E x (minus_part A x)) *)
simpl in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E), not (and (@in_part E x A) (not (@Equal E x x))) *)
intro.
(* Goal: forall x : Carrier E, not (and (@in_part E x A) (not (@Equal E x x))) *)
case A; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (x : Carrier E), not (and (Pred_fun x) (not (@Equal E x x))) *)
intros a pa.
(* Goal: forall x : Carrier E, not (and (a x) (not (@Equal E x x))) *)
intuition.
Qed.
Hint Resolve minus_part_not_in: algebra.
Lemma minus_part_com :
forall (A : part_set E) (x y : E),
Equal (minus_part (minus_part A x) y) (minus_part (minus_part A y) x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E), @Equal (part_set E) (minus_part (minus_part A x) y) (minus_part (minus_part A y) x) *)
unfold minus_part in |- *.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E), @Equal (part_set E) (@diff E (@diff E A (@single E x)) (@single E y)) (@diff E (@diff E A (@single E y)) (@single E x)) *)
intros.
(* Goal: @Equal (part_set E) (@diff E (@diff E A (@single E x)) (@single E y)) (@diff E (@diff E A (@single E y)) (@single E x)) *)
simpl in |- *.
(* Goal: @eq_part E (@diff E (@diff E A (@single E x)) (@single E y)) (@diff E (@diff E A (@single E y)) (@single E x)) *)
unfold eq_part, diff, single in |- *; simpl in |- *.
(* Goal: forall x0 : Carrier E, and (forall _ : and (and (@in_part E x0 A) (not (@Equal E x0 x))) (not (@Equal E x0 y)), and (and (@in_part E x0 A) (not (@Equal E x0 y))) (not (@Equal E x0 x))) (forall _ : and (and (@in_part E x0 A) (not (@Equal E x0 y))) (not (@Equal E x0 x)), and (and (@in_part E x0 A) (not (@Equal E x0 x))) (not (@Equal E x0 y))) *)
intro.
(* Goal: and (forall _ : and (and (@in_part E x0 A) (not (@Equal E x0 x))) (not (@Equal E x0 y)), and (and (@in_part E x0 A) (not (@Equal E x0 y))) (not (@Equal E x0 x))) (forall _ : and (and (@in_part E x0 A) (not (@Equal E x0 y))) (not (@Equal E x0 x)), and (and (@in_part E x0 A) (not (@Equal E x0 x))) (not (@Equal E x0 y))) *)
intuition.
Qed.
Hint Immediate minus_part_com: algebra.
Lemma minus_not_in :
forall (A : part_set E) (x : E), ~ in_part x A -> Equal (minus_part A x) A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)), @Equal (part_set E) (minus_part A x) A *)
simpl in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : not (@in_part E x A)), @eq_part E (minus_part A x) A *)
unfold eq_part, minus_part, diff, single in |- *; simpl in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : not (@in_part E x A)) (x0 : Carrier E), and (forall _ : and (@in_part E x0 A) (not (@Equal E x0 x)), @in_part E x0 A) (forall _ : @in_part E x0 A, and (@in_part E x0 A) (not (@Equal E x0 x))) *)
intro A.
(* Goal: forall (x : Carrier E) (_ : not (@in_part E x A)) (x0 : Carrier E), and (forall _ : and (@in_part E x0 A) (not (@Equal E x0 x)), @in_part E x0 A) (forall _ : @in_part E x0 A, and (@in_part E x0 A) (not (@Equal E x0 x))) *)
case A; unfold pred_compatible in |- *; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : forall (x y : Carrier E) (_ : Pred_fun x) (_ : @Equal E y x), Pred_fun y) (x : Carrier E) (_ : not (Pred_fun x)) (x0 : Carrier E), and (forall _ : and (Pred_fun x0) (not (@Equal E x0 x)), Pred_fun x0) (forall _ : Pred_fun x0, and (Pred_fun x0) (not (@Equal E x0 x))) *)
intros a pa x neg_a_x x0.
(* Goal: and (forall _ : and (a x0) (not (@Equal E x0 x)), a x0) (forall _ : a x0, and (a x0) (not (@Equal E x0 x))) *)
generalize (pa x0 x).
(* Goal: forall _ : forall (_ : a x0) (_ : @Equal E x x0), a x, and (forall _ : and (a x0) (not (@Equal E x0 x)), a x0) (forall _ : a x0, and (a x0) (not (@Equal E x0 x))) *)
intuition auto with algebra.
Qed.
Hint Resolve minus_not_in: algebra.
Lemma minus_trans_not_in :
forall (A : part_set E) (x y : E),
~ in_part y A -> ~ in_part y (minus_part A x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x y : Carrier E) (_ : not (@in_part E y A)), not (@in_part E y (minus_part A x)) *)
simpl in |- *.
(* Goal: forall (A : Predicate E) (x y : Carrier E) (_ : not (@in_part E y A)), not (and (@in_part E y A) (not (@Equal E y x))) *)
unfold eq_part, minus_part, diff, single in |- *; simpl in |- *.
(* Goal: forall (A : Predicate E) (x y : Carrier E) (_ : not (@in_part E y A)), not (and (@in_part E y A) (not (@Equal E y x))) *)
intro.
(* Goal: forall (x y : Carrier E) (_ : not (@in_part E y A)), not (and (@in_part E y A) (not (@Equal E y x))) *)
case A; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (x y : Carrier E) (_ : not (Pred_fun y)), not (and (Pred_fun y) (not (@Equal E y x))) *)
intros a pa.
(* Goal: forall (x y : Carrier E) (_ : not (a y)), not (and (a y) (not (@Equal E y x))) *)
intuition.
Qed.
Hint Resolve minus_trans_not_in: algebra.
Lemma union_unit_l : forall A : part_set E, Equal (union (empty E) A) A.
Proof.
(* Goal: forall A : Carrier (part_set E), @Equal (part_set E) (@union E (empty E) A) A *)
simpl in |- *.
(* Goal: forall A : Predicate E, @eq_part E (@union E (empty E) A) A *)
unfold eq_part, union, empty in |- *; simpl in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E), and (forall _ : or False (@in_part E x A), @in_part E x A) (forall _ : @in_part E x A, or False (@in_part E x A)) *)
intuition.
Qed.
Hint Resolve union_unit_l: algebra.
Lemma single_add : forall x : E, Equal (single x) (add_part (empty E) x).
Proof.
(* Goal: forall x : Carrier E, @Equal (part_set E) (@single E x) (add_part (empty E) x) *)
unfold add_part in |- *.
(* Goal: forall x : Carrier E, @Equal (part_set E) (@single E x) (@union E (empty E) (@single E x)) *)
auto with algebra.
Qed.
Hint Resolve single_add: algebra.
Lemma minus_add :
forall (A : part_set E) (x : E),
in_part x A -> Equal (add_part (minus_part A x) x) A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x A), @Equal (part_set E) (add_part (minus_part A x) x) A *)
simpl in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : @in_part E x A), @eq_part E (add_part (minus_part A x) x) A *)
unfold eq_part, add_part, minus_part, union, diff, single in |- *; simpl in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : @in_part E x A) (x0 : Carrier E), and (forall _ : or (and (@in_part E x0 A) (not (@Equal E x0 x))) (@Equal E x0 x), @in_part E x0 A) (forall _ : @in_part E x0 A, or (and (@in_part E x0 A) (not (@Equal E x0 x))) (@Equal E x0 x)) *)
intro.
(* Goal: forall (x : Carrier E) (_ : @in_part E x A) (x0 : Carrier E), and (forall _ : or (and (@in_part E x0 A) (not (@Equal E x0 x))) (@Equal E x0 x), @in_part E x0 A) (forall _ : @in_part E x0 A, or (and (@in_part E x0 A) (not (@Equal E x0 x))) (@Equal E x0 x)) *)
case A; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (x : Carrier E) (_ : Pred_fun x) (x0 : Carrier E), and (forall _ : or (and (Pred_fun x0) (not (@Equal E x0 x))) (@Equal E x0 x), Pred_fun x0) (forall _ : Pred_fun x0, or (and (Pred_fun x0) (not (@Equal E x0 x))) (@Equal E x0 x)) *)
intros a pa.
(* Goal: forall (x : Carrier E) (_ : a x) (x0 : Carrier E), and (forall _ : or (and (a x0) (not (@Equal E x0 x))) (@Equal E x0 x), a x0) (forall _ : a x0, or (and (a x0) (not (@Equal E x0 x))) (@Equal E x0 x)) *)
intros.
(* Goal: and (forall _ : or (and (a x0) (not (@Equal E x0 x))) (@Equal E x0 x), a x0) (forall _ : a x0, or (and (a x0) (not (@Equal E x0 x))) (@Equal E x0 x)) *)
intuition.
(* Goal: or (and (a x0) (forall _ : @Equal E x0 x, False)) (@Equal E x0 x) *)
(* Goal: a x0 *)
apply pa with x; auto with algebra.
(* Goal: or (and (a x0) (forall _ : @Equal E x0 x, False)) (@Equal E x0 x) *)
apply NNPP; intuition.
Qed.
Hint Resolve minus_add: algebra.
Lemma add_minus :
forall (A : part_set E) (x : E),
~ in_part x A -> Equal (minus_part (add_part A x) x) A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)), @Equal (part_set E) (minus_part (add_part A x) x) A *)
simpl in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : not (@in_part E x A)), @eq_part E (minus_part (add_part A x) x) A *)
unfold eq_part, add_part, minus_part, union, diff, single in |- *; simpl in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : not (@in_part E x A)) (x0 : Carrier E), and (forall _ : and (or (@in_part E x0 A) (@Equal E x0 x)) (not (@Equal E x0 x)), @in_part E x0 A) (forall _ : @in_part E x0 A, and (or (@in_part E x0 A) (@Equal E x0 x)) (not (@Equal E x0 x))) *)
intro.
(* Goal: forall (x : Carrier E) (_ : not (@in_part E x A)) (x0 : Carrier E), and (forall _ : and (or (@in_part E x0 A) (@Equal E x0 x)) (not (@Equal E x0 x)), @in_part E x0 A) (forall _ : @in_part E x0 A, and (or (@in_part E x0 A) (@Equal E x0 x)) (not (@Equal E x0 x))) *)
case A; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (_ : @pred_compatible E Pred_fun) (x : Carrier E) (_ : not (Pred_fun x)) (x0 : Carrier E), and (forall _ : and (or (Pred_fun x0) (@Equal E x0 x)) (not (@Equal E x0 x)), Pred_fun x0) (forall _ : Pred_fun x0, and (or (Pred_fun x0) (@Equal E x0 x)) (not (@Equal E x0 x))) *)
intros a pa.
(* Goal: forall (x : Carrier E) (_ : not (a x)) (x0 : Carrier E), and (forall _ : and (or (a x0) (@Equal E x0 x)) (not (@Equal E x0 x)), a x0) (forall _ : a x0, and (or (a x0) (@Equal E x0 x)) (not (@Equal E x0 x))) *)
intros.
(* Goal: and (forall _ : and (or (a x0) (@Equal E x0 x)) (not (@Equal E x0 x)), a x0) (forall _ : a x0, and (or (a x0) (@Equal E x0 x)) (not (@Equal E x0 x))) *)
intuition.
(* Goal: False *)
apply H.
(* Goal: a x *)
apply pa with x0; auto with algebra.
Qed.
Hint Resolve add_minus: algebra.
Inductive cardinal : part_set E -> nat -> Prop :=
| cardinal_empty : forall A : part_set E, Equal A (empty E) -> cardinal A 0
| cardinal_add :
forall (A B : part_set E) (n : nat),
cardinal B n ->
forall x : E,
~ in_part x B -> Equal A (add_part B x) -> cardinal A (S n).
Hint Immediate cardinal_empty: algebra.
Lemma cardinal_comp :
forall (A B : part_set E) (n m : nat),
Equal A B -> n = m -> cardinal A n -> cardinal B m.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (n m : nat) (_ : @Equal (part_set E) A B) (_ : @eq nat n m) (_ : cardinal A n), cardinal B m *)
intros.
(* Goal: cardinal B m *)
inversion H1.
(* Goal: cardinal B m *)
(* Goal: cardinal B m *)
rewrite <- H0.
(* Goal: cardinal B m *)
(* Goal: cardinal B n *)
rewrite <- H4.
(* Goal: cardinal B m *)
(* Goal: cardinal B O *)
apply cardinal_empty.
(* Goal: cardinal B m *)
(* Goal: @Equal (part_set E) B (empty E) *)
apply Trans with A; auto with algebra.
(* Goal: cardinal B m *)
rewrite <- H0.
(* Goal: cardinal B n *)
rewrite <- H6.
(* Goal: cardinal B (S n0) *)
apply cardinal_add with B0 x; auto with algebra.
(* Goal: @Equal (part_set E) B (add_part B0 x) *)
apply Trans with A; auto with algebra.
Qed.
Hint Resolve cardinal_comp: algebra.
Lemma cardinal_comp_l :
forall (A B : part_set E) (n : nat),
Equal A B -> cardinal A n -> cardinal B n.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (n : nat) (_ : @Equal (part_set E) A B) (_ : cardinal A n), cardinal B n *)
intros.
(* Goal: cardinal B n *)
apply cardinal_comp with A n; auto with algebra.
Qed.
Lemma cardinal_comp_r :
forall (A : part_set E) (n m : nat), n = m -> cardinal A n -> cardinal A m.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (n m : nat) (_ : @eq nat n m) (_ : cardinal A n), cardinal A m *)
intros.
(* Goal: cardinal A m *)
apply cardinal_comp with A n; auto with algebra.
Qed.
Lemma cardinal_empty_O : cardinal (empty E) 0.
Proof.
(* Goal: cardinal (empty E) O *)
auto with algebra.
Qed.
Hint Resolve cardinal_empty_O: algebra.
Lemma cardinal_single : forall x : E, cardinal (single x) 1.
Proof.
(* Goal: forall x : Carrier E, cardinal (@single E x) (S O) *)
intro.
(* Goal: cardinal (@single E x) (S O) *)
apply cardinal_add with (empty E) x; auto with algebra.
Qed.
Hint Resolve cardinal_single: algebra.
Lemma cardinal_pair :
forall x y : E, ~ Equal x y -> cardinal (union (single x) (single y)) 2.
Proof.
(* Goal: forall (x y : Carrier E) (_ : not (@Equal E x y)), cardinal (@union E (@single E x) (@single E y)) (S (S O)) *)
intros.
(* Goal: cardinal (@union E (@single E x) (@single E y)) (S (S O)) *)
apply cardinal_add with (single x) y; auto with algebra.
Qed.
Hint Resolve cardinal_pair: algebra.
Lemma cardinal_O_empty :
forall A : part_set E, cardinal A 0 -> Equal A (empty E).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (_ : cardinal A O), @Equal (part_set E) A (empty E) *)
intros.
(* Goal: @Equal (part_set E) A (empty E) *)
inversion H.
(* Goal: @Equal (part_set E) A (empty E) *)
auto with algebra.
Qed.
Hint Resolve cardinal_O_empty: algebra.
Lemma cardinal_1_single :
forall A : part_set E, cardinal A 1 -> exists x : E, Equal A (single x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (_ : cardinal A (S O)), @ex (Carrier E) (fun x : Carrier E => @Equal (part_set E) A (@single E x)) *)
intros.
(* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal (part_set E) A (@single E x)) *)
inversion H.
(* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal (part_set E) A (@single E x)) *)
exists x.
(* Goal: @Equal (part_set E) A (@single E x) *)
apply Trans with (add_part B x); auto with algebra.
(* Goal: @Equal (part_set E) (add_part B x) (@single E x) *)
apply Trans with (add_part (empty E) x); auto with algebra.
Qed.
Lemma not_in_empty :
forall A : part_set E, (forall x : E, ~ in_part x A) -> Equal A (empty E).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (_ : forall x : Carrier E, not (@in_part E x A)), @Equal (part_set E) A (empty E) *)
intros A.
(* Goal: forall _ : forall x : Carrier E, not (@in_part E x A), @Equal (part_set E) A (empty E) *)
case A.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (Pred_compatible_prf : @pred_compatible E Pred_fun) (_ : forall x : Carrier E, not (@in_part E x (@Build_Predicate E Pred_fun Pred_compatible_prf))), @Equal (part_set E) (@Build_Predicate E Pred_fun Pred_compatible_prf) (empty E) *)
intros a pa.
(* Goal: forall _ : forall x : Carrier E, not (@in_part E x (@Build_Predicate E a pa)), @Equal (part_set E) (@Build_Predicate E a pa) (empty E) *)
simpl in |- *.
(* Goal: forall _ : forall x : Carrier E, not (a x), @eq_part E (@Build_Predicate E a pa) (empty E) *)
unfold eq_part, empty in |- *; simpl in |- *.
(* Goal: forall (_ : forall x : Carrier E, not (a x)) (x : Carrier E), and (forall _ : a x, False) (forall _ : False, a x) *)
intuition eauto.
Qed.
Hint Immediate not_in_empty: algebra.
Lemma not_in_part_trans :
forall (x : E) (A B : part_set E),
~ in_part x A -> Equal A B -> ~ in_part x B.
Proof.
(* Goal: forall (x : Carrier E) (A B : Carrier (part_set E)) (_ : not (@in_part E x A)) (_ : @Equal (part_set E) A B), not (@in_part E x B) *)
unfold in_part in |- *.
(* Goal: forall (x : Carrier E) (A B : Carrier (part_set E)) (_ : not (@Pred_fun E A x)) (_ : @Equal (part_set E) A B), not (@Pred_fun E B x) *)
intros x A B.
(* Goal: forall (_ : not (@Pred_fun E A x)) (_ : @Equal (part_set E) A B), not (@Pred_fun E B x) *)
case A; case B; simpl in |- *.
(* Goal: forall (Pred_fun : forall _ : Carrier E, Prop) (Pred_compatible_prf : @pred_compatible E Pred_fun) (Pred_fun0 : forall _ : Carrier E, Prop) (Pred_compatible_prf0 : @pred_compatible E Pred_fun0) (_ : not (Pred_fun0 x)) (_ : @eq_part E (@Build_Predicate E Pred_fun0 Pred_compatible_prf0) (@Build_Predicate E Pred_fun Pred_compatible_prf)), not (Pred_fun x) *)
intros a pa b pb.
(* Goal: forall (_ : not (b x)) (_ : @eq_part E (@Build_Predicate E b pb) (@Build_Predicate E a pa)), not (a x) *)
unfold eq_part in |- *; simpl in |- *.
(* Goal: forall (_ : not (b x)) (_ : forall x : Carrier E, and (forall _ : b x, a x) (forall _ : a x, b x)), not (a x) *)
intuition.
(* Goal: False *)
elim (H0 x); auto with algebra.
Qed.
Lemma not_in_part_trans_eq :
forall (x y : E) (A : part_set E),
~ in_part x A -> Equal x y -> ~ in_part y A.
Proof.
(* Goal: forall (x y : Carrier E) (A : Carrier (part_set E)) (_ : not (@in_part E x A)) (_ : @Equal E x y), not (@in_part E y A) *)
unfold in_part in |- *.
(* Goal: forall (x y : Carrier E) (A : Carrier (part_set E)) (_ : not (@Pred_fun E A x)) (_ : @Equal E x y), not (@Pred_fun E A y) *)
intros x y A.
(* Goal: forall (_ : not (@Pred_fun E A x)) (_ : @Equal E x y), not (@Pred_fun E A y) *)
case A; intros a pa.
(* Goal: forall (_ : not (@Pred_fun E (@Build_Predicate E a pa) x)) (_ : @Equal E x y), not (@Pred_fun E (@Build_Predicate E a pa) y) *)
simpl in |- *.
(* Goal: forall (_ : not (a x)) (_ : @Equal E x y), not (a y) *)
intuition.
(* Goal: False *)
apply H.
(* Goal: a x *)
apply (pa y x); auto with algebra.
Qed.
Lemma cardinal_sup3 :
forall (A B C : part_set E) (x y : E),
Equal A (add_part B x) ->
Equal A (add_part C y) ->
~ in_part x B ->
~ in_part y C ->
~ Equal x y ->
exists D : part_set E,
Equal B (add_part D y) /\
Equal C (add_part D x) /\ ~ in_part x D /\ ~ in_part y D.
Proof.
(* Goal: forall (A B C : Carrier (part_set E)) (x y : Carrier E) (_ : @Equal (part_set E) A (add_part B x)) (_ : @Equal (part_set E) A (add_part C y)) (_ : not (@in_part E x B)) (_ : not (@in_part E y C)) (_ : not (@Equal E x y)), @ex (Carrier (part_set E)) (fun D : Carrier (part_set E) => and (@Equal (part_set E) B (add_part D y)) (and (@Equal (part_set E) C (add_part D x)) (and (not (@in_part E x D)) (not (@in_part E y D))))) *)
intros.
(* Goal: @ex (Carrier (part_set E)) (fun D : Carrier (part_set E) => and (@Equal (part_set E) B (add_part D y)) (and (@Equal (part_set E) C (add_part D x)) (and (not (@in_part E x D)) (not (@in_part E y D))))) *)
exists (minus_part B y).
(* Goal: and (@Equal (part_set E) B (add_part (minus_part B y) y)) (and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))))) *)
split.
(* Goal: and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y)))) *)
(* Goal: @Equal (part_set E) B (add_part (minus_part B y) y) *)
apply Sym.
(* Goal: and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y)))) *)
(* Goal: @Equal (part_set E) (add_part (minus_part B y) y) B *)
apply minus_add.
(* Goal: and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y)))) *)
(* Goal: @in_part E y B *)
cut (in_part y (add_part B x)).
(* Goal: and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y)))) *)
(* Goal: @in_part E y (add_part B x) *)
(* Goal: forall _ : @in_part E y (add_part B x), @in_part E y B *)
intros.
(* Goal: and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y)))) *)
(* Goal: @in_part E y (add_part B x) *)
(* Goal: @in_part E y B *)
apply add_part_in_el_diff with x; auto with algebra.
(* Goal: and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y)))) *)
(* Goal: @in_part E y (add_part B x) *)
apply in_part_comp_r with A; auto with algebra.
(* Goal: and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y)))) *)
(* Goal: @in_part E y A *)
apply in_part_comp_r with (add_part C y); auto with algebra.
(* Goal: and (@Equal (part_set E) C (add_part (minus_part B y) x)) (and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y)))) *)
split.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) C (add_part (minus_part B y) x) *)
apply add_part_simpl with y; auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part C y) (add_part (add_part (minus_part B y) x) y) *)
(* Goal: not (@in_part E y (add_part (minus_part B y) x)) *)
unfold not in |- *; intro.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part C y) (add_part (add_part (minus_part B y) x) y) *)
(* Goal: False *)
absurd (Equal y x); auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part C y) (add_part (add_part (minus_part B y) x) y) *)
(* Goal: @Equal E y x *)
apply add_part_in_el_not_in with (minus_part B y); auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part C y) (add_part (add_part (minus_part B y) x) y) *)
apply Trans with (add_part (add_part (minus_part B y) y) x); auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part C y) (add_part (add_part (minus_part B y) y) x) *)
apply Trans with (add_part B x); auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part B x) (add_part (add_part (minus_part B y) y) x) *)
(* Goal: @Equal (part_set E) (add_part C y) (add_part B x) *)
apply Trans with A; auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part B x) (add_part (add_part (minus_part B y) y) x) *)
apply add_part_comp; auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) B (add_part (minus_part B y) y) *)
apply Sym.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part (minus_part B y) y) B *)
apply minus_add; auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @in_part E y B *)
apply add_part_in_el_diff with x; auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @in_part E y (add_part B x) *)
apply in_part_comp_r with (add_part C y); auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
(* Goal: @Equal (part_set E) (add_part C y) (add_part B x) *)
apply Trans with A; auto with algebra.
(* Goal: and (not (@in_part E x (minus_part B y))) (not (@in_part E y (minus_part B y))) *)
split.
(* Goal: not (@in_part E y (minus_part B y)) *)
(* Goal: not (@in_part E x (minus_part B y)) *)
apply minus_trans_not_in; auto with algebra.
(* Goal: not (@in_part E y (minus_part B y)) *)
auto with algebra.
Qed.
Lemma cardinal_ind2 :
forall P : forall (n : nat) (A : part_set E), cardinal A n -> Prop,
(forall (A : part_set E) (c : cardinal A 0), P 0 A c) ->
(forall n : nat,
(forall (B : part_set E) (c : cardinal B n), P n B c) ->
forall (A B : part_set E) (x : E),
~ in_part x B ->
Equal A (add_part B x) -> forall c' : cardinal A (S n), P (S n) A c') ->
forall (n : nat) (A : part_set E) (c : cardinal A n), P n A c.
Proof.
(* Goal: forall (P : forall (n : nat) (A : Carrier (part_set E)) (_ : cardinal A n), Prop) (_ : forall (A : Carrier (part_set E)) (c : cardinal A O), P O A c) (_ : forall (n : nat) (_ : forall (B : Carrier (part_set E)) (c : cardinal B n), P n B c) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (c' : cardinal A (S n)), P (S n) A c') (n : nat) (A : Carrier (part_set E)) (c : cardinal A n), P n A c *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (A : Carrier (part_set E)) (c : cardinal A n), P n A c) (A : Carrier (part_set E)) (c : cardinal A (S n)), P (S n) A c *)
(* Goal: forall (A : Carrier (part_set E)) (c : cardinal A O), P O A c *)
auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A : Carrier (part_set E)) (c : cardinal A n), P n A c) (A : Carrier (part_set E)) (c : cardinal A (S n)), P (S n) A c *)
intros.
(* Goal: P (S n0) A c *)
inversion c.
(* Goal: P (S n0) A c *)
apply (H0 n0 H1 A B x H4 H6 c).
Qed.
Lemma cardinal_S :
forall (n : nat) (A B : part_set E) (x : E),
~ in_part x B -> Equal A (add_part B x) -> cardinal A (S n) -> cardinal B n.
Proof.
(* Goal: forall (n : nat) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S O)), cardinal B O *)
intros.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: cardinal B O *)
apply cardinal_empty.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
inversion H1.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
elim (classic (Equal x0 x)); intros.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
(* Goal: @Equal (part_set E) B (empty E) *)
apply Trans with B0.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
(* Goal: @Equal (part_set E) B0 (empty E) *)
(* Goal: @Equal (part_set E) B B0 *)
apply add_part_simpl with x; auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
(* Goal: @Equal (part_set E) B0 (empty E) *)
(* Goal: @Equal (part_set E) (add_part B x) (add_part B0 x) *)
(* Goal: not (@in_part E x B0) *)
apply not_in_part_trans_eq with x0; auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
(* Goal: @Equal (part_set E) B0 (empty E) *)
(* Goal: @Equal (part_set E) (add_part B x) (add_part B0 x) *)
apply Trans with A; auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
(* Goal: @Equal (part_set E) B0 (empty E) *)
(* Goal: @Equal (part_set E) A (add_part B0 x) *)
apply Trans with (add_part B0 x0); auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
(* Goal: @Equal (part_set E) B0 (empty E) *)
auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) B (empty E) *)
absurd (in_part x (single x0)).
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @in_part E x (@single E x0) *)
(* Goal: not (@in_part E x (@single E x0)) *)
intuition.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @in_part E x (@single E x0) *)
apply in_part_comp_r with (add_part B0 x0); auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) (add_part B0 x0) (@single E x0) *)
(* Goal: @in_part E x (add_part B0 x0) *)
apply in_part_comp_r with A; auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) (add_part B0 x0) (@single E x0) *)
(* Goal: @in_part E x A *)
apply in_part_comp_r with (add_part B x); auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
(* Goal: @Equal (part_set E) (add_part B0 x0) (@single E x0) *)
apply Trans with (add_part (empty E) x0); auto with algebra.
(* Goal: forall (n : nat) (_ : forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)), cardinal B n) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S (S n))), cardinal B (S n) *)
intros.
(* Goal: cardinal B (S n0) *)
inversion H2.
(* Goal: cardinal B (S n0) *)
elim (classic (Equal x x0)); intros.
(* Goal: cardinal B (S n0) *)
(* Goal: cardinal B (S n0) *)
apply cardinal_comp_l with B0; auto with algebra.
(* Goal: cardinal B (S n0) *)
(* Goal: @Equal (part_set E) B0 B *)
apply add_part_simpl with x; auto with algebra.
(* Goal: cardinal B (S n0) *)
(* Goal: @Equal (part_set E) (add_part B0 x) (add_part B x) *)
(* Goal: not (@in_part E x B0) *)
apply not_in_part_trans_eq with x0; auto with algebra.
(* Goal: cardinal B (S n0) *)
(* Goal: @Equal (part_set E) (add_part B0 x) (add_part B x) *)
apply Trans with A; auto with algebra.
(* Goal: cardinal B (S n0) *)
(* Goal: @Equal (part_set E) (add_part B0 x) A *)
apply Trans with (add_part B0 x0); auto with algebra.
(* Goal: cardinal B (S n0) *)
elim (cardinal_sup3 (A:=A) (B:=B) (C:=B0) (x:=x) (y:=x0)); auto with algebra.
(* Goal: forall (x1 : Carrier (part_set E)) (_ : and (@Equal (part_set E) B (add_part x1 x0)) (and (@Equal (part_set E) B0 (add_part x1 x)) (and (not (@in_part E x x1)) (not (@in_part E x0 x1))))), cardinal B (S n0) *)
intros C H9.
(* Goal: cardinal B (S n0) *)
elim H9; clear H9; intros.
(* Goal: cardinal B (S n0) *)
elim H10; clear H10; intros.
(* Goal: cardinal B (S n0) *)
elim H11; clear H11; intros.
(* Goal: cardinal B (S n0) *)
apply cardinal_add with C x0; auto with algebra.
(* Goal: cardinal C n0 *)
apply H with B0 x; auto with algebra.
Qed.
Lemma cardinalO_unique :
forall A : part_set E, cardinal A 0 -> forall m : nat, cardinal A m -> 0 = m.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (_ : cardinal A O) (m : nat) (_ : cardinal A m), @eq nat O m *)
intros.
(* Goal: @eq nat O m *)
inversion H0; auto with algebra.
(* Goal: @eq nat O (S n) *)
absurd (in_part x (empty E)); auto with algebra.
(* Goal: @in_part E x (empty E) *)
apply in_part_comp_r with A; auto with algebra.
(* Goal: @in_part E x A *)
apply in_part_comp_r with (add_part B x); auto with algebra.
Qed.
Lemma cardinal_unique :
forall (n : nat) (A : part_set E),
cardinal A n -> forall m : nat, cardinal A m -> n = m.
Proof.
(* Goal: forall (n : nat) (A : Carrier (part_set E)) (_ : cardinal A n) (m : nat) (_ : cardinal A m), @eq nat n m *)
intros n A c.
(* Goal: forall (m : nat) (_ : cardinal A m), @eq nat n m *)
apply cardinal_ind2 with (P := fun (n : nat) (A : part_set E) (c : cardinal A n) => forall m : nat, cardinal A m -> n = m); auto with algebra.
(* Goal: forall (n : nat) (_ : forall (B : Carrier (part_set E)) (_ : cardinal B n) (m : nat) (_ : cardinal B m), @eq nat n m) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)) (m : nat) (_ : cardinal A m), @eq nat (S n) m *)
(* Goal: forall (A : Carrier (part_set E)) (_ : cardinal A O) (m : nat) (_ : cardinal A m), @eq nat O m *)
exact cardinalO_unique.
(* Goal: forall (n : nat) (_ : forall (B : Carrier (part_set E)) (_ : cardinal B n) (m : nat) (_ : cardinal B m), @eq nat n m) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)) (_ : @Equal (part_set E) A (add_part B x)) (_ : cardinal A (S n)) (m : nat) (_ : cardinal A m), @eq nat (S n) m *)
intros n0 H A0 B x H0 H1 c' m.
(* Goal: forall _ : cardinal A0 m, @eq nat (S n0) m *)
case m; intros.
(* Goal: @eq nat (S n0) (S n1) *)
(* Goal: @eq nat (S n0) O *)
absurd (in_part x (empty E)); auto with algebra.
(* Goal: @eq nat (S n0) (S n1) *)
(* Goal: @in_part E x (empty E) *)
apply in_part_comp_r with A0; auto with algebra.
(* Goal: @eq nat (S n0) (S n1) *)
(* Goal: @in_part E x A0 *)
apply in_part_comp_r with (add_part B x); auto with algebra.
(* Goal: @eq nat (S n0) (S n1) *)
cut (cardinal B n0).
(* Goal: cardinal B n0 *)
(* Goal: forall _ : cardinal B n0, @eq nat (S n0) (S n1) *)
cut (cardinal B n1).
(* Goal: cardinal B n0 *)
(* Goal: cardinal B n1 *)
(* Goal: forall (_ : cardinal B n1) (_ : cardinal B n0), @eq nat (S n0) (S n1) *)
intros.
(* Goal: cardinal B n0 *)
(* Goal: cardinal B n1 *)
(* Goal: @eq nat (S n0) (S n1) *)
cut (n0 = n1).
(* Goal: cardinal B n0 *)
(* Goal: cardinal B n1 *)
(* Goal: @eq nat n0 n1 *)
(* Goal: forall _ : @eq nat n0 n1, @eq nat (S n0) (S n1) *)
auto with algebra.
(* Goal: cardinal B n0 *)
(* Goal: cardinal B n1 *)
(* Goal: @eq nat n0 n1 *)
apply H with B; auto with algebra.
(* Goal: cardinal B n0 *)
(* Goal: cardinal B n1 *)
apply cardinal_S with A0 x; auto with algebra.
(* Goal: cardinal B n0 *)
apply cardinal_S with A0 x; auto with algebra.
Qed.
End fparts_in_def.
Hint Resolve single_law add_part_comp add_part_in add_in minus_part_comp
minus_part_not_in minus_not_in minus_trans_not_in union_unit_l single_add
minus_add add_minus cardinal_comp cardinal_empty_O cardinal_single
cardinal_pair cardinal_O_empty: algebra.
Hint Immediate single_prop: algebra.
Hint Immediate single_prop_rev: algebra.
Hint Immediate add_part_com: algebra.
Hint Immediate minus_part_com: algebra.
Hint Immediate cardinal_empty: algebra.
Hint Immediate not_in_empty: algebra.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import eqtype choice ssreflect ssrbool ssrnat ssrfun seq.
From mathcomp
Require Import ssralg generic_quotient.
Import GRing.Theory.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Local Open Scope ring_scope.
Local Open Scope quotient_scope.
Reserved Notation "{ideal_quot I }" (at level 0, format "{ideal_quot I }").
Reserved Notation "m = n %[mod_ideal I ]" (at level 70, n at next level,
format "'[hv ' m '/' = n '/' %[mod_ideal I ] ']'").
Reserved Notation "m == n %[mod_ideal I ]" (at level 70, n at next level,
format "'[hv ' m '/' == n '/' %[mod_ideal I ] ']'").
Reserved Notation "m <> n %[mod_ideal I ]" (at level 70, n at next level,
format "'[hv ' m '/' <> n '/' %[mod_ideal I ] ']'").
Reserved Notation "m != n %[mod_ideal I ]" (at level 70, n at next level,
format "'[hv ' m '/' != n '/' %[mod_ideal I ] ']'").
Section ZmodQuot.
Variable (T : Type).
Variable eqT : rel T.
Variables (zeroT : T) (oppT : T -> T) (addT : T -> T -> T).
Record zmod_quot_mixin_of (Q : Type) (qc : quot_class_of T Q)
(zc : GRing.Zmodule.class_of Q) := ZmodQuotMixinPack {
zmod_eq_quot_mixin :> eq_quot_mixin_of eqT qc zc;
_ : \pi_(QuotTypePack qc) zeroT = 0 :> GRing.Zmodule.Pack zc;
_ : {morph \pi_(QuotTypePack qc) : x /
oppT x >-> @GRing.opp (GRing.Zmodule.Pack zc) x};
_ : {morph \pi_(QuotTypePack qc) : x y /
addT x y >-> @GRing.add (GRing.Zmodule.Pack zc) x y}
}.
Record zmod_quot_class_of (Q : Type) : Type := ZmodQuotClass {
zmod_quot_quot_class :> quot_class_of T Q;
zmod_quot_zmod_class :> GRing.Zmodule.class_of Q;
zmod_quot_mixin :> zmod_quot_mixin_of
zmod_quot_quot_class zmod_quot_zmod_class
}.
Structure zmodQuotType : Type := ZmodQuotTypePack {
zmod_quot_sort :> Type;
_ : zmod_quot_class_of zmod_quot_sort;
}.
Implicit Type zqT : zmodQuotType.
Definition zmod_quot_class zqT : zmod_quot_class_of zqT :=
let: ZmodQuotTypePack _ cT as qT' := zqT return zmod_quot_class_of qT' in cT.
Definition zmod_eq_quot_class zqT (zqc : zmod_quot_class_of zqT) :
eq_quot_class_of eqT zqT := EqQuotClass zqc.
Canonical zmodQuotType_eqType zqT := Equality.Pack (zmod_quot_class zqT).
Canonical zmodQuotType_choiceType zqT :=
Choice.Pack (zmod_quot_class zqT).
Canonical zmodQuotType_zmodType zqT :=
GRing.Zmodule.Pack (zmod_quot_class zqT).
Canonical zmodQuotType_quotType zqT := QuotTypePack (zmod_quot_class zqT).
Canonical zmodQuotType_eqQuotType zqT := EqQuotTypePack
(zmod_eq_quot_class (zmod_quot_class zqT)).
Coercion zmodQuotType_eqType : zmodQuotType >-> eqType.
Coercion zmodQuotType_choiceType : zmodQuotType >-> choiceType.
Coercion zmodQuotType_zmodType : zmodQuotType >-> zmodType.
Coercion zmodQuotType_quotType : zmodQuotType >-> quotType.
Coercion zmodQuotType_eqQuotType : zmodQuotType >-> eqQuotType.
Definition ZmodQuotType_pack Q :=
fun (qT : quotType T) (zT : zmodType) qc zc
of phant_id (quot_class qT) qc & phant_id (GRing.Zmodule.class zT) zc =>
fun m => ZmodQuotTypePack (@ZmodQuotClass Q qc zc m).
Definition ZmodQuotMixin_pack Q :=
fun (qT : eqQuotType eqT) (qc : eq_quot_class_of eqT Q)
of phant_id (eq_quot_class qT) qc =>
fun (zT : zmodType) zc of phant_id (GRing.Zmodule.class zT) zc =>
fun e m0 mN mD => @ZmodQuotMixinPack Q qc zc e m0 mN mD.
Definition ZmodQuotType_clone (Q : Type) qT cT
of phant_id (zmod_quot_class qT) cT := @ZmodQuotTypePack Q cT.
Lemma zmod_quot_mixinP zqT :
zmod_quot_mixin_of (zmod_quot_class zqT) (zmod_quot_class zqT).
Proof.
(* Goal: @zmod_quot_mixin_of (zmod_quot_sort zqT) (@zmod_quot_quot_class (zmod_quot_sort zqT) (zmod_quot_class zqT)) (@zmod_quot_zmod_class (zmod_quot_sort zqT) (zmod_quot_class zqT)) *)
by case: zqT => [] ? [] ? ? [].
Qed.
Lemma pi_zeror zqT : \pi_zqT zeroT = 0.
Proof.
(* Goal: @eq (@quot_sort T (zmodQuotType_quotType zqT)) (@Pi.f T (zmodQuotType_quotType zqT) (Phant (zmod_quot_sort zqT)) zeroT) (GRing.zero (zmodQuotType_zmodType zqT)) *)
by case: zqT => [] ? [] ? ? [].
Qed.
Lemma pi_oppr zqT : {morph \pi_zqT : x / oppT x >-> - x}.
Proof.
(* Goal: @morphism_1 T (@quot_sort T (zmodQuotType_quotType zqT)) (@Pi.f T (zmodQuotType_quotType zqT) (Phant (zmod_quot_sort zqT))) (fun x : T => oppT x) (fun x : @quot_sort T (zmodQuotType_quotType zqT) => @GRing.opp (zmodQuotType_zmodType zqT) x) *)
by case: zqT => [] ? [] ? ? [].
Qed.
Lemma pi_addr zqT : {morph \pi_zqT : x y / addT x y >-> x + y}.
Proof.
(* Goal: @morphism_2 T (@quot_sort T (zmodQuotType_quotType zqT)) (@Pi.f T (zmodQuotType_quotType zqT) (Phant (zmod_quot_sort zqT))) (fun x y : T => addT x y) (fun x y : @quot_sort T (zmodQuotType_quotType zqT) => @GRing.add (zmodQuotType_zmodType zqT) x y) *)
by case: zqT => [] ? [] ? ? [].
Qed.
Canonical pi_zero_quot_morph zqT := PiMorph (pi_zeror zqT).
Canonical pi_opp_quot_morph zqT := PiMorph1 (pi_oppr zqT).
Canonical pi_add_quot_morph zqT := PiMorph2 (pi_addr zqT).
End ZmodQuot.
Notation ZmodQuotType z o a Q m :=
(@ZmodQuotType_pack _ _ z o a Q _ _ _ _ id id m).
Notation "[ 'zmodQuotType' z , o & a 'of' Q ]" :=
(@ZmodQuotType_clone _ _ z o a Q _ _ id)
(at level 0, format "[ 'zmodQuotType' z , o & a 'of' Q ]") : form_scope.
Notation ZmodQuotMixin Q m0 mN mD :=
(@ZmodQuotMixin_pack _ _ _ _ _ Q _ _ id _ _ id (pi_eq_quot _) m0 mN mD).
Section PiAdditive.
Variables (V : zmodType) (equivV : rel V) (zeroV : V).
Variable Q : @zmodQuotType V equivV zeroV -%R +%R.
Lemma pi_is_additive : additive \pi_Q.
Proof.
(* Goal: @GRing.Additive.axiom V (@zmodQuotType_zmodType (GRing.Zmodule.sort V) equivV zeroV (@GRing.opp V) (@GRing.add V) Q) (@Pi.f (GRing.Zmodule.sort V) (@zmodQuotType_quotType (GRing.Zmodule.sort V) equivV zeroV (@GRing.opp V) (@GRing.add V) Q) (Phant (@zmod_quot_sort (GRing.Zmodule.sort V) equivV zeroV (@GRing.opp V) (@GRing.add V) Q))) *)
by move=> x y /=; rewrite !piE.
Qed.
Canonical pi_additive := Additive pi_is_additive.
End PiAdditive.
Section RingQuot.
Variable (T : Type).
Variable eqT : rel T.
Variables (zeroT : T) (oppT : T -> T) (addT : T -> T -> T).
Variables (oneT : T) (mulT : T -> T -> T).
Record ring_quot_mixin_of (Q : Type) (qc : quot_class_of T Q)
(rc : GRing.Ring.class_of Q) := RingQuotMixinPack {
ring_zmod_quot_mixin :> zmod_quot_mixin_of eqT zeroT oppT addT qc rc;
_ : \pi_(QuotTypePack qc) oneT = 1 :> GRing.Ring.Pack rc;
_ : {morph \pi_(QuotTypePack qc) : x y /
mulT x y >-> @GRing.mul (GRing.Ring.Pack rc) x y}
}.
Record ring_quot_class_of (Q : Type) : Type := RingQuotClass {
ring_quot_quot_class :> quot_class_of T Q;
ring_quot_ring_class :> GRing.Ring.class_of Q;
ring_quot_mixin :> ring_quot_mixin_of
ring_quot_quot_class ring_quot_ring_class
}.
Structure ringQuotType : Type := RingQuotTypePack {
ring_quot_sort :> Type;
_ : ring_quot_class_of ring_quot_sort;
}.
Implicit Type rqT : ringQuotType.
Definition ring_quot_class rqT : ring_quot_class_of rqT :=
let: RingQuotTypePack _ cT as qT' := rqT return ring_quot_class_of qT' in cT.
Definition ring_zmod_quot_class rqT (rqc : ring_quot_class_of rqT) :
zmod_quot_class_of eqT zeroT oppT addT rqT := ZmodQuotClass rqc.
Definition ring_eq_quot_class rqT (rqc : ring_quot_class_of rqT) :
eq_quot_class_of eqT rqT := EqQuotClass rqc.
Canonical ringQuotType_eqType rqT := Equality.Pack (ring_quot_class rqT).
Canonical ringQuotType_choiceType rqT := Choice.Pack (ring_quot_class rqT).
Canonical ringQuotType_zmodType rqT :=
GRing.Zmodule.Pack (ring_quot_class rqT).
Canonical ringQuotType_ringType rqT :=
GRing.Ring.Pack (ring_quot_class rqT).
Canonical ringQuotType_quotType rqT := QuotTypePack (ring_quot_class rqT).
Canonical ringQuotType_eqQuotType rqT :=
EqQuotTypePack (ring_eq_quot_class (ring_quot_class rqT)).
Canonical ringQuotType_zmodQuotType rqT :=
ZmodQuotTypePack (ring_zmod_quot_class (ring_quot_class rqT)).
Coercion ringQuotType_eqType : ringQuotType >-> eqType.
Coercion ringQuotType_choiceType : ringQuotType >-> choiceType.
Coercion ringQuotType_zmodType : ringQuotType >-> zmodType.
Coercion ringQuotType_ringType : ringQuotType >-> ringType.
Coercion ringQuotType_quotType : ringQuotType >-> quotType.
Coercion ringQuotType_eqQuotType : ringQuotType >-> eqQuotType.
Coercion ringQuotType_zmodQuotType : ringQuotType >-> zmodQuotType.
Definition RingQuotType_pack Q :=
fun (qT : quotType T) (zT : ringType) qc rc
of phant_id (quot_class qT) qc & phant_id (GRing.Ring.class zT) rc =>
fun m => RingQuotTypePack (@RingQuotClass Q qc rc m).
Definition RingQuotMixin_pack Q :=
fun (qT : zmodQuotType eqT zeroT oppT addT) =>
fun (qc : zmod_quot_class_of eqT zeroT oppT addT Q)
of phant_id (zmod_quot_class qT) qc =>
fun (rT : ringType) rc of phant_id (GRing.Ring.class rT) rc =>
fun mZ m1 mM => @RingQuotMixinPack Q qc rc mZ m1 mM.
Definition RingQuotType_clone (Q : Type) qT cT
of phant_id (ring_quot_class qT) cT := @RingQuotTypePack Q cT.
Lemma ring_quot_mixinP rqT :
ring_quot_mixin_of (ring_quot_class rqT) (ring_quot_class rqT).
Proof.
(* Goal: @ring_quot_mixin_of (ring_quot_sort rqT) (@ring_quot_quot_class (ring_quot_sort rqT) (ring_quot_class rqT)) (@ring_quot_ring_class (ring_quot_sort rqT) (ring_quot_class rqT)) *)
by case: rqT => [] ? [] ? ? [].
Qed.
Lemma pi_oner rqT : \pi_rqT oneT = 1.
Proof.
(* Goal: @eq (@quot_sort T (ringQuotType_quotType rqT)) (@Pi.f T (ringQuotType_quotType rqT) (Phant (ring_quot_sort rqT)) oneT) (GRing.one (ringQuotType_ringType rqT)) *)
by case: rqT => [] ? [] ? ? [].
Qed.
Lemma pi_mulr rqT : {morph \pi_rqT : x y / mulT x y >-> x * y}.
Proof.
(* Goal: @morphism_2 T (@quot_sort T (ringQuotType_quotType rqT)) (@Pi.f T (ringQuotType_quotType rqT) (Phant (ring_quot_sort rqT))) (fun x y : T => mulT x y) (fun x y : @quot_sort T (ringQuotType_quotType rqT) => @GRing.mul (ringQuotType_ringType rqT) x y) *)
by case: rqT => [] ? [] ? ? [].
Qed.
Canonical pi_one_quot_morph rqT := PiMorph (pi_oner rqT).
Canonical pi_mul_quot_morph rqT := PiMorph2 (pi_mulr rqT).
End RingQuot.
Notation RingQuotType o mul Q mix :=
(@RingQuotType_pack _ _ _ _ _ o mul Q _ _ _ _ id id mix).
Notation "[ 'ringQuotType' o & m 'of' Q ]" :=
(@RingQuotType_clone _ _ _ _ _ o m Q _ _ id)
(at level 0, format "[ 'ringQuotType' o & m 'of' Q ]") : form_scope.
Notation RingQuotMixin Q m1 mM :=
(@RingQuotMixin_pack _ _ _ _ _ _ _ Q _ _ id _ _ id (zmod_quot_mixinP _) m1 mM).
Section PiRMorphism.
Variables (R : ringType) (equivR : rel R) (zeroR : R).
Variable Q : @ringQuotType R equivR zeroR -%R +%R 1 *%R.
Lemma pi_is_multiplicative : multiplicative \pi_Q.
Proof.
(* Goal: @GRing.RMorphism.mixin_of R (@ringQuotType_ringType (GRing.Ring.sort R) equivR zeroR (@GRing.opp (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R)) (GRing.one R) (@GRing.mul R) Q) (@Pi.f (GRing.Ring.sort R) (@ringQuotType_quotType (GRing.Ring.sort R) equivR zeroR (@GRing.opp (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R)) (GRing.one R) (@GRing.mul R) Q) (Phant (@ring_quot_sort (GRing.Ring.sort R) equivR zeroR (@GRing.opp (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R)) (GRing.one R) (@GRing.mul R) Q))) *)
by split; do ?move=> x y /=; rewrite !piE.
Qed.
Canonical pi_rmorphism := AddRMorphism pi_is_multiplicative.
End PiRMorphism.
Section UnitRingQuot.
Variable (T : Type).
Variable eqT : rel T.
Variables (zeroT : T) (oppT : T -> T) (addT : T -> T -> T).
Variables (oneT : T) (mulT : T -> T -> T).
Variables (unitT : pred T) (invT : T -> T).
Record unit_ring_quot_mixin_of (Q : Type) (qc : quot_class_of T Q)
(rc : GRing.UnitRing.class_of Q) := UnitRingQuotMixinPack {
unit_ring_zmod_quot_mixin :>
ring_quot_mixin_of eqT zeroT oppT addT oneT mulT qc rc;
_ : {mono \pi_(QuotTypePack qc) : x /
unitT x >-> x \in @GRing.unit (GRing.UnitRing.Pack rc)};
_ : {morph \pi_(QuotTypePack qc) : x /
invT x >-> @GRing.inv (GRing.UnitRing.Pack rc) x}
}.
Record unit_ring_quot_class_of (Q : Type) : Type := UnitRingQuotClass {
unit_ring_quot_quot_class :> quot_class_of T Q;
unit_ring_quot_ring_class :> GRing.UnitRing.class_of Q;
unit_ring_quot_mixin :> unit_ring_quot_mixin_of
unit_ring_quot_quot_class unit_ring_quot_ring_class
}.
Structure unitRingQuotType : Type := UnitRingQuotTypePack {
unit_ring_quot_sort :> Type;
_ : unit_ring_quot_class_of unit_ring_quot_sort;
}.
Implicit Type rqT : unitRingQuotType.
Definition unit_ring_quot_class rqT : unit_ring_quot_class_of rqT :=
let: UnitRingQuotTypePack _ cT as qT' := rqT
return unit_ring_quot_class_of qT' in cT.
Definition unit_ring_ring_quot_class rqT (rqc : unit_ring_quot_class_of rqT) :
ring_quot_class_of eqT zeroT oppT addT oneT mulT rqT := RingQuotClass rqc.
Definition unit_ring_zmod_quot_class rqT (rqc : unit_ring_quot_class_of rqT) :
zmod_quot_class_of eqT zeroT oppT addT rqT := ZmodQuotClass rqc.
Definition unit_ring_eq_quot_class rqT (rqc : unit_ring_quot_class_of rqT) :
eq_quot_class_of eqT rqT := EqQuotClass rqc.
Canonical unitRingQuotType_eqType rqT :=
Equality.Pack (unit_ring_quot_class rqT).
Canonical unitRingQuotType_choiceType rqT :=
Choice.Pack (unit_ring_quot_class rqT).
Canonical unitRingQuotType_zmodType rqT :=
GRing.Zmodule.Pack (unit_ring_quot_class rqT).
Canonical unitRingQuotType_ringType rqT :=
GRing.Ring.Pack (unit_ring_quot_class rqT).
Canonical unitRingQuotType_unitRingType rqT :=
GRing.UnitRing.Pack (unit_ring_quot_class rqT).
Canonical unitRingQuotType_quotType rqT :=
QuotTypePack (unit_ring_quot_class rqT).
Canonical unitRingQuotType_eqQuotType rqT :=
EqQuotTypePack (unit_ring_eq_quot_class (unit_ring_quot_class rqT)).
Canonical unitRingQuotType_zmodQuotType rqT :=
ZmodQuotTypePack (unit_ring_zmod_quot_class (unit_ring_quot_class rqT)).
Canonical unitRingQuotType_ringQuotType rqT :=
RingQuotTypePack (unit_ring_ring_quot_class (unit_ring_quot_class rqT)).
Coercion unitRingQuotType_eqType : unitRingQuotType >-> eqType.
Coercion unitRingQuotType_choiceType : unitRingQuotType >-> choiceType.
Coercion unitRingQuotType_zmodType : unitRingQuotType >-> zmodType.
Coercion unitRingQuotType_ringType : unitRingQuotType >-> ringType.
Coercion unitRingQuotType_unitRingType : unitRingQuotType >-> unitRingType.
Coercion unitRingQuotType_quotType : unitRingQuotType >-> quotType.
Coercion unitRingQuotType_eqQuotType : unitRingQuotType >-> eqQuotType.
Coercion unitRingQuotType_zmodQuotType : unitRingQuotType >-> zmodQuotType.
Coercion unitRingQuotType_ringQuotType : unitRingQuotType >-> ringQuotType.
Definition UnitRingQuotType_pack Q :=
fun (qT : quotType T) (rT : unitRingType) qc rc
of phant_id (quot_class qT) qc & phant_id (GRing.UnitRing.class rT) rc =>
fun m => UnitRingQuotTypePack (@UnitRingQuotClass Q qc rc m).
Definition UnitRingQuotMixin_pack Q :=
fun (qT : ringQuotType eqT zeroT oppT addT oneT mulT) =>
fun (qc : ring_quot_class_of eqT zeroT oppT addT oneT mulT Q)
of phant_id (zmod_quot_class qT) qc =>
fun (rT : unitRingType) rc of phant_id (GRing.UnitRing.class rT) rc =>
fun mR mU mV => @UnitRingQuotMixinPack Q qc rc mR mU mV.
Definition UnitRingQuotType_clone (Q : Type) qT cT
of phant_id (unit_ring_quot_class qT) cT := @UnitRingQuotTypePack Q cT.
Lemma unit_ring_quot_mixinP rqT :
unit_ring_quot_mixin_of (unit_ring_quot_class rqT) (unit_ring_quot_class rqT).
Proof.
(* Goal: @unit_ring_quot_mixin_of (unit_ring_quot_sort rqT) (@unit_ring_quot_quot_class (unit_ring_quot_sort rqT) (unit_ring_quot_class rqT)) (@unit_ring_quot_ring_class (unit_ring_quot_sort rqT) (unit_ring_quot_class rqT)) *)
by case: rqT => [] ? [] ? ? [].
Qed.
Lemma pi_unitr rqT : {mono \pi_rqT : x / unitT x >-> x \in GRing.unit}.
Proof.
(* Goal: @monomorphism_1 T (@quot_sort T (unitRingQuotType_quotType rqT)) bool (@Pi.f T (unitRingQuotType_quotType rqT) (Phant (unit_ring_quot_sort rqT))) (fun x : T => unitT x) (fun x : @quot_sort T (unitRingQuotType_quotType rqT) => @in_mem (@quot_sort T (unitRingQuotType_quotType rqT)) x (@mem (GRing.UnitRing.sort (unitRingQuotType_unitRingType rqT)) (predPredType (GRing.UnitRing.sort (unitRingQuotType_unitRingType rqT))) (@has_quality (S O) (GRing.UnitRing.sort (unitRingQuotType_unitRingType rqT)) (@GRing.unit (unitRingQuotType_unitRingType rqT))))) *)
by case: rqT => [] ? [] ? ? [].
Qed.
Lemma pi_invr rqT : {morph \pi_rqT : x / invT x >-> x^-1}.
Proof.
(* Goal: @morphism_1 T (@quot_sort T (unitRingQuotType_quotType rqT)) (@Pi.f T (unitRingQuotType_quotType rqT) (Phant (unit_ring_quot_sort rqT))) (fun x : T => invT x) (fun x : @quot_sort T (unitRingQuotType_quotType rqT) => @GRing.inv (unitRingQuotType_unitRingType rqT) x) *)
by case: rqT => [] ? [] ? ? [].
Qed.
Canonical pi_unit_quot_morph rqT := PiMono1 (pi_unitr rqT).
Canonical pi_inv_quot_morph rqT := PiMorph1 (pi_invr rqT).
End UnitRingQuot.
Notation UnitRingQuotType u i Q mix :=
(@UnitRingQuotType_pack _ _ _ _ _ _ _ u i Q _ _ _ _ id id mix).
Notation "[ 'unitRingQuotType' u & i 'of' Q ]" :=
(@UnitRingQuotType_clone _ _ _ _ _ _ _ u i Q _ _ id)
(at level 0, format "[ 'unitRingQuotType' u & i 'of' Q ]") : form_scope.
Notation UnitRingQuotMixin Q mU mV :=
(@UnitRingQuotMixin_pack _ _ _ _ _ _ _ _ _ Q
_ _ id _ _ id (zmod_quot_mixinP _) mU mV).
Section IdealDef.
Definition proper_ideal (R : ringType) (S : predPredType R) : Prop :=
1 \notin S /\ forall a, {in S, forall u, a * u \in S}.
Definition prime_idealr_closed (R : ringType) (S : predPredType R) : Prop :=
forall u v, u * v \in S -> (u \in S) || (v \in S).
Definition idealr_closed (R : ringType) (S : predPredType R) :=
[/\ 0 \in S, 1 \notin S & forall a, {in S &, forall u v, a * u + v \in S}].
Lemma idealr_closed_nontrivial R S : @idealr_closed R S -> proper_ideal S.
Proof.
(* Goal: forall _ : @idealr_closed R S, @proper_ideal R S *)
by case=> S0 S1 hS; split => // a x xS; rewrite -[_ * _]addr0 hS.
Qed.
Lemma idealr_closedB R S : @idealr_closed R S -> zmod_closed S.
Proof.
(* Goal: forall _ : @idealr_closed R S, @GRing.zmod_closed (GRing.Ring.zmodType R) S *)
by case=> S0 _ hS; split=> // x y xS yS; rewrite -mulN1r addrC hS.
Qed.
Coercion idealr_closedB : idealr_closed >-> zmod_closed.
Coercion idealr_closed_nontrivial : idealr_closed >-> proper_ideal.
Structure idealr (R : ringType) (S : predPredType R) := MkIdeal {
idealr_zmod :> zmodPred S;
_ : proper_ideal S
}.
Structure prime_idealr (R : ringType) (S : predPredType R) := MkPrimeIdeal {
prime_idealr_zmod :> idealr S;
_ : prime_idealr_closed S
}.
Definition Idealr (R : ringType) (I : predPredType R) (zmodI : zmodPred I)
(kI : keyed_pred zmodI) : proper_ideal I -> idealr I.
Proof.
(* Goal: forall _ : @proper_ideal R I, @idealr R I *)
by move=> kI1; split => //.
Qed.
Section IdealTheory.
Variables (R : ringType) (I : predPredType R)
(idealrI : idealr I) (kI : keyed_pred idealrI).
Lemma idealr1 : 1 \in kI = false.
Proof.
(* Goal: @eq bool (@in_mem (GRing.Ring.sort R) (GRing.one R) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I (@GRing.Pred.opp_key (GRing.Ring.zmodType R) I (@GRing.Pred.zmod_opp (GRing.Ring.zmodType R) I (@idealr_zmod R I idealrI))) kI))) false *)
by apply: negPf; case: idealrI kI => ? /= [? _] [] /= _ ->.
Qed.
Lemma idealMr a u : u \in kI -> a * u \in kI.
Proof.
(* Goal: forall _ : is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) u (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I (@GRing.Pred.opp_key (GRing.Ring.zmodType R) I (@GRing.Pred.zmod_opp (GRing.Ring.zmodType R) I (@idealr_zmod R I idealrI))) kI))), is_true (@in_mem (GRing.Ring.sort R) (@GRing.mul R a u) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I (@GRing.Pred.opp_key (GRing.Ring.zmodType R) I (@GRing.Pred.zmod_opp (GRing.Ring.zmodType R) I (@idealr_zmod R I idealrI))) kI))) *)
by case: idealrI kI=> ? /= [? hI] [] /= ? hkI; rewrite !hkI; apply: hI.
Qed.
End IdealTheory.
Section PrimeIdealTheory.
Variables (R : comRingType) (I : predPredType R)
(pidealrI : prime_idealr I) (kI : keyed_pred pidealrI).
Lemma prime_idealrM u v : (u * v \in kI) = (u \in kI) || (v \in kI).
End PrimeIdealTheory.
End IdealDef.
Module Quotient.
Section ZmodQuotient.
Variables (R : zmodType) (I : predPredType R)
(zmodI : zmodPred I) (kI : keyed_pred zmodI).
Definition equiv (x y : R) := (x - y) \in kI.
Lemma equiv_is_equiv : equiv_class_of equiv.
Proof.
(* Goal: @equiv_class_of (GRing.Zmodule.sort R) equiv *)
split=> [x|x y|y x z]; rewrite !equivE ?subrr ?rpred0 //.
(* Goal: forall (_ : is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R x (@GRing.opp R y)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI)))) (_ : is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R y (@GRing.opp R z)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI)))), is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R x (@GRing.opp R z)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) *)
(* Goal: @eq bool (@in_mem (GRing.Zmodule.sort R) (@GRing.add R x (@GRing.opp R y)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) (@in_mem (GRing.Zmodule.sort R) (@GRing.add R y (@GRing.opp R x)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) *)
by rewrite -opprB rpredN.
(* Goal: forall (_ : is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R x (@GRing.opp R y)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI)))) (_ : is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R y (@GRing.opp R z)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI)))), is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R x (@GRing.opp R z)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) *)
by move=> *; rewrite -[x](addrNK y) -addrA rpredD.
Qed.
Canonical equiv_equiv := EquivRelPack equiv_is_equiv.
Canonical equiv_encModRel := defaultEncModRel equiv.
Definition type := {eq_quot equiv}.
Definition type_of of phant R := type.
Canonical rquot_quotType := [quotType of type].
Canonical rquot_eqType := [eqType of type].
Canonical rquot_choiceType := [choiceType of type].
Canonical rquot_eqQuotType := [eqQuotType equiv of type].
Lemma idealrBE x y : (x - y) \in kI = (x == y %[mod type]).
Proof.
(* Goal: @eq bool (@in_mem (GRing.Zmodule.sort R) (@GRing.add R x (@GRing.opp R y)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) (@eq_op rquot_eqType (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant type) x) (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant type) y)) *)
by rewrite piE equivE.
Qed.
Lemma idealrDE x y : (x + y) \in kI = (x == - y %[mod type]).
Proof.
(* Goal: @eq bool (@in_mem (GRing.Zmodule.sort R) (@GRing.add R x y) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) (@eq_op rquot_eqType (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant type) x) (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant type) (@GRing.opp R y))) *)
by rewrite -idealrBE opprK.
Qed.
Definition zero : type := lift_cst type 0.
Definition add := lift_op2 type +%R.
Definition opp := lift_op1 type -%R.
Canonical pi_zero_morph := PiConst zero.
Lemma pi_opp : {morph \pi : x / - x >-> opp x}.
Proof.
(* Goal: @morphism_1 (GRing.Zmodule.sort R) (@quot_sort (GRing.Zmodule.sort R) rquot_quotType) (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant (@quot_sort (GRing.Zmodule.sort R) rquot_quotType))) (fun x : GRing.Zmodule.sort R => @GRing.opp R x) (fun x : @quot_sort (GRing.Zmodule.sort R) rquot_quotType => opp x) *)
move=> x; unlock opp; apply/eqP; rewrite piE equivE.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R (@GRing.opp R x) (@GRing.opp R (@GRing.opp R (@Repr.f (GRing.Zmodule.sort R) rquot_quotType (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant (@quot_sort (GRing.Zmodule.sort R) rquot_quotType)) x))))) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) *)
by rewrite -opprD rpredN idealrDE opprK reprK.
Qed.
Canonical pi_opp_morph := PiMorph1 pi_opp.
Lemma pi_add : {morph \pi : x y / x + y >-> add x y}.
Proof.
(* Goal: @morphism_2 (GRing.Zmodule.sort R) (@quot_sort (GRing.Zmodule.sort R) rquot_quotType) (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant (@quot_sort (GRing.Zmodule.sort R) rquot_quotType))) (fun x y : GRing.Zmodule.sort R => @GRing.add R x y) (fun x y : @quot_sort (GRing.Zmodule.sort R) rquot_quotType => add x y) *)
move=> x y /=; unlock add; apply/eqP; rewrite piE equivE.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R (@GRing.add R x y) (@GRing.opp R (@GRing.add R (@Repr.f (GRing.Zmodule.sort R) rquot_quotType (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant type) x)) (@Repr.f (GRing.Zmodule.sort R) rquot_quotType (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant type) y))))) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) *)
rewrite opprD addrAC addrA -addrA.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort R) (@GRing.add R (@GRing.add R x (@GRing.opp R (@Repr.f (GRing.Zmodule.sort R) rquot_quotType (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant type) x)))) (@GRing.add R (@GRing.opp R (@Repr.f (GRing.Zmodule.sort R) rquot_quotType (@Pi.f (GRing.Zmodule.sort R) rquot_quotType (Phant type) y))) y)) (@mem (GRing.Zmodule.sort R) (predPredType (GRing.Zmodule.sort R)) (@unkey_pred (GRing.Zmodule.sort R) I (@GRing.Pred.opp_key R I (@GRing.Pred.zmod_opp R I zmodI)) kI))) *)
by rewrite rpredD // (idealrBE, idealrDE) ?pi_opp ?reprK.
Qed.
Canonical pi_add_morph := PiMorph2 pi_add.
Lemma addqA: associative add.
Proof.
(* Goal: @associative type add *)
by move=> x y z; rewrite -[x]reprK -[y]reprK -[z]reprK !piE addrA.
Qed.
Lemma addqC: commutative add.
Proof.
(* Goal: @commutative type type add *)
by move=> x y; rewrite -[x]reprK -[y]reprK !piE addrC.
Qed.
Lemma add0q: left_id zero add.
Proof.
(* Goal: @left_id type type zero add *)
by move=> x; rewrite -[x]reprK !piE add0r.
Qed.
Lemma addNq: left_inverse zero opp add.
Proof.
(* Goal: @left_inverse type type type zero opp add *)
by move=> x; rewrite -[x]reprK !piE addNr.
Qed.
Definition rquot_zmodMixin := ZmodMixin addqA addqC add0q addNq.
Canonical rquot_zmodType := Eval hnf in ZmodType type rquot_zmodMixin.
Definition rquot_zmodQuotMixin := ZmodQuotMixin type (lock _) pi_opp pi_add.
Canonical rquot_zmodQuotType := ZmodQuotType 0 -%R +%R type rquot_zmodQuotMixin.
End ZmodQuotient.
Notation "{quot I }" := (@type_of _ _ _ I (Phant _)).
Section RingQuotient.
Variables (R : comRingType) (I : predPredType R)
(idealI : idealr I) (kI : keyed_pred idealI).
Local Notation type := {quot kI}.
Definition one: type := lift_cst type 1.
Definition mul := lift_op2 type *%R.
Canonical pi_one_morph := PiConst one.
Lemma pi_mul: {morph \pi : x y / x * y >-> mul x y}.
Proof.
(* Goal: @morphism_2 (GRing.Ring.sort (GRing.ComRing.ringType R)) (@quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI)) (@Pi.f (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI)))) (fun x y : GRing.Ring.sort (GRing.ComRing.ringType R) => @GRing.mul (GRing.ComRing.ringType R) x y) (fun x y : @quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) => mul x y) *)
move=> x y; unlock mul; apply/eqP; rewrite piE equivE.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@GRing.mul (GRing.ComRing.ringType R) x y) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@GRing.mul (GRing.ComRing.ringType R) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) x)) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) y))))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) I (@GRing.Pred.opp_key (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@GRing.Pred.zmod_opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI))) kI))) *)
rewrite -[_ * _](addrNK (x * repr (\pi_type y))) -mulrBr.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@GRing.mul (GRing.ComRing.ringType R) x (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) y (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))))) y))))) (@GRing.mul (GRing.ComRing.ringType R) x (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))))) y)))) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@GRing.mul (GRing.ComRing.ringType R) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) x)) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) y))))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) I (@GRing.Pred.opp_key (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@GRing.Pred.zmod_opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI))) kI))) *)
rewrite -addrA -mulrBl rpredD //.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) x (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) x)))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))))) y))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) I (@GRing.Pred.add_key (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@GRing.Pred.zmod_add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI))) kI))) *)
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@GRing.mul (GRing.ComRing.ringType R) x (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) y (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))))) y))))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) I (@GRing.Pred.add_key (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@GRing.Pred.zmod_add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI))) kI))) *)
by rewrite idealMr // idealrDE opprK reprK.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) x (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Ring.sort (GRing.ComRing.ringType R)) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) x)))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))))) y))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) I (@GRing.Pred.add_key (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@GRing.Pred.zmod_add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI))) kI))) *)
by rewrite mulrC idealMr // idealrDE opprK reprK.
Qed.
Canonical pi_mul_morph := PiMorph2 pi_mul.
Lemma mulqA: associative mul.
Proof.
(* Goal: @associative (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))))) mul *)
by move=> x y z; rewrite -[x]reprK -[y]reprK -[z]reprK !piE mulrA.
Qed.
Lemma mulqC: commutative mul.
Proof.
(* Goal: @commutative (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))))) (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))))) mul *)
by move=> x y; rewrite -[x]reprK -[y]reprK !piE mulrC.
Qed.
Lemma mul1q: left_id one mul.
Proof.
(* Goal: @left_id (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))))) (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))))) one mul *)
by move=> x; rewrite -[x]reprK !piE mul1r.
Qed.
Lemma mulq_addl: left_distributive mul +%R.
Proof.
(* Goal: @left_distributive (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))))) (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))))) mul (@GRing.add (@rquot_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI)) *)
move=> x y z; rewrite -[x]reprK -[y]reprK -[z]reprK.
(* Goal: @eq (@type_of (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI (Phant (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))))) (mul (@GRing.add (@rquot_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) x)) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) y))) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) z))) (@GRing.add (@rquot_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (mul (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) x)) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) z))) (mul (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) y)) (@Pi.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) (Phant (@quot_sort (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI))) (@Repr.f (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@rquot_quotType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) z)))) *)
by apply/eqP; rewrite piE /= mulrDl equiv_refl.
Qed.
Lemma nonzero1q: one != 0.
Proof.
(* Goal: is_true (negb (@eq_op (@rquot_eqType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI) one (GRing.zero (@rquot_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I idealI) kI)))) *)
by rewrite piE equivE subr0 idealr1.
Qed.
Definition rquot_comRingMixin :=
ComRingMixin mulqA mulqC mul1q mulq_addl nonzero1q.
Canonical rquot_ringType := Eval hnf in RingType type rquot_comRingMixin.
Canonical rquot_comRingType := Eval hnf in ComRingType type mulqC.
Definition rquot_ringQuotMixin := RingQuotMixin type (lock _) pi_mul.
Canonical rquot_ringQuotType := RingQuotType 1 *%R type rquot_ringQuotMixin.
End RingQuotient.
Section IDomainQuotient.
Variables (R : comRingType) (I : predPredType R)
(pidealI : prime_idealr I) (kI : keyed_pred pidealI).
Lemma rquot_IdomainAxiom (x y : {quot kI}): x * y = 0 -> (x == 0) || (y == 0).
Proof.
(* Goal: forall _ : @eq (GRing.Ring.sort (@rquot_ringType R I (@prime_idealr_zmod (GRing.ComRing.ringType R) I pidealI) kI)) (@GRing.mul (@rquot_ringType R I (@prime_idealr_zmod (GRing.ComRing.ringType R) I pidealI) kI) x y) (GRing.zero (GRing.Ring.zmodType (@rquot_ringType R I (@prime_idealr_zmod (GRing.ComRing.ringType R) I pidealI) kI))), is_true (orb (@eq_op (@rquot_eqType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I (@prime_idealr_zmod (GRing.ComRing.ringType R) I pidealI)) kI) x (GRing.zero (@rquot_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I (@prime_idealr_zmod (GRing.ComRing.ringType R) I pidealI)) kI))) (@eq_op (@rquot_eqType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I (@prime_idealr_zmod (GRing.ComRing.ringType R) I pidealI)) kI) y (GRing.zero (@rquot_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) I (@idealr_zmod (GRing.ComRing.ringType R) I (@prime_idealr_zmod (GRing.ComRing.ringType R) I pidealI)) kI)))) *)
by move=> /eqP; rewrite -[x]reprK -[y]reprK !piE !equivE !subr0 prime_idealrM.
Qed.
End IDomainQuotient.
End Quotient.
Notation "{ideal_quot I }" := (@Quotient.type_of _ _ _ I (Phant _)).
Notation "x == y %[mod_ideal I ]" :=
(x == y %[mod {ideal_quot I}]) : quotient_scope.
Notation "x = y %[mod_ideal I ]" :=
(x = y %[mod {ideal_quot I}]) : quotient_scope.
Notation "x != y %[mod_ideal I ]" :=
(x != y %[mod {ideal_quot I}]) : quotient_scope.
Notation "x <> y %[mod_ideal I ]" :=
(x <> y %[mod {ideal_quot I}]) : quotient_scope.
Canonical Quotient.rquot_eqType.
Canonical Quotient.rquot_choiceType.
Canonical Quotient.rquot_zmodType.
Canonical Quotient.rquot_ringType.
Canonical Quotient.rquot_comRingType.
Canonical Quotient.rquot_quotType.
Canonical Quotient.rquot_eqQuotType.
Canonical Quotient.rquot_zmodQuotType.
Canonical Quotient.rquot_ringQuotType.
|
Require Import Arith.
Require Import Terms.
Require Import Reduction.
Require Import Redexes.
Require Import Test.
Require Import Substitution.
Inductive residuals : redexes -> redexes -> redexes -> Prop :=
| Res_Var : forall n : nat, residuals (Var n) (Var n) (Var n)
| Res_Fun :
forall U V W : redexes,
residuals U V W -> residuals (Fun U) (Fun V) (Fun W)
| Res_Ap :
forall U1 V1 W1 : redexes,
residuals U1 V1 W1 ->
forall U2 V2 W2 : redexes,
residuals U2 V2 W2 ->
forall b : bool, residuals (Ap b U1 U2) (Ap false V1 V2) (Ap b W1 W2)
| Res_redex :
forall U1 V1 W1 : redexes,
residuals U1 V1 W1 ->
forall U2 V2 W2 : redexes,
residuals U2 V2 W2 ->
forall b : bool,
residuals (Ap b (Fun U1) U2) (Ap true (Fun V1) V2) (subst_r W2 W1).
Hint Resolve Res_Var Res_Fun Res_Ap Res_redex.
Lemma residuals_function :
forall U V W : redexes,
residuals U V W -> forall (W' : redexes) (R : residuals U V W'), W' = W.
Proof.
(* Goal: forall (U V W : redexes) (_ : residuals U V W) (W' : redexes) (_ : residuals U V W'), @eq redexes W' W *)
simple induction 1; intros; inversion R; auto with arith.
(* Goal: @eq redexes (subst_r W3 W0) (subst_r W2 W1) *)
(* Goal: @eq redexes (Ap b W0 W3) (Ap b W1 W2) *)
(* Goal: @eq redexes (Fun W1) (Fun W0) *)
elim H1 with W1; trivial with arith.
(* Goal: @eq redexes (subst_r W3 W0) (subst_r W2 W1) *)
(* Goal: @eq redexes (Ap b W0 W3) (Ap b W1 W2) *)
elim H1 with W0; elim H3 with W3; trivial with arith.
(* Goal: @eq redexes (subst_r W3 W0) (subst_r W2 W1) *)
elim H1 with W0; elim H3 with W3; trivial with arith.
Qed.
Lemma residuals_lift_rec :
forall U1 U2 U3 : redexes,
residuals U1 U2 U3 ->
forall k n : nat,
residuals (lift_rec_r U1 n k) (lift_rec_r U2 n k) (lift_rec_r U3 n k).
Proof.
(* Goal: forall (U1 U2 U3 : redexes) (_ : residuals U1 U2 U3) (k n : nat), residuals (lift_rec_r U1 n k) (lift_rec_r U2 n k) (lift_rec_r U3 n k) *)
simple induction 1; simpl in |- *; intros; auto with arith.
(* Goal: residuals (Ap b (Fun (lift_rec_r U0 (S n) k)) (lift_rec_r U4 n k)) (Ap true (Fun (lift_rec_r V1 (S n) k)) (lift_rec_r V2 n k)) (lift_rec_r (subst_r W2 W1) n k) *)
rewrite lift_subst; auto with arith.
Qed.
Lemma residuals_lift :
forall U1 U2 U3 : redexes,
residuals U1 U2 U3 ->
forall k : nat, residuals (lift_r k U1) (lift_r k U2) (lift_r k U3).
Proof.
(* Goal: forall (U1 U2 U3 : redexes) (_ : residuals U1 U2 U3) (k : nat), residuals (lift_r k U1) (lift_r k U2) (lift_r k U3) *)
unfold lift_r in |- *; intros; apply residuals_lift_rec; trivial with arith.
Qed.
Hint Resolve residuals_lift.
Lemma residuals_subst_rec :
forall U1 U2 U3 V1 V2 V3 : redexes,
residuals U1 U2 U3 ->
residuals V1 V2 V3 ->
forall k : nat,
residuals (subst_rec_r U1 V1 k) (subst_rec_r U2 V2 k) (subst_rec_r U3 V3 k).
Proof.
(* Goal: forall (U1 U2 U3 V1 V2 V3 : redexes) (_ : residuals U1 U2 U3) (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U1 V1 k) (subst_rec_r U2 V2 k) (subst_rec_r U3 V3 k) *)
simple induction 1; simpl in |- *; auto with arith.
(* Goal: forall (U1 V4 W1 : redexes) (_ : residuals U1 V4 W1) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U1 V1 k) (subst_rec_r V4 V2 k) (subst_rec_r W1 V3 k)) (U2 V5 W2 : redexes) (_ : residuals U2 V5 W2) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U2 V1 k) (subst_rec_r V5 V2 k) (subst_rec_r W2 V3 k)) (b : bool) (_ : residuals V1 V2 V3) (k : nat), residuals (Ap b (Fun (subst_rec_r U1 V1 (S k))) (subst_rec_r U2 V1 k)) (Ap true (Fun (subst_rec_r V4 V2 (S k))) (subst_rec_r V5 V2 k)) (subst_rec_r (subst_r W2 W1) V3 k) *)
(* Goal: forall (n : nat) (_ : residuals V1 V2 V3) (k : nat), residuals (insert_Var V1 n k) (insert_Var V2 n k) (insert_Var V3 n k) *)
intros n R k; unfold insert_Var in |- *; elim (compare k n); auto with arith.
(* Goal: forall (U1 V4 W1 : redexes) (_ : residuals U1 V4 W1) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U1 V1 k) (subst_rec_r V4 V2 k) (subst_rec_r W1 V3 k)) (U2 V5 W2 : redexes) (_ : residuals U2 V5 W2) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U2 V1 k) (subst_rec_r V5 V2 k) (subst_rec_r W2 V3 k)) (b : bool) (_ : residuals V1 V2 V3) (k : nat), residuals (Ap b (Fun (subst_rec_r U1 V1 (S k))) (subst_rec_r U2 V1 k)) (Ap true (Fun (subst_rec_r V4 V2 (S k))) (subst_rec_r V5 V2 k)) (subst_rec_r (subst_r W2 W1) V3 k) *)
(* Goal: forall a : sumbool (lt k n) (@eq nat k n), residuals (if a then Var (Init.Nat.pred n) else lift_r k V1) (if a then Var (Init.Nat.pred n) else lift_r k V2) (if a then Var (Init.Nat.pred n) else lift_r k V3) *)
simple induction a; auto with arith.
(* Goal: forall (U1 V4 W1 : redexes) (_ : residuals U1 V4 W1) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U1 V1 k) (subst_rec_r V4 V2 k) (subst_rec_r W1 V3 k)) (U2 V5 W2 : redexes) (_ : residuals U2 V5 W2) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U2 V1 k) (subst_rec_r V5 V2 k) (subst_rec_r W2 V3 k)) (b : bool) (_ : residuals V1 V2 V3) (k : nat), residuals (Ap b (Fun (subst_rec_r U1 V1 (S k))) (subst_rec_r U2 V1 k)) (Ap true (Fun (subst_rec_r V4 V2 (S k))) (subst_rec_r V5 V2 k)) (subst_rec_r (subst_r W2 W1) V3 k) *)
intros; rewrite substitution; auto with arith.
Qed.
Hint Resolve residuals_subst_rec.
Theorem commutation :
forall U1 U2 U3 V1 V2 V3 : redexes,
residuals U1 U2 U3 ->
residuals V1 V2 V3 ->
residuals (subst_r V1 U1) (subst_r V2 U2) (subst_r V3 U3).
Proof.
(* Goal: forall (U1 U2 U3 V1 V2 V3 : redexes) (_ : residuals U1 U2 U3) (_ : residuals V1 V2 V3), residuals (subst_r V1 U1) (subst_r V2 U2) (subst_r V3 U3) *)
unfold subst_r in |- *; auto with arith.
Qed.
Lemma residuals_comp : forall U V W : redexes, residuals U V W -> comp U V.
Proof.
(* Goal: forall (U V W : redexes) (_ : residuals U V W), comp U V *)
simple induction 1; simpl in |- *; auto with arith.
Qed.
Lemma preservation1 :
forall U V UV : redexes,
residuals U V UV ->
forall (T : redexes) (UVT : union U V T), residuals T V UV.
Proof.
(* Goal: forall (U V UV : redexes) (_ : residuals U V UV) (T : redexes) (_ : union U V T), residuals T V UV *)
simple induction 1; simple induction T; intros; inversion UVT; auto with arith.
(* Goal: residuals (Ap (bool_max b true) r r0) (Ap true (Fun V1) V2) (subst_r W2 W1) *)
(* Goal: residuals (Ap (bool_max b false) r r0) (Ap false V1 V2) (Ap b W1 W2) *)
rewrite (max_false b); auto with arith.
(* Goal: residuals (Ap (bool_max b true) r r0) (Ap true (Fun V1) V2) (subst_r W2 W1) *)
inversion H8; auto with arith.
Qed.
Lemma preservation :
forall U V W UV : redexes,
union U V W -> residuals U V UV -> residuals W V UV.
Proof.
(* Goal: forall (U V W UV : redexes) (_ : union U V W) (_ : residuals U V UV), residuals W V UV *)
intros; apply preservation1 with U; auto with arith.
Qed.
Lemma mutual_residuals_comp :
forall (W U UW : redexes) (RU : residuals U W UW)
(V VW : redexes) (RV : residuals V W VW), comp UW VW.
Proof.
(* Goal: forall (W U UW : redexes) (_ : residuals U W UW) (V VW : redexes) (_ : residuals V W VW), comp UW VW *)
simple induction W.
(* Goal: forall (b : bool) (r : redexes) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW) (r0 : redexes) (_ : forall (U UW : redexes) (_ : residuals U r0 UW) (V VW : redexes) (_ : residuals V r0 VW), comp UW VW) (U UW : redexes) (_ : residuals U (Ap b r r0) UW) (V VW : redexes) (_ : residuals V (Ap b r r0) VW), comp UW VW *)
(* Goal: forall (r : redexes) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW) (U UW : redexes) (_ : residuals U (Fun r) UW) (V VW : redexes) (_ : residuals V (Fun r) VW), comp UW VW *)
(* Goal: forall (n : nat) (U UW : redexes) (_ : residuals U (Var n) UW) (V VW : redexes) (_ : residuals V (Var n) VW), comp UW VW *)
intros; inversion_clear RU; inversion_clear RV; trivial with arith.
(* Goal: forall (b : bool) (r : redexes) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW) (r0 : redexes) (_ : forall (U UW : redexes) (_ : residuals U r0 UW) (V VW : redexes) (_ : residuals V r0 VW), comp UW VW) (U UW : redexes) (_ : residuals U (Ap b r r0) UW) (V VW : redexes) (_ : residuals V (Ap b r r0) VW), comp UW VW *)
(* Goal: forall (r : redexes) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW) (U UW : redexes) (_ : residuals U (Fun r) UW) (V VW : redexes) (_ : residuals V (Fun r) VW), comp UW VW *)
intros; inversion_clear RU; inversion_clear RV; apply Comp_Fun; apply H with U0 U1; auto with arith.
(* Goal: forall (b : bool) (r : redexes) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW) (r0 : redexes) (_ : forall (U UW : redexes) (_ : residuals U r0 UW) (V VW : redexes) (_ : residuals V r0 VW), comp UW VW) (U UW : redexes) (_ : residuals U (Ap b r r0) UW) (V VW : redexes) (_ : residuals V (Ap b r r0) VW), comp UW VW *)
simple induction b; intros; generalize RU H; inversion_clear RV.
(* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *)
(* Goal: forall (_ : residuals U (Ap true (Fun V1) r0) UW) (_ : forall (U UW : redexes) (_ : residuals U (Fun V1) UW) (V VW : redexes) (_ : residuals V (Fun V1) VW), comp UW VW), comp UW (subst_r W2 W1) *)
intro RU1; inversion_clear RU1; intros.
(* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *)
(* Goal: comp (subst_r W3 W0) (subst_r W2 W1) *)
apply subst_preserve_comp.
(* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *)
(* Goal: comp W3 W2 *)
(* Goal: comp W0 W1 *)
cut (comp (Fun W0) (Fun W1)).
(* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *)
(* Goal: comp W3 W2 *)
(* Goal: comp (Fun W0) (Fun W1) *)
(* Goal: forall _ : comp (Fun W0) (Fun W1), comp W0 W1 *)
intro CF; inversion_clear CF; trivial with arith.
(* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *)
(* Goal: comp W3 W2 *)
(* Goal: comp (Fun W0) (Fun W1) *)
apply H5 with (Fun U0) (Fun U1); auto with arith.
(* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *)
(* Goal: comp W3 W2 *)
apply H0 with U3 U2; auto with arith.
(* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *)
intros; inversion_clear RU; apply Comp_Ap.
(* Goal: comp W3 W2 *)
(* Goal: comp W0 W1 *)
apply H with U0 U1; auto with arith.
(* Goal: comp W3 W2 *)
apply H0 with U3 U2; auto with arith.
Qed.
Lemma residuals_regular :
forall U V W : redexes, residuals U V W -> regular V.
Proof.
(* Goal: forall (U V W : redexes) (_ : residuals U V W), regular V *)
simple induction 1; simpl in |- *; auto with arith.
Qed.
Lemma residuals_intro :
forall U V : redexes,
comp U V -> regular V -> exists W : redexes, residuals U V W.
Lemma residuals_preserve_regular :
forall U V W : redexes, residuals U V W -> regular U -> regular W.
Proof.
(* Goal: forall (U V W : redexes) (_ : residuals U V W) (_ : regular U), regular W *)
simple induction 1; simpl in |- *; auto with arith.
(* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *)
(* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then match U1 with | Var n => False | Fun r => and (regular U1) (regular U2) | Ap b0 r r0 => False end else and (regular U1) (regular U2)), if b then match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b0 r r0 => False end else and (regular W1) (regular W2) *)
simple induction b.
(* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *)
(* Goal: forall _ : and (regular U1) (regular U2), and (regular W1) (regular W2) *)
(* Goal: forall _ : match U1 with | Var n => False | Fun r => and (regular U1) (regular U2) | Ap b r r0 => False end, match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *)
generalize H1; elim H0; try contradiction.
(* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *)
(* Goal: forall _ : and (regular U1) (regular U2), and (regular W1) (regular W2) *)
(* Goal: forall (U V W : redexes) (_ : residuals U V W) (_ : forall (_ : forall _ : regular U, regular W) (_ : match U with | Var n => False | Fun r => and (regular U) (regular U2) | Ap b r r0 => False end), match W with | Var n => False | Fun r => and (regular W) (regular W2) | Ap b r r0 => False end) (_ : forall _ : regular (Fun U), regular (Fun W)) (_ : and (regular (Fun U)) (regular U2)), and (regular (Fun W)) (regular W2) *)
intros; elim H7; split; auto with arith.
(* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *)
(* Goal: forall _ : and (regular U1) (regular U2), and (regular W1) (regular W2) *)
simple induction 1; split; auto with arith.
(* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *)
simple induction b; intros; apply subst_preserve_regular; elim H4; auto with arith.
Qed.
|
Require Import basis.
Require Import part1.
Require Import part2.
Require Import part3.
Require Import affinity.
Require Import orthogonality.
Theorem pb9_1 :
forall (a : Point) (l : Line), ex (fun b : Point => Incident b l).
Proof.
(* Goal: forall (_ : Point) (l : Line), @ex Point (fun b : Point => Incident b l) *)
intros a l.
(* Goal: @ex Point (fun b : Point => Incident b l) *)
generalize (O3_i l a); intro H'.
(* Goal: @ex Point (fun b : Point => Incident b l) *)
elim (O1 (ort l a) l); intro H'2.
(* Goal: @ex Point (fun b : Point => Incident b l) *)
(* Goal: @ex Point (fun b : Point => Incident b l) *)
exists (pt (Twol (ort l a) l H'2)).
(* Goal: @ex Point (fun b : Point => Incident b l) *)
(* Goal: Incident (pt (Twol (ort l a) l H'2)) l *)
exact (inc_pt2 (Twol (ort l a) l H'2)).
(* Goal: @ex Point (fun b : Point => Incident b l) *)
elim H'; auto.
Qed.
Section construction9_2.
Variable t : Triangle.
Let C : Point := summit t.
Let A : Point := origin (base t).
Let B : Point := extremity (base t).
Let Base : Line := ln (base t).
Let L1 : Line := ln (Side1 t).
Let L2 : Line := ln (Side2 t).
Let L3 : Line := par Base C.
Let L4 : Line := par L1 B.
Let lemma1 : ConLn Base L1.
Proof.
(* Goal: ConLn Base L1 *)
unfold Base, L1 in |- *.
(* Goal: ConLn (ln (base t)) (ln (Side1 t)) *)
apply DiLn_qimp_con; auto.
(* Goal: @ex Point (fun b : Point => and (Incident b (ln (base t))) (Incident b (ln (Side1 t)))) *)
exists (origin (base t)); split; auto.
(* Goal: Incident (origin (base t)) (ln (Side1 t)) *)
rewrite (auxs1 t); auto.
Qed.
Hint Resolve lemma1.
Let lemma2 : DiLn Base L3.
Proof.
(* Goal: DiLn Base L3 *)
unfold L3, Base, C in |- *; auto.
Qed.
Hint Resolve lemma2.
Let lemma5' : Apart B L1.
Proof.
(* Goal: Apart B L1 *)
unfold B, L1 in |- *.
(* Goal: Apart (extremity (base t)) (ln (Side1 t)) *)
apply cong_eqln_apt with (l := ln (reverse (Side1 t))); auto.
Qed.
Hint Resolve lemma5'.
Let lemma2' : DiLn L1 L4.
Proof.
(* Goal: DiLn L1 L4 *)
unfold L1, L4 in |- *; auto.
Qed.
Hint Resolve lemma2'.
Let lemma3 : ConLn L1 L3.
Proof.
(* Goal: ConLn L1 L3 *)
unfold L3 at 1 in |- *.
(* Goal: ConLn L1 (par Base C) *)
apply cong_par_con with (m := Base); auto.
Qed.
Hint Resolve lemma3.
Let lemma4 : ConLn L3 L4.
Proof.
(* Goal: ConLn L3 L4 *)
unfold L4 at 1 in |- *.
(* Goal: ConLn L3 (par L1 B) *)
apply cong_par_con with (m := L1); auto.
Qed.
Hint Resolve lemma4.
Let D : Point := pt (Twol L3 L4 lemma4).
Let lemma5 : Apart B L3.
Proof.
(* Goal: Apart B L3 *)
lapply (constructive_uniqueness_for_parallels Base L3 B); [ intro H'2; elim H'2; [ intro H'3; elim H'3; [ intro H'4; clear H'3 H'2 | trivial ] | intro H'3; clear H'2 ] | idtac ]; auto.
(* Goal: Apart B L3 *)
(* Goal: Apart B L3 *)
unfold B, Base in H'4.
(* Goal: Apart B L3 *)
(* Goal: Apart B L3 *)
elim (inc_ln2 (base t)); auto.
(* Goal: Apart B L3 *)
unfold L3 in H'3.
(* Goal: Apart B L3 *)
elim (Ax1_i Base C); auto.
Qed.
Hint Resolve lemma5.
Let lemma6 : Apart C L4.
Proof.
(* Goal: Apart C L4 *)
lapply (constructive_uniqueness_for_parallels L1 L4 C); [ intro H'4; elim H'4; [ intro H'5; elim H'5; [ intro H'6; clear H'5 H'4 | trivial ] | intro H'5; clear H'4 ] | idtac ]; auto.
(* Goal: Apart C L4 *)
(* Goal: Apart C L4 *)
unfold C, L1 in H'6.
(* Goal: Apart C L4 *)
(* Goal: Apart C L4 *)
generalize H'6; rewrite (auxs3 t); intro H'.
(* Goal: Apart C L4 *)
(* Goal: Apart C L4 *)
elim (inc_ln1 (Side1 t)); auto.
(* Goal: Apart C L4 *)
elim (Ax1_i L1 B); auto.
Qed.
Hint Resolve lemma6.
Let lemma7 : DiPt C D.
Proof.
(* Goal: DiPt C D *)
unfold D in |- *; auto.
Qed.
Let lemma8 : DiPt B D.
Proof.
(* Goal: DiPt B D *)
unfold D in |- *; auto.
Qed.
Hint Resolve lemma7 lemma8.
Let S1 : Segment := base t.
Let S3 : Segment := reverse (Side1 t).
Let S2 : Segment := Seg C D lemma7.
Let S4 : Segment := Seg B D lemma8.
Let lemma9 : EqLn L1 (ln (reverse (Side1 t))).
Proof.
(* Goal: EqLn L1 (ln (reverse (Side1 t))) *)
unfold L1 at 1 in |- *; auto.
Qed.
Hint Resolve lemma9.
Let lemma10 : EqLn L3 (ln S2).
Proof.
(* Goal: EqLn L3 (ln S2) *)
apply Uniqueness_of_constructed_lines.
(* Goal: Incident (extremity S2) L3 *)
(* Goal: Incident (origin S2) L3 *)
unfold S2, L1, L3 in |- *; simpl in |- *; auto.
(* Goal: Incident (extremity S2) L3 *)
unfold L3, S2, D in |- *; simpl in |- *.
(* Goal: Incident (pt (Twol L3 L4 lemma4)) (par Base C) *)
exact (inc_pt1 (Twol L3 L4 lemma4)).
Qed.
Hint Resolve lemma10.
Let lemma11 : EqLn L4 (ln S4).
Proof.
(* Goal: EqLn L4 (ln S4) *)
apply Uniqueness_of_constructed_lines.
(* Goal: Incident (extremity S4) L4 *)
(* Goal: Incident (origin S4) L4 *)
unfold S4, L4 in |- *; simpl in |- *; auto.
(* Goal: Incident (extremity S4) L4 *)
unfold S4, D in |- *; simpl in |- *.
(* Goal: Incident (pt (Twol L3 L4 lemma4)) L4 *)
exact (inc_pt2 (Twol L3 L4 lemma4)).
Qed.
Hint Resolve lemma11.
Theorem thm9_2 : Parallelogram.
Proof.
(* Goal: Parallelogram *)
apply (Pgram S1 S2 S3 S4).
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
(* Goal: and (@eq Point (origin S4) (extremity S1)) (@eq Point (extremity S4) (extremity S2)) *)
(* Goal: and (@eq Point (origin S3) (origin S1)) (@eq Point (extremity S3) (origin S2)) *)
unfold S1, S2, S3 in |- *.
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
(* Goal: and (@eq Point (origin S4) (extremity S1)) (@eq Point (extremity S4) (extremity S2)) *)
(* Goal: and (@eq Point (origin (reverse (Side1 t))) (origin (base t))) (@eq Point (extremity (reverse (Side1 t))) (origin (Seg C D lemma7))) *)
rewrite <- (ext_rev (Side1 t)).
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
(* Goal: and (@eq Point (origin S4) (extremity S1)) (@eq Point (extremity S4) (extremity S2)) *)
(* Goal: and (@eq Point (extremity (Side1 t)) (origin (base t))) (@eq Point (extremity (reverse (Side1 t))) (origin (Seg C D lemma7))) *)
rewrite <- (auxs1 t).
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
(* Goal: and (@eq Point (origin S4) (extremity S1)) (@eq Point (extremity S4) (extremity S2)) *)
(* Goal: and (@eq Point (origin (base t)) (origin (base t))) (@eq Point (extremity (reverse (Side1 t))) (origin (Seg C D lemma7))) *)
rewrite <- (orig_rev (Side1 t)).
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
(* Goal: and (@eq Point (origin S4) (extremity S1)) (@eq Point (extremity S4) (extremity S2)) *)
(* Goal: and (@eq Point (origin (base t)) (origin (base t))) (@eq Point (origin (Side1 t)) (origin (Seg C D lemma7))) *)
simpl in |- *.
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
(* Goal: and (@eq Point (origin S4) (extremity S1)) (@eq Point (extremity S4) (extremity S2)) *)
(* Goal: and (@eq Point (origin (base t)) (origin (base t))) (@eq Point (origin (Side1 t)) C) *)
rewrite <- (auxs3 t).
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
(* Goal: and (@eq Point (origin S4) (extremity S1)) (@eq Point (extremity S4) (extremity S2)) *)
(* Goal: and (@eq Point (origin (base t)) (origin (base t))) (@eq Point (summit t) C) *)
unfold C in |- *; auto.
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
(* Goal: and (@eq Point (origin S4) (extremity S1)) (@eq Point (extremity S4) (extremity S2)) *)
unfold S1, S2, S4, B in |- *; simpl in |- *; auto.
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) (ln S2) *)
apply cong_eqln_spar with (m := L3); auto.
(* Goal: SPar (ln S3) (ln S4) *)
(* Goal: SPar (ln S1) L3 *)
unfold L3, S1, Base, C in |- *; auto.
(* Goal: SPar (ln S3) (ln S4) *)
apply cong_eqln_spar with (m := L4); auto.
(* Goal: SPar (ln S3) L4 *)
unfold L4 in |- *.
(* Goal: SPar (ln S3) (par L1 B) *)
apply sym_SPar.
(* Goal: SPar (par L1 B) (ln S3) *)
apply cong_eqln_spar with (m := L1); auto.
Qed.
End construction9_2.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_3_5b.
Section Euclid.
Context `{Ax1:euclidean_neutral_ruler_compass}.
Lemma lemma_3_6b :
forall A B C D,
BetS A B C -> BetS A C D ->
BetS A B D.
Proof.
(* Goal: forall (A B C D : @Point Ax) (_ : @BetS Ax A B C) (_ : @BetS Ax A C D), @BetS Ax A B D *)
intros.
(* Goal: @BetS Ax A B D *)
assert (BetS C B A) by (conclude axiom_betweennesssymmetry).
(* Goal: @BetS Ax A B D *)
assert (BetS D C A) by (conclude axiom_betweennesssymmetry).
(* Goal: @BetS Ax A B D *)
assert (BetS D B A) by (conclude lemma_3_5b).
(* Goal: @BetS Ax A B D *)
assert (BetS A B D) by (conclude axiom_betweennesssymmetry).
(* Goal: @BetS Ax A B D *)
close.
Qed.
End Euclid.
|
From mathcomp
Require Import ssreflect ssrbool.
From LemmaOverloading
Require Import prelude xfind heaps cancel.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Structure tagged_prop := Tag {puntag :> Prop}.
Definition default_tag := Tag.
Definition dyneq_tag := default_tag.
Lemma simplify p (g : form p) : puntag (prop_of g) -> p.
Proof.
(* Goal: forall _ : puntag (@prop_of p g), p *)
by case: g=>/= p' <-.
Qed.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Parts2.
Section Restrictions1.
Variable E F : Setoid.
Variable f : MAP E F.
Definition restrict : forall A : part_set E, MAP A F.
Proof.
(* Goal: forall A : Carrier (part_set E), Carrier (MAP (@set_of_subtype_image E (@part E A)) F) *)
intros A; try assumption.
(* Goal: Carrier (MAP (@set_of_subtype_image E (@part E A)) F) *)
apply (Build_Map (Ap:=fun x : A => f (A x))).
(* Goal: @fun_compatible (@set_of_subtype_image E (@part E A)) F (fun x : Carrier (@set_of_subtype_image E (@part E A)) => @Ap E F f (@subtype_image_inj E (@part E A) x)) *)
red in |- *.
(* Goal: forall (x y : Carrier (@set_of_subtype_image E (@part E A))) (_ : @Equal (@set_of_subtype_image E (@part E A)) x y), @Equal F (@Ap E F f (@subtype_image_inj E (@part E A) x)) (@Ap E F f (@subtype_image_inj E (@part E A) y)) *)
intros x y; try assumption.
(* Goal: forall _ : @Equal (@set_of_subtype_image E (@part E A)) x y, @Equal F (@Ap E F f (@subtype_image_inj E (@part E A) x)) (@Ap E F f (@subtype_image_inj E (@part E A) y)) *)
elim y.
(* Goal: forall (subtype_elt : Carrier E) (subtype_prf : @Pred_fun E A subtype_elt) (_ : @Equal (@set_of_subtype_image E (@part E A)) x (@Build_subtype E A subtype_elt subtype_prf)), @Equal F (@Ap E F f (@subtype_image_inj E (@part E A) x)) (@Ap E F f (@subtype_image_inj E (@part E A) (@Build_subtype E A subtype_elt subtype_prf))) *)
elim x.
(* Goal: forall (subtype_elt : Carrier E) (subtype_prf : @Pred_fun E A subtype_elt) (subtype_elt0 : Carrier E) (subtype_prf0 : @Pred_fun E A subtype_elt0) (_ : @Equal (@set_of_subtype_image E (@part E A)) (@Build_subtype E A subtype_elt subtype_prf) (@Build_subtype E A subtype_elt0 subtype_prf0)), @Equal F (@Ap E F f (@subtype_image_inj E (@part E A) (@Build_subtype E A subtype_elt subtype_prf))) (@Ap E F f (@subtype_image_inj E (@part E A) (@Build_subtype E A subtype_elt0 subtype_prf0))) *)
simpl in |- *; auto with algebra.
Qed.
Lemma restrict_prop :
forall (A : part_set E) (x : E) (p : in_part x A),
Equal (restrict A (Build_subtype (subtype_elt:=x) p)) (f x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (p : @in_part E x A), @Equal F (@Ap (@set_of_subtype_image E (@part E A)) F (restrict A) (@Build_subtype E A x p)) (@Ap E F f x) *)
simpl in |- *; auto with algebra.
Qed.
Lemma restrict_prop_in_part :
forall (A : part_set E) (x : A), Equal (restrict A x) (f (A x)).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier (@set_of_subtype_image E (@part E A))), @Equal F (@Ap (@set_of_subtype_image E (@part E A)) F (restrict A) x) (@Ap E F f (@subtype_image_inj E (@part E A) x)) *)
simpl in |- *; auto with algebra.
Qed.
End Restrictions1.
Hint Resolve restrict_prop: algebra.
Section Inverse_image1.
Variable E F : Setoid.
Section Inverse_image1_1.
Variable f : MAP E F.
Definition invimage : part_set F -> part_set E.
Proof.
(* Goal: forall _ : Carrier (part_set F), Carrier (part_set E) *)
intros A.
(* Goal: Carrier (part_set E) *)
apply (Build_Predicate (Pred_fun:=fun x : E => in_part (f x) A)).
(* Goal: @pred_compatible E (fun x : Carrier E => @in_part F (@Ap E F f x) A) *)
red in |- *.
(* Goal: forall (x y : Carrier E) (_ : @in_part F (@Ap E F f x) A) (_ : @Equal E y x), @in_part F (@Ap E F f y) A *)
intros x y H' H'0; try assumption.
(* Goal: @in_part F (@Ap E F f y) A *)
apply in_part_comp_l with (Ap f x); auto with algebra.
Qed.
End Inverse_image1_1.
Variable f : MAP E F.
Lemma invimage_in :
forall (A : part_set F) (x : E), in_part x (invimage f A) -> in_part (f x) A.
Proof.
(* Goal: forall (A : Carrier (part_set F)) (x : Carrier E) (_ : @in_part E x (invimage f A)), @in_part F (@Ap E F f x) A *)
simpl in |- *; auto with algebra.
Qed.
Lemma in_invimage :
forall (A : part_set F) (x : E), in_part (f x) A -> in_part x (invimage f A).
Proof.
(* Goal: forall (A : Carrier (part_set F)) (x : Carrier E) (_ : @in_part F (@Ap E F f x) A), @in_part E x (invimage f A) *)
simpl in |- *; auto with algebra.
Qed.
Hint Resolve in_invimage: algebra.
Lemma invimage_included :
forall A B : part_set F,
included A B -> included (invimage f A) (invimage f B).
Proof.
(* Goal: forall (A B : Carrier (part_set F)) (_ : @included F A B), @included E (invimage f A) (invimage f B) *)
unfold included in |- *.
(* Goal: forall (A B : Carrier (part_set F)) (_ : forall (x : Carrier F) (_ : @in_part F x A), @in_part F x B) (x : Carrier E) (_ : @in_part E x (invimage f A)), @in_part E x (invimage f B) *)
simpl in |- *; auto with algebra.
Qed.
Hint Resolve invimage_included: algebra.
Lemma invimage_comp :
forall A B : part_set F, Equal A B -> Equal (invimage f A) (invimage f B).
Proof.
(* Goal: forall (A B : Carrier (part_set F)) (_ : @Equal (part_set F) A B), @Equal (part_set E) (invimage f A) (invimage f B) *)
intros A B H'; try assumption.
(* Goal: @Equal (part_set E) (invimage f A) (invimage f B) *)
apply included_antisym; auto with algebra.
Qed.
Hint Resolve invimage_comp: algebra.
Lemma invimage_image :
forall A : part_set F, included (image f (invimage f A)) A.
Proof.
(* Goal: forall A : Carrier (part_set F), @included F (@image E F f (invimage f A)) A *)
unfold included in |- *.
(* Goal: forall (A : Carrier (part_set F)) (x : Carrier F) (_ : @in_part F x (@image E F f (invimage f A))), @in_part F x A *)
simpl in |- *; auto with algebra.
(* Goal: forall (A : Predicate F) (x : Carrier F) (_ : @ex (Carrier E) (fun x0 : Carrier E => and (@in_part F (@Ap E F f x0) A) (@Equal F x (@Ap E F f x0)))), @in_part F x A *)
intros A x H'; try assumption.
(* Goal: @in_part F x A *)
elim H'; intros x0 E0; elim E0; intros H'0 H'1; try exact H'1; clear E0 H'.
(* Goal: @in_part F x A *)
apply in_part_comp_l with (Ap f x0); auto with algebra.
Qed.
Lemma image_invimage :
forall A : part_set E, included A (invimage f (image f A)).
Proof.
(* Goal: forall A : Carrier (part_set E), @included E A (invimage f (@image E F f A)) *)
unfold included in |- *.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x A), @in_part E x (invimage f (@image E F f A)) *)
simpl in |- *; auto with algebra.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : @in_part E x A), @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F (@Ap E F f x) (@Ap E F f x0))) *)
intros A x H'; exists x; split; [ try assumption | idtac ]; auto with algebra.
Qed.
Hint Resolve invimage_image image_invimage: algebra.
Lemma invimage_image_invimage :
forall A : part_set F,
Equal (invimage f (image f (invimage f A))) (invimage f A).
Proof.
(* Goal: forall A : Carrier (part_set F), @Equal (part_set E) (invimage f (@image E F f (invimage f A))) (invimage f A) *)
simpl in |- *.
(* Goal: forall A : Predicate F, @eq_part E (invimage f (@image E F f (invimage f A))) (invimage f A) *)
unfold eq_part in |- *.
(* Goal: forall (A : Predicate F) (x : Carrier E), and (forall _ : @in_part E x (invimage f (@image E F f (invimage f A))), @in_part E x (invimage f A)) (forall _ : @in_part E x (invimage f A), @in_part E x (invimage f (@image E F f (invimage f A)))) *)
intros A x; split; [ idtac | intros H'; try assumption ].
(* Goal: @in_part E x (invimage f (@image E F f (invimage f A))) *)
(* Goal: forall _ : @in_part E x (invimage f (@image E F f (invimage f A))), @in_part E x (invimage f A) *)
simpl in |- *.
(* Goal: @in_part E x (invimage f (@image E F f (invimage f A))) *)
(* Goal: forall _ : @ex (Carrier E) (fun x0 : Carrier E => and (@in_part F (@Ap E F f x0) A) (@Equal F (@Ap E F f x) (@Ap E F f x0))), @in_part F (@Ap E F f x) A *)
intros H'; try assumption.
(* Goal: @in_part E x (invimage f (@image E F f (invimage f A))) *)
(* Goal: @in_part F (@Ap E F f x) A *)
elim H'; intros x0 E0; elim E0; intros H'0 H'1; try exact H'0; clear E0 H'.
(* Goal: @in_part E x (invimage f (@image E F f (invimage f A))) *)
(* Goal: @in_part F (@Ap E F f x) A *)
apply in_part_comp_l with (Ap f x0); auto with algebra.
(* Goal: @in_part E x (invimage f (@image E F f (invimage f A))) *)
auto with algebra.
Qed.
Lemma image_invimage_image :
forall A : part_set E, Equal (image f (invimage f (image f A))) (image f A).
Proof.
(* Goal: forall A : Carrier (part_set E), @Equal (part_set F) (@image E F f (invimage f (@image E F f A))) (@image E F f A) *)
simpl in |- *.
(* Goal: forall A : Predicate E, @eq_part F (@image E F f (invimage f (@image E F f A))) (@image E F f A) *)
unfold eq_part in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier F), and (forall _ : @in_part F x (@image E F f (invimage f (@image E F f A))), @in_part F x (@image E F f A)) (forall _ : @in_part F x (@image E F f A), @in_part F x (@image E F f (invimage f (@image E F f A)))) *)
intros A x; split; [ try assumption | idtac ].
(* Goal: forall _ : @in_part F x (@image E F f A), @in_part F x (@image E F f (invimage f (@image E F f A))) *)
(* Goal: forall _ : @in_part F x (@image E F f (invimage f (@image E F f A))), @in_part F x (@image E F f A) *)
simpl in |- *; auto with algebra.
(* Goal: forall _ : @in_part F x (@image E F f A), @in_part F x (@image E F f (invimage f (@image E F f A))) *)
(* Goal: forall _ : @ex (Carrier E) (fun x0 : Carrier E => and (@ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F (@Ap E F f x0) (@Ap E F f x)))) (@Equal F x (@Ap E F f x0))), @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F x (@Ap E F f x0))) *)
intros H'; try assumption.
(* Goal: forall _ : @in_part F x (@image E F f A), @in_part F x (@image E F f (invimage f (@image E F f A))) *)
(* Goal: @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F x (@Ap E F f x0))) *)
elim H'; intros x0 E0; elim E0; intros H'0 H'1; elim H'0; intros x1 E1; elim E1; intros H'2 H'3; try exact H'2; clear E1 H'0 E0 H'.
(* Goal: forall _ : @in_part F x (@image E F f A), @in_part F x (@image E F f (invimage f (@image E F f A))) *)
(* Goal: @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F x (@Ap E F f x0))) *)
exists x1; split; [ try assumption | idtac ]; auto with algebra.
(* Goal: forall _ : @in_part F x (@image E F f A), @in_part F x (@image E F f (invimage f (@image E F f A))) *)
(* Goal: @Equal F x (@Ap E F f x1) *)
apply Trans with (Ap f x0); auto with algebra.
(* Goal: forall _ : @in_part F x (@image E F f A), @in_part F x (@image E F f (invimage f (@image E F f A))) *)
simpl in |- *; auto with algebra.
(* Goal: forall _ : @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F x (@Ap E F f x0))), @ex (Carrier E) (fun x0 : Carrier E => and (@ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F (@Ap E F f x0) (@Ap E F f x)))) (@Equal F x (@Ap E F f x0))) *)
intros H'; try assumption.
(* Goal: @ex (Carrier E) (fun x0 : Carrier E => and (@ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F (@Ap E F f x0) (@Ap E F f x)))) (@Equal F x (@Ap E F f x0))) *)
elim H'; intros x0 E0; elim E0; intros H'0 H'1; try exact H'0; clear E0 H'.
(* Goal: @ex (Carrier E) (fun x0 : Carrier E => and (@ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F (@Ap E F f x0) (@Ap E F f x)))) (@Equal F x (@Ap E F f x0))) *)
exists x0; split; [ exists x0; split; [ try assumption | idtac ] | idtac ]; auto with algebra.
Qed.
End Inverse_image1.
Hint Resolve invimage_image_invimage image_invimage_image: algebra.
Hint Resolve in_invimage: algebra.
Hint Resolve invimage_included: algebra.
Hint Resolve invimage_comp: algebra.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Sub_monoid.
Require Export Group_facts.
Section Def.
Variable G : GROUP.
Section Sub_group.
Variable H : submonoid G.
Hypothesis Hinv : forall x : G, in_part x H -> in_part (group_inverse _ x) H.
Definition subgroup_inv : MAP H H.
Proof.
(* Goal: Carrier (MAP (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) *)
apply (Build_Map (A:=H) (B:=H) (Ap:=fun x : H => Build_subtype (Hinv (subtype_prf x)))).
(* Goal: @fun_compatible (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (fun x : Carrier (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) => @Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x))) *)
red in |- *.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (_ : @Equal (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) x y), @Equal (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y)) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y))) *)
simpl in |- *.
(* Goal: forall (x y : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (_ : @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) x y), @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y)) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y))) *)
unfold subtype_image_equal in |- *.
(* Goal: forall (x y : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y)) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y)))) *)
simpl in |- *.
(* Goal: forall (x y : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) y)) *)
auto with algebra.
Qed.
Definition subgroup_group : group.
Proof.
(* Goal: group *)
apply (Build_group (group_monoid:=H)).
(* Goal: group_on (@monoid_of_submonoid (group_monoid G) H) *)
apply (Build_group_on (G:=H) (group_inverse_map:=subgroup_inv)).
(* Goal: @inverse_l (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv *)
(* Goal: @inverse_r (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv *)
red in |- *.
(* Goal: @inverse_l (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv *)
(* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))), @Equal (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@Ap (cart (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@couple (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) x (@Ap (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv x))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) *)
simpl in |- *.
(* Goal: @inverse_l (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv *)
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)), @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (sgroup_law (monoid_sgroup (group_monoid G)) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x))) (@subsgroup_prop (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@submonoid_prop (group_monoid G) H)) *)
unfold subtype_image_equal in |- *.
(* Goal: @inverse_l (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv *)
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (sgroup_law (monoid_sgroup (group_monoid G)) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x))) (@subsgroup_prop (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@submonoid_prop (group_monoid G) H))) *)
simpl in |- *.
(* Goal: @inverse_l (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv *)
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
auto with algebra.
(* Goal: @inverse_l (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv *)
red in |- *.
(* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))), @Equal (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@Ap (cart (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@sgroup_law_map (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_on_def (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)))) (@couple (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (@Ap (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) (sgroup_set (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H))) subgroup_inv x) x)) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid (group_monoid G) H)) (monoid_on_def (@monoid_of_submonoid (group_monoid G) H))) *)
simpl in |- *.
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)), @subtype_image_equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subsgroup_prop (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x))) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@submonoid_prop (group_monoid G) H)) *)
unfold subtype_image_equal in |- *.
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subsgroup_prop (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@Hinv (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_prf (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@submonoid_prop (group_monoid G) H))) *)
simpl in |- *.
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid G))) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) H)) x)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
auto with algebra.
Qed.
End Sub_group.
Record subgroup : Type :=
{subgroup_submonoid : submonoid G;
subgroup_prop :
forall x : G,
in_part x subgroup_submonoid ->
in_part (group_inverse _ x) subgroup_submonoid}.
Definition group_of_subgroup (H : subgroup) :=
subgroup_group (subgroup_prop (s:=H)).
End Def.
Coercion group_of_subgroup : subgroup >-> group.
Coercion subgroup_submonoid : subgroup >-> submonoid.
Section Injection.
Variable G : GROUP.
Variable H : subgroup G.
Lemma subgroup_in_prop :
forall x : G, in_part x H -> in_part (group_inverse _ x) H.
Proof.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid G))) x (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G H)))), @in_part (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G H))) *)
intros x H'; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G x) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G H))) *)
apply (subgroup_prop (G:=G) (s:=H)); auto with algebra.
Qed.
Definition inj_subgroup : Hom (H:GROUP) G.
Proof.
(* Goal: Carrier (@Hom GROUP (@group_of_subgroup G H : Ob GROUP) G) *)
apply (Build_monoid_hom (E:=H) (F:=G) (monoid_sgroup_hom:=inj_subsgroup H)).
(* Goal: @monoid_hom_prop (group_monoid (@group_of_subgroup G H)) (group_monoid G) (@Ap (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G H)))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (@group_of_subgroup G H))) (monoid_sgroup (group_monoid G)) (@inj_subsgroup (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G H))))) *)
red in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G H)))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (@group_of_subgroup G H))) (monoid_sgroup (group_monoid G)) (@inj_subsgroup (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G H)))) (@monoid_unit (monoid_sgroup (group_monoid (@group_of_subgroup G H))) (monoid_on_def (group_monoid (@group_of_subgroup G H))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
auto with algebra.
Qed.
Lemma inj_subgroup_injective : injective inj_subgroup.
Proof.
(* Goal: @injective (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G H)))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (@group_of_subgroup G H))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (@group_of_subgroup G H)) (group_monoid G) inj_subgroup)) *)
red in |- *.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G H))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G H)))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (@group_of_subgroup G H))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (@group_of_subgroup G H)) (group_monoid G) inj_subgroup)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G H)))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (@group_of_subgroup G H))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (@group_of_subgroup G H)) (group_monoid G) inj_subgroup)) y)), @Equal (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup G H)))) x y *)
auto with algebra.
Qed.
End Injection.
Hint Resolve subgroup_in_prop inj_subgroup_injective: algebra. |
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Union.
Section Inter1.
Variable E : Setoid.
Definition inter : part_set E -> part_set E -> part_set E.
Proof.
(* Goal: forall (_ : Carrier (part_set E)) (_ : Carrier (part_set E)), Carrier (part_set E) *)
intros A B.
(* Goal: Carrier (part_set E) *)
apply (Build_Predicate (Pred_fun:=fun x : E => in_part x A /\ in_part x B)).
(* Goal: @pred_compatible E (fun x : Carrier E => and (@in_part E x A) (@in_part E x B)) *)
red in |- *.
(* Goal: forall (x y : Carrier E) (_ : and (@in_part E x A) (@in_part E x B)) (_ : @Equal E y x), and (@in_part E y A) (@in_part E y B) *)
intros x y H' H'0; try assumption.
(* Goal: and (@in_part E y A) (@in_part E y B) *)
elim H'; intros H'1 H'2; try exact H'1; clear H'.
(* Goal: and (@in_part E y A) (@in_part E y B) *)
split; [ try assumption | idtac ].
(* Goal: @in_part E y B *)
(* Goal: @in_part E y A *)
apply in_part_comp_l with x; auto with algebra.
(* Goal: @in_part E y B *)
apply in_part_comp_l with x; auto with algebra.
Qed.
Lemma included_inter_l : forall A B : part_set E, included (inter A B) A.
Proof.
(* Goal: forall A B : Carrier (part_set E), @included E (inter A B) A *)
unfold included in |- *; simpl in |- *; intuition.
Qed.
Lemma included_inter_r : forall A B : part_set E, included (inter A B) B.
Proof.
(* Goal: forall A B : Carrier (part_set E), @included E (inter A B) B *)
unfold included in |- *; simpl in |- *; intuition.
Qed.
Lemma in_part_inter_l :
forall (A B : part_set E) (x : E), in_part x (inter A B) -> in_part x A.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x (inter A B)), @in_part E x A *)
simpl in |- *; intuition.
Qed.
Lemma in_part_inter_r :
forall (A B : part_set E) (x : E), in_part x (inter A B) -> in_part x B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x (inter A B)), @in_part E x B *)
simpl in |- *; intuition.
Qed.
Lemma in_part_inter :
forall (A B : part_set E) (x : E),
in_part x A -> in_part x B -> in_part x (inter A B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x A) (_ : @in_part E x B), @in_part E x (inter A B) *)
simpl in |- *.
(* Goal: forall (A B : Predicate E) (x : Carrier E) (_ : @in_part E x A) (_ : @in_part E x B), and (@in_part E x A) (@in_part E x B) *)
intuition.
Qed.
Lemma inter_not_in_l :
forall (A B : part_set E) (x : E), ~ in_part x A -> ~ in_part x (inter A B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)), not (@in_part E x (inter A B)) *)
simpl in |- *; intuition.
Qed.
Lemma inter_not_in_r :
forall (A B : part_set E) (x : E), ~ in_part x B -> ~ in_part x (inter A B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x B)), not (@in_part E x (inter A B)) *)
simpl in |- *; intuition.
Qed.
Lemma included2_inter :
forall A B C : part_set E,
included A C -> included B C -> included (inter A B) C.
Proof.
(* Goal: forall (A B C : Carrier (part_set E)) (_ : @included E A C) (_ : @included E B C), @included E (inter A B) C *)
unfold included in |- *; simpl in |- *; intuition.
Qed.
Lemma inter_comp :
forall A A' B B' : part_set E,
Equal A A' -> Equal B B' -> Equal (inter A B) (inter A' B').
Proof.
(* Goal: forall (A A' B B' : Carrier (part_set E)) (_ : @Equal (part_set E) A A') (_ : @Equal (part_set E) B B'), @Equal (part_set E) (inter A B) (inter A' B') *)
unfold inter in |- *; simpl in |- *.
(* Goal: forall (A A' B B' : Predicate E) (_ : @eq_part E A A') (_ : @eq_part E B B'), @eq_part E (@Build_Predicate E (fun x : Carrier E => and (@in_part E x A) (@in_part E x B)) (fun (x y : Carrier E) (H' : and (@in_part E x A) (@in_part E x B)) (H'0 : @Equal E y x) => @and_ind (@in_part E x A) (@in_part E x B) (and (@in_part E y A) (@in_part E y B)) (fun (H'1 : @in_part E x A) (H'2 : @in_part E x B) => @conj (@in_part E y A) (@in_part E y B) (@in_part_comp_l E A x y H'1 H'0) (@in_part_comp_l E B x y H'2 H'0)) H')) (@Build_Predicate E (fun x : Carrier E => and (@in_part E x A') (@in_part E x B')) (fun (x y : Carrier E) (H' : and (@in_part E x A') (@in_part E x B')) (H'0 : @Equal E y x) => @and_ind (@in_part E x A') (@in_part E x B') (and (@in_part E y A') (@in_part E y B')) (fun (H'1 : @in_part E x A') (H'2 : @in_part E x B') => @conj (@in_part E y A') (@in_part E y B') (@in_part_comp_l E A' x y H'1 H'0) (@in_part_comp_l E B' x y H'2 H'0)) H')) *)
unfold eq_part in |- *; simpl in |- *.
(* Goal: forall (A A' B B' : Predicate E) (_ : forall x : Carrier E, and (forall _ : @in_part E x A, @in_part E x A') (forall _ : @in_part E x A', @in_part E x A)) (_ : forall x : Carrier E, and (forall _ : @in_part E x B, @in_part E x B') (forall _ : @in_part E x B', @in_part E x B)) (x : Carrier E), and (forall _ : and (@in_part E x A) (@in_part E x B), and (@in_part E x A') (@in_part E x B')) (forall _ : and (@in_part E x A') (@in_part E x B'), and (@in_part E x A) (@in_part E x B)) *)
intros A A' B B' H' H'0 x.
(* Goal: and (forall _ : and (@in_part E x A) (@in_part E x B), and (@in_part E x A') (@in_part E x B')) (forall _ : and (@in_part E x A') (@in_part E x B'), and (@in_part E x A) (@in_part E x B)) *)
generalize (H' x) (H'0 x); tauto.
Qed.
Lemma inter_assoc :
forall A B C : part_set E, Equal (inter A (inter B C)) (inter (inter A B) C).
Proof.
(* Goal: forall A B C : Carrier (part_set E), @Equal (part_set E) (inter A (inter B C)) (inter (inter A B) C) *)
simpl in |- *.
(* Goal: forall A B C : Predicate E, @eq_part E (inter A (inter B C)) (inter (inter A B) C) *)
unfold eq_part in |- *.
(* Goal: forall (A B C : Predicate E) (x : Carrier E), and (forall _ : @in_part E x (inter A (inter B C)), @in_part E x (inter (inter A B) C)) (forall _ : @in_part E x (inter (inter A B) C), @in_part E x (inter A (inter B C))) *)
simpl in |- *.
(* Goal: forall (A B C : Predicate E) (x : Carrier E), and (forall _ : and (@in_part E x A) (and (@in_part E x B) (@in_part E x C)), and (and (@in_part E x A) (@in_part E x B)) (@in_part E x C)) (forall _ : and (and (@in_part E x A) (@in_part E x B)) (@in_part E x C), and (@in_part E x A) (and (@in_part E x B) (@in_part E x C))) *)
tauto.
Qed.
Lemma inter_com : forall A B : part_set E, Equal (inter A B) (inter B A).
Proof.
(* Goal: forall A B : Carrier (part_set E), @Equal (part_set E) (inter A B) (inter B A) *)
simpl in |- *.
(* Goal: forall A B : Predicate E, @eq_part E (inter A B) (inter B A) *)
unfold eq_part in |- *; simpl in |- *.
(* Goal: forall (A B : Predicate E) (x : Carrier E), and (forall _ : and (@in_part E x A) (@in_part E x B), and (@in_part E x B) (@in_part E x A)) (forall _ : and (@in_part E x B) (@in_part E x A), and (@in_part E x A) (@in_part E x B)) *)
tauto.
Qed.
Parameter
inter_union_dist_r :
forall A B C : part_set E,
Equal (inter (union A B) C) (union (inter A C) (inter B C)).
Parameter
inter_union_dist_l :
forall A B C : part_set E,
Equal (inter A (union B C)) (union (inter A B) (inter A C)).
End Inter1.
Hint Resolve included_inter_l included_inter_r in_part_inter_l
in_part_inter_r in_part_inter included2_inter inter_comp inter_assoc
inter_not_in_l inter_not_in_r inter_union_dist_r inter_union_dist_l:
algebra.
Hint Immediate inter_com: algebra. |
Require Export GeoCoq.Elements.OriginalProofs.lemma_crossbar.
Require Export GeoCoq.Elements.OriginalProofs.lemma_equalanglesreflexive.
Require Export GeoCoq.Elements.OriginalProofs.lemma_sameside2.
Require Export GeoCoq.Elements.OriginalProofs.proposition_07.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_crossbar2 :
forall A G H P S T,
LtA H G A H G P -> OS A P G H -> Out G H S -> Out G P T ->
exists X, BetS T X S /\ Out G A X.
Proof.
(* Goal: forall (A G H P S T : @Point Ax0) (_ : @LtA Ax0 H G A H G P) (_ : @OS Ax0 A P G H) (_ : @Out Ax0 G H S) (_ : @Out Ax0 G P T), @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (nCol G H P) by (conclude_def OS ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
let Tf:=fresh in assert (Tf:exists J K L, (BetS L K J /\ Out G H L /\ Out G P J /\ CongA H G A H G K)) by (conclude_def LtA );destruct Tf as [J[K[L]]];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (nCol H G K) by (conclude lemma_equalanglesNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (~ Col L G J).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
(* Goal: not (@Col Ax0 L G J) *)
{
(* Goal: not (@Col Ax0 L G J) *)
intro.
(* Goal: False *)
assert (Col G H L) by (conclude lemma_rayimpliescollinear).
(* Goal: False *)
assert (Col G P J) by (conclude lemma_rayimpliescollinear).
(* Goal: False *)
assert (Col L G H) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq G L) by (conclude lemma_raystrict).
(* Goal: False *)
assert (neq L G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col G J H) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col J G H) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col J G P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq G J) by (conclude lemma_raystrict).
(* Goal: False *)
assert (neq J G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col G H P) by (conclude lemma_collinear4).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Triangle L G J) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Out G J T) by (conclude lemma_ray3).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Out G L S) by (conclude lemma_ray3).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
let Tf:=fresh in assert (Tf:exists M, (Out G K M /\ BetS S M T)) by (conclude lemma_crossbar);destruct Tf as [M];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (BetS T M S) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (CongA H G K H G A) by (conclude lemma_equalanglessymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (neq G A) by (forward_using lemma_angledistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (neq G M) by (conclude lemma_raystrict).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
let Tf:=fresh in assert (Tf:exists N, (Out G A N /\ Cong G N G M)) by (conclude lemma_layoff);destruct Tf as [N];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (eq H H) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (~ eq G H).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
(* Goal: not (@eq Ax0 G H) *)
{
(* Goal: not (@eq Ax0 G H) *)
intro.
(* Goal: False *)
assert (Col G H P) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Out G H H) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (~ Col H G M).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
(* Goal: not (@Col Ax0 H G M) *)
{
(* Goal: not (@Col Ax0 H G M) *)
intro.
(* Goal: False *)
assert (Col G K M) by (conclude lemma_rayimpliescollinear).
(* Goal: False *)
assert (Col M G K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col M G H) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq G M) by (conclude lemma_raystrict).
(* Goal: False *)
assert (neq M G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col G K H) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col H G K) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (CongA H G M H G M) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Out G M K) by (conclude lemma_ray5).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (CongA H G M H G K) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (CongA H G M H G A) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (nCol H G A) by (conclude lemma_equalanglesNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (CongA H G A H G A) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (CongA H G A H G N) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (CongA H G M H G N) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (CongA H G N H G M) by (conclude lemma_equalanglessymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Cong G H G H) by (conclude cn_congruencereflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Cong H N H M) by (conclude proposition_04).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Col G G H) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (OS A T G H) by (conclude lemma_sameside2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (neq S M) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Out S M T) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Out S T M) by (conclude lemma_ray5).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Col G H S) by (conclude lemma_rayimpliescollinear).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Col G S H) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (OS A M G H) by (conclude lemma_sameside2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (OS M A G H) by (forward_using lemma_samesidesymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (OS M N G H) by (conclude lemma_sameside2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Cong N H M H) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Cong M H N H) by (conclude lemma_congruencesymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Cong N G M G) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Cong M G N G) by (conclude lemma_congruencesymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (eq M N) by (conclude proposition_07).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (eq N M) by (conclude lemma_equalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
assert (Out G A M) by (conclude cn_equalitysub).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 T X S) (@Out Ax0 G A X)) *)
close.
Qed.
End Euclid.
|
Require Import ZArith.
Require Import lemmas.
Require Import natZ.
Require Import exp.
Require Import divides.
Definition Mod (a b : Z) (n : nat) :=
exists q : Z, a = (b + Z_of_nat n * q)%Z.
Lemma modpq_modp : forall (a b : Z) (p q : nat), Mod a b (p * q) -> Mod a b p.
Proof.
(* Goal: forall (a b : Z) (p q : nat) (_ : Mod a b (Init.Nat.mul p q)), Mod a b p *)
unfold Mod in |- *.
(* Goal: forall (a b : Z) (p q : nat) (_ : @ex Z (fun q0 : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat (Init.Nat.mul p q)) q0)))), @ex Z (fun q0 : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat p) q0))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat p) q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat (Init.Nat.mul p q)) x))), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat p) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat p) q))) *)
split with (Z_of_nat q * x)%Z.
(* Goal: @eq Z a (Z.add b (Z.mul (Z.of_nat p) (Z.mul (Z.of_nat q) x))) *)
rewrite (Znat.inj_mult p q) in H0.
(* Goal: @eq Z a (Z.add b (Z.mul (Z.of_nat p) (Z.mul (Z.of_nat q) x))) *)
rewrite Zmult_assoc.
(* Goal: @eq Z a (Z.add b (Z.mul (Z.mul (Z.of_nat p) (Z.of_nat q)) x)) *)
assumption.
Qed.
Lemma mod_refl : forall (a : Z) (n : nat), Mod a a n.
Proof.
(* Goal: forall (a : Z) (n : nat), Mod a a n *)
unfold Mod in |- *.
(* Goal: forall (a : Z) (n : nat), @ex Z (fun q : Z => @eq Z a (Z.add a (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add a (Z.mul (Z.of_nat n) q))) *)
split with 0%Z.
(* Goal: @eq Z a (Z.add a (Z.mul (Z.of_nat n) Z0)) *)
rewrite <- Zmult_0_r_reverse.
(* Goal: @eq Z a (Z.add a Z0) *)
rewrite <- Zplus_0_r_reverse.
(* Goal: @eq Z a a *)
reflexivity.
Qed.
Lemma mod_sym : forall (a b : Z) (n : nat), Mod a b n -> Mod b a n.
Proof.
(* Goal: forall (a b : Z) (n : nat) (_ : Mod a b n), Mod b a n *)
unfold Mod in |- *.
(* Goal: forall (a b : Z) (n : nat) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q)))), @ex Z (fun q : Z => @eq Z b (Z.add a (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z b (Z.add a (Z.mul (Z.of_nat n) q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x))), @ex Z (fun q : Z => @eq Z b (Z.add a (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z b (Z.add a (Z.mul (Z.of_nat n) q))) *)
split with (- x)%Z.
(* Goal: @eq Z b (Z.add a (Z.mul (Z.of_nat n) (Z.opp x))) *)
simpl in |- *.
(* Goal: @eq Z b (Z.add a (Z.mul (Z.of_nat n) (Z.opp x))) *)
rewrite H0.
(* Goal: @eq Z b (Z.add (Z.add b (Z.mul (Z.of_nat n) x)) (Z.mul (Z.of_nat n) (Z.opp x))) *)
simpl in |- *.
(* Goal: @eq Z b (Z.add (Z.add b (Z.mul (Z.of_nat n) x)) (Z.mul (Z.of_nat n) (Z.opp x))) *)
rewrite Zplus_assoc_reverse.
(* Goal: @eq Z b (Z.add b (Z.add (Z.mul (Z.of_nat n) x) (Z.mul (Z.of_nat n) (Z.opp x)))) *)
rewrite <- Zmult_plus_distr_r.
(* Goal: @eq Z b (Z.add b (Z.mul (Z.of_nat n) (Z.add x (Z.opp x)))) *)
rewrite Zplus_opp_r.
(* Goal: @eq Z b (Z.add b (Z.mul (Z.of_nat n) Z0)) *)
rewrite <- Zmult_0_r_reverse.
(* Goal: @eq Z b (Z.add b Z0) *)
apply Zplus_0_r_reverse.
Qed.
Lemma mod_trans :
forall (a b c : Z) (n : nat), Mod a b n -> Mod b c n -> Mod a c n.
Proof.
(* Goal: forall (a b c : Z) (n : nat) (_ : Mod a b n) (_ : Mod b c n), Mod a c n *)
unfold Mod in |- *.
(* Goal: forall (a b c : Z) (n : nat) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q)))) (_ : @ex Z (fun q : Z => @eq Z b (Z.add c (Z.mul (Z.of_nat n) q)))), @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul (Z.of_nat n) q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x))), @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul (Z.of_nat n) q))) *)
elim H0.
(* Goal: forall (x : Z) (_ : @eq Z b (Z.add c (Z.mul (Z.of_nat n) x))) (x0 : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x0))), @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul (Z.of_nat n) q))) *)
rewrite H2.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul (Z.of_nat n) x0)) (Z.add c (Z.mul (Z.of_nat n) q))) *)
rewrite H1.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add (Z.add c (Z.mul (Z.of_nat n) x)) (Z.mul (Z.of_nat n) x0)) (Z.add c (Z.mul (Z.of_nat n) q))) *)
split with (x + x0)%Z.
(* Goal: @eq Z (Z.add (Z.add c (Z.mul (Z.of_nat n) x)) (Z.mul (Z.of_nat n) x0)) (Z.add c (Z.mul (Z.of_nat n) (Z.add x x0))) *)
rewrite Zmult_plus_distr_r.
(* Goal: @eq Z (Z.add (Z.add c (Z.mul (Z.of_nat n) x)) (Z.mul (Z.of_nat n) x0)) (Z.add c (Z.add (Z.mul (Z.of_nat n) x) (Z.mul (Z.of_nat n) x0))) *)
rewrite (Zplus_assoc c (Z_of_nat n * x) (Z_of_nat n * x0)).
(* Goal: @eq Z (Z.add (Z.add c (Z.mul (Z.of_nat n) x)) (Z.mul (Z.of_nat n) x0)) (Z.add (Z.add c (Z.mul (Z.of_nat n) x)) (Z.mul (Z.of_nat n) x0)) *)
reflexivity.
Qed.
Lemma eqmod : forall x y : Z, x = y -> forall n : nat, Mod x y n.
Proof.
(* Goal: forall (x y : Z) (_ : @eq Z x y) (n : nat), Mod x y n *)
intros.
(* Goal: Mod x y n *)
rewrite H.
(* Goal: Mod y y n *)
apply mod_refl.
Qed.
Lemma mod_plus_compat :
forall (a b c d : Z) (n : nat),
Mod a b n -> Mod c d n -> Mod (a + c) (b + d) n.
Proof.
(* Goal: forall (a b c d : Z) (n : nat) (_ : Mod a b n) (_ : Mod c d n), Mod (Z.add a c) (Z.add b d) n *)
unfold Mod in |- *.
(* Goal: forall (a b c d : Z) (n : nat) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q)))) (_ : @ex Z (fun q : Z => @eq Z c (Z.add d (Z.mul (Z.of_nat n) q)))), @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x))), @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) q))) *)
elim H0.
(* Goal: forall (x : Z) (_ : @eq Z c (Z.add d (Z.mul (Z.of_nat n) x))) (x0 : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x0))), @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) q))) *)
split with (x + x0)%Z.
(* Goal: @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) (Z.add x x0))) *)
rewrite H1.
(* Goal: @eq Z (Z.add a (Z.add d (Z.mul (Z.of_nat n) x))) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) (Z.add x x0))) *)
rewrite H2.
(* Goal: @eq Z (Z.add (Z.add b (Z.mul (Z.of_nat n) x0)) (Z.add d (Z.mul (Z.of_nat n) x))) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) (Z.add x x0))) *)
rewrite (Zplus_assoc (b + Z_of_nat n * x0) d (Z_of_nat n * x)).
(* Goal: @eq Z (Z.add (Z.add (Z.add b (Z.mul (Z.of_nat n) x0)) d) (Z.mul (Z.of_nat n) x)) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) (Z.add x x0))) *)
rewrite (Zplus_assoc_reverse b (Z_of_nat n * x0) d).
(* Goal: @eq Z (Z.add (Z.add b (Z.add (Z.mul (Z.of_nat n) x0) d)) (Z.mul (Z.of_nat n) x)) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) (Z.add x x0))) *)
rewrite (Zplus_comm (Z_of_nat n * x0) d).
(* Goal: @eq Z (Z.add (Z.add b (Z.add d (Z.mul (Z.of_nat n) x0))) (Z.mul (Z.of_nat n) x)) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) (Z.add x x0))) *)
rewrite (Zplus_comm x x0).
(* Goal: @eq Z (Z.add (Z.add b (Z.add d (Z.mul (Z.of_nat n) x0))) (Z.mul (Z.of_nat n) x)) (Z.add (Z.add b d) (Z.mul (Z.of_nat n) (Z.add x0 x))) *)
rewrite (Zmult_plus_distr_r (Z_of_nat n) x0 x).
(* Goal: @eq Z (Z.add (Z.add b (Z.add d (Z.mul (Z.of_nat n) x0))) (Z.mul (Z.of_nat n) x)) (Z.add (Z.add b d) (Z.add (Z.mul (Z.of_nat n) x0) (Z.mul (Z.of_nat n) x))) *)
rewrite Zplus_assoc.
(* Goal: @eq Z (Z.add (Z.add (Z.add b d) (Z.mul (Z.of_nat n) x0)) (Z.mul (Z.of_nat n) x)) (Z.add (Z.add b d) (Z.add (Z.mul (Z.of_nat n) x0) (Z.mul (Z.of_nat n) x))) *)
rewrite Zplus_assoc.
(* Goal: @eq Z (Z.add (Z.add (Z.add b d) (Z.mul (Z.of_nat n) x0)) (Z.mul (Z.of_nat n) x)) (Z.add (Z.add (Z.add b d) (Z.mul (Z.of_nat n) x0)) (Z.mul (Z.of_nat n) x)) *)
reflexivity.
Qed.
Lemma mod_mult_compat :
forall (a b c d : Z) (n : nat),
Mod a b n -> Mod c d n -> Mod (a * c) (b * d) n.
Proof.
(* Goal: forall (a b c d : Z) (n : nat) (_ : Mod a b n) (_ : Mod c d n), Mod (Z.mul a c) (Z.mul b d) n *)
unfold Mod in |- *.
(* Goal: forall (a b c d : Z) (n : nat) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q)))) (_ : @ex Z (fun q : Z => @eq Z c (Z.add d (Z.mul (Z.of_nat n) q)))), @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x))), @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) q))) *)
elim H0.
(* Goal: forall (x : Z) (_ : @eq Z c (Z.add d (Z.mul (Z.of_nat n) x))) (x0 : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x0))), @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) q))) *)
rewrite H1.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul a (Z.add d (Z.mul (Z.of_nat n) x))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) q))) *)
rewrite H2.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul (Z.add b (Z.mul (Z.of_nat n) x0)) (Z.add d (Z.mul (Z.of_nat n) x))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) q))) *)
split with (x0 * d + x * b + Z_of_nat n * x0 * x)%Z.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul (Z.of_nat n) x0)) (Z.add d (Z.mul (Z.of_nat n) x))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_plus_distr_r (b + Z_of_nat n * x0) d (Z_of_nat n * x)).
(* Goal: @eq Z (Z.add (Z.mul (Z.add b (Z.mul (Z.of_nat n) x0)) d) (Z.mul (Z.add b (Z.mul (Z.of_nat n) x0)) (Z.mul (Z.of_nat n) x))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite Zmult_plus_distr_l.
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.mul (Z.add b (Z.mul (Z.of_nat n) x0)) (Z.mul (Z.of_nat n) x))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite Zmult_plus_distr_l.
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.add (Z.mul b (Z.mul (Z.of_nat n) x)) (Z.mul (Z.mul (Z.of_nat n) x0) (Z.mul (Z.of_nat n) x)))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_assoc b (Z_of_nat n) x).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.add (Z.mul (Z.mul b (Z.of_nat n)) x) (Z.mul (Z.mul (Z.of_nat n) x0) (Z.mul (Z.of_nat n) x)))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_comm b (Z_of_nat n)).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.add (Z.mul (Z.mul (Z.of_nat n) b) x) (Z.mul (Z.mul (Z.of_nat n) x0) (Z.mul (Z.of_nat n) x)))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_assoc (Z_of_nat n * x0) (Z_of_nat n) x).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.add (Z.mul (Z.mul (Z.of_nat n) b) x) (Z.mul (Z.mul (Z.mul (Z.of_nat n) x0) (Z.of_nat n)) x))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_assoc_reverse (Z_of_nat n) x0 (Z_of_nat n)).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.add (Z.mul (Z.mul (Z.of_nat n) b) x) (Z.mul (Z.mul (Z.of_nat n) (Z.mul x0 (Z.of_nat n))) x))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_assoc_reverse (Z_of_nat n) (x0 * Z_of_nat n) x).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.add (Z.mul (Z.mul (Z.of_nat n) b) x) (Z.mul (Z.of_nat n) (Z.mul (Z.mul x0 (Z.of_nat n)) x)))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_assoc_reverse (Z_of_nat n) b x).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.add (Z.mul (Z.of_nat n) (Z.mul b x)) (Z.mul (Z.of_nat n) (Z.mul (Z.mul x0 (Z.of_nat n)) x)))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite <- (Zmult_plus_distr_r (Z_of_nat n) (b * x) (x0 * Z_of_nat n * x)).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul (Z.of_nat n) x0) d)) (Z.mul (Z.of_nat n) (Z.add (Z.mul b x) (Z.mul (Z.mul x0 (Z.of_nat n)) x)))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zplus_assoc_reverse (b * d)).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.add (Z.mul (Z.mul (Z.of_nat n) x0) d) (Z.mul (Z.of_nat n) (Z.add (Z.mul b x) (Z.mul (Z.mul x0 (Z.of_nat n)) x))))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_assoc_reverse (Z_of_nat n) x0 d).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.add (Z.mul (Z.of_nat n) (Z.mul x0 d)) (Z.mul (Z.of_nat n) (Z.add (Z.mul b x) (Z.mul (Z.mul x0 (Z.of_nat n)) x))))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite <- (Zmult_plus_distr_r (Z_of_nat n) (x0 * d) (b * x + x0 * Z_of_nat n * x)) .
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.mul x0 d) (Z.add (Z.mul b x) (Z.mul (Z.mul x0 (Z.of_nat n)) x))))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_comm x0 (Z_of_nat n)).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.mul x0 d) (Z.add (Z.mul b x) (Z.mul (Z.mul (Z.of_nat n) x0) x))))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite Zplus_assoc.
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul b x)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
rewrite (Zmult_comm b x).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) (Z.add (Z.mul b d) (Z.mul (Z.of_nat n) (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul (Z.of_nat n) x0) x)))) *)
reflexivity.
Qed.
Lemma mod_sqr_compat :
forall (a b : Z) (n : nat), Mod a b n -> Mod (a * a) (b * b) n.
Proof.
(* Goal: forall (a b : Z) (n : nat) (_ : Mod a b n), Mod (Z.mul a a) (Z.mul b b) n *)
intros.
(* Goal: Mod (Z.mul a a) (Z.mul b b) n *)
apply mod_mult_compat.
(* Goal: Mod a b n *)
(* Goal: Mod a b n *)
assumption.
(* Goal: Mod a b n *)
assumption.
Qed.
Lemma mod_exp_compat :
forall (a b : Z) (n : nat),
Mod a b n -> forall m : nat, Mod (Exp a m) (Exp b m) n.
Proof.
(* Goal: forall (a b : Z) (n : nat) (_ : Mod a b n) (m : nat), Mod (Exp a m) (Exp b m) n *)
simple induction m.
(* Goal: forall (n0 : nat) (_ : Mod (Exp a n0) (Exp b n0) n), Mod (Exp a (S n0)) (Exp b (S n0)) n *)
(* Goal: Mod (Exp a O) (Exp b O) n *)
simpl in |- *.
(* Goal: forall (n0 : nat) (_ : Mod (Exp a n0) (Exp b n0) n), Mod (Exp a (S n0)) (Exp b (S n0)) n *)
(* Goal: Mod (Zpos xH) (Zpos xH) n *)
apply mod_refl.
(* Goal: forall (n0 : nat) (_ : Mod (Exp a n0) (Exp b n0) n), Mod (Exp a (S n0)) (Exp b (S n0)) n *)
intros m1 IHm.
(* Goal: Mod (Exp a (S m1)) (Exp b (S m1)) n *)
simpl in |- *.
(* Goal: Mod (Z.mul a (Exp a m1)) (Z.mul b (Exp b m1)) n *)
apply mod_mult_compat.
(* Goal: Mod (Exp a m1) (Exp b m1) n *)
(* Goal: Mod a b n *)
assumption.
(* Goal: Mod (Exp a m1) (Exp b m1) n *)
assumption.
Qed.
Lemma moda0_exp_compat :
forall (a : Z) (n : nat),
n > 0 -> Mod a 0 n -> forall m : nat, m > 0 -> Mod (Exp a m) 0 n.
Proof.
(* Goal: forall (a : Z) (n : nat) (_ : gt n O) (_ : Mod a Z0 n) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 n *)
intros a n.
(* Goal: forall (_ : gt n O) (_ : Mod a Z0 n) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 n *)
case n.
(* Goal: forall (n : nat) (_ : gt (S n) O) (_ : Mod a Z0 (S n)) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 (S n) *)
(* Goal: forall (_ : gt O O) (_ : Mod a Z0 O) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 O *)
intro.
(* Goal: forall (n : nat) (_ : gt (S n) O) (_ : Mod a Z0 (S n)) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 (S n) *)
(* Goal: forall (_ : Mod a Z0 O) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 O *)
elim (lt_irrefl 0).
(* Goal: forall (n : nat) (_ : gt (S n) O) (_ : Mod a Z0 (S n)) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 (S n) *)
(* Goal: lt O O *)
assumption.
(* Goal: forall (n : nat) (_ : gt (S n) O) (_ : Mod a Z0 (S n)) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 (S n) *)
intro.
(* Goal: forall (_ : gt (S n0) O) (_ : Mod a Z0 (S n0)) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 (S n0) *)
intro.
(* Goal: forall (_ : Mod a Z0 (S n0)) (m : nat) (_ : gt m O), Mod (Exp a m) Z0 (S n0) *)
intro.
(* Goal: forall (m : nat) (_ : gt m O), Mod (Exp a m) Z0 (S n0) *)
intro.
(* Goal: forall _ : gt m O, Mod (Exp a m) Z0 (S n0) *)
case m.
(* Goal: forall (n : nat) (_ : gt (S n) O), Mod (Exp a (S n)) Z0 (S n0) *)
(* Goal: forall _ : gt O O, Mod (Exp a O) Z0 (S n0) *)
intro.
(* Goal: forall (n : nat) (_ : gt (S n) O), Mod (Exp a (S n)) Z0 (S n0) *)
(* Goal: Mod (Exp a O) Z0 (S n0) *)
elim (lt_irrefl 0).
(* Goal: forall (n : nat) (_ : gt (S n) O), Mod (Exp a (S n)) Z0 (S n0) *)
(* Goal: lt O O *)
assumption.
(* Goal: forall (n : nat) (_ : gt (S n) O), Mod (Exp a (S n)) Z0 (S n0) *)
intro m0.
(* Goal: forall _ : gt (S m0) O, Mod (Exp a (S m0)) Z0 (S n0) *)
intros.
(* Goal: Mod (Exp a (S m0)) Z0 (S n0) *)
elim H0.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add Z0 (Z.mul (Z.of_nat (S n0)) x))), Mod (Exp a (S m0)) Z0 (S n0) *)
intros.
(* Goal: Mod (Exp a (S m0)) Z0 (S n0) *)
rewrite H2.
(* Goal: Mod (Exp (Z.add Z0 (Z.mul (Z.of_nat (S n0)) x)) (S m0)) Z0 (S n0) *)
split with (x * Exp (Z_of_nat (S n0) * x) m0)%Z.
(* Goal: @eq Z (Exp (Z.add Z0 (Z.mul (Z.of_nat (S n0)) x)) (S m0)) (Z.add Z0 (Z.mul (Z.of_nat (S n0)) (Z.mul x (Exp (Z.mul (Z.of_nat (S n0)) x) m0)))) *)
rewrite Zmult_assoc.
(* Goal: @eq Z (Exp (Z.add Z0 (Z.mul (Z.of_nat (S n0)) x)) (S m0)) (Z.add Z0 (Z.mul (Z.mul (Z.of_nat (S n0)) x) (Exp (Z.mul (Z.of_nat (S n0)) x) m0))) *)
simpl in |- *.
(* Goal: @eq Z (Z.mul match x with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul (Pos.of_succ_nat n0) y') | Zneg y' => Zneg (Pos.mul (Pos.of_succ_nat n0) y') end (Exp match x with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul (Pos.of_succ_nat n0) y') | Zneg y' => Zneg (Pos.mul (Pos.of_succ_nat n0) y') end m0)) (Z.mul match x with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul (Pos.of_succ_nat n0) y') | Zneg y' => Zneg (Pos.mul (Pos.of_succ_nat n0) y') end (Exp match x with | Z0 => Z0 | Zpos y' => Zpos (Pos.mul (Pos.of_succ_nat n0) y') | Zneg y' => Zneg (Pos.mul (Pos.of_succ_nat n0) y') end m0)) *)
reflexivity.
Qed.
Lemma mod_opp_compat :
forall (a b : Z) (n : nat), Mod a b n -> Mod (- a) (- b) n.
Proof.
(* Goal: forall (a b : Z) (n : nat) (_ : Mod a b n), Mod (Z.opp a) (Z.opp b) n *)
intros.
(* Goal: Mod (Z.opp a) (Z.opp b) n *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x))), Mod (Z.opp a) (Z.opp b) n *)
intros.
(* Goal: Mod (Z.opp a) (Z.opp b) n *)
split with (- x)%Z.
(* Goal: @eq Z (Z.opp a) (Z.add (Z.opp b) (Z.mul (Z.of_nat n) (Z.opp x))) *)
rewrite H0.
(* Goal: @eq Z (Z.opp (Z.add b (Z.mul (Z.of_nat n) x))) (Z.add (Z.opp b) (Z.mul (Z.of_nat n) (Z.opp x))) *)
rewrite Zopp_eq_mult_neg_1.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul (Z.of_nat n) x)) (Zneg xH)) (Z.add (Z.opp b) (Z.mul (Z.of_nat n) (Z.opp x))) *)
rewrite Zopp_eq_mult_neg_1.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul (Z.of_nat n) x)) (Zneg xH)) (Z.add (Z.mul b (Zneg xH)) (Z.mul (Z.of_nat n) (Z.opp x))) *)
rewrite Zopp_eq_mult_neg_1.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul (Z.of_nat n) x)) (Zneg xH)) (Z.add (Z.mul b (Zneg xH)) (Z.mul (Z.of_nat n) (Z.mul x (Zneg xH)))) *)
rewrite Zmult_assoc.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul (Z.of_nat n) x)) (Zneg xH)) (Z.add (Z.mul b (Zneg xH)) (Z.mul (Z.mul (Z.of_nat n) x) (Zneg xH))) *)
rewrite <- Zmult_plus_distr_l.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul (Z.of_nat n) x)) (Zneg xH)) (Z.mul (Z.add b (Z.mul (Z.of_nat n) x)) (Zneg xH)) *)
reflexivity.
Qed.
Lemma mod_minus_compat :
forall (a b c d : Z) (n : nat),
Mod a b n -> Mod c d n -> Mod (a - c) (b - d) n.
Proof.
(* Goal: forall (a b c d : Z) (n : nat) (_ : Mod a b n) (_ : Mod c d n), Mod (Z.sub a c) (Z.sub b d) n *)
intros.
(* Goal: Mod (Z.sub a c) (Z.sub b d) n *)
unfold Zminus in |- *.
(* Goal: Mod (Z.add a (Z.opp c)) (Z.add b (Z.opp d)) n *)
apply mod_plus_compat.
(* Goal: Mod (Z.opp c) (Z.opp d) n *)
(* Goal: Mod a b n *)
assumption.
(* Goal: Mod (Z.opp c) (Z.opp d) n *)
apply mod_opp_compat.
(* Goal: Mod c d n *)
assumption.
Qed.
Lemma mod_nx_0_n : forall (n : nat) (x : Z), Mod (Z_of_nat n * x) 0 n.
Proof.
(* Goal: forall (n : nat) (x : Z), Mod (Z.mul (Z.of_nat n) x) Z0 n *)
intros.
(* Goal: Mod (Z.mul (Z.of_nat n) x) Z0 n *)
unfold Mod in |- *.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul (Z.of_nat n) x) (Z.add Z0 (Z.mul (Z.of_nat n) q))) *)
split with x.
(* Goal: @eq Z (Z.mul (Z.of_nat n) x) (Z.add Z0 (Z.mul (Z.of_nat n) x)) *)
simpl in |- *.
(* Goal: @eq Z (Z.mul (Z.of_nat n) x) (Z.mul (Z.of_nat n) x) *)
reflexivity.
Qed.
Lemma moddivmin :
forall (a b : Z) (n : nat), Mod a b n <-> Divides n (Zabs_nat (a - b)).
Proof.
(* Goal: forall (a b : Z) (n : nat), iff (Mod a b n) (Divides n (Z.abs_nat (Z.sub a b))) *)
unfold Mod, Divides in |- *.
(* Goal: forall (a b : Z) (n : nat), iff (@ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q)))) (@ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q))) *)
split.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: forall _ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))), @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)) *)
intros.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)) *)
elim H.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x))), @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)) *)
intros.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)) *)
rewrite H0.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub (Z.add b (Z.mul (Z.of_nat n) x)) b)) (Init.Nat.mul n q)) *)
unfold Zminus in |- *.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.add (Z.add b (Z.mul (Z.of_nat n) x)) (Z.opp b))) (Init.Nat.mul n q)) *)
rewrite Zplus_assoc_reverse.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.add b (Z.add (Z.mul (Z.of_nat n) x) (Z.opp b)))) (Init.Nat.mul n q)) *)
rewrite Zplus_comm.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.add (Z.add (Z.mul (Z.of_nat n) x) (Z.opp b)) b)) (Init.Nat.mul n q)) *)
rewrite Zplus_assoc_reverse.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.add (Z.mul (Z.of_nat n) x) (Z.add (Z.opp b) b))) (Init.Nat.mul n q)) *)
rewrite (Zplus_comm (- b) b).
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.add (Z.mul (Z.of_nat n) x) (Z.add b (Z.opp b)))) (Init.Nat.mul n q)) *)
rewrite Zplus_opp_r.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.add (Z.mul (Z.of_nat n) x) Z0)) (Init.Nat.mul n q)) *)
rewrite <- Zplus_0_r_reverse.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.mul (Z.of_nat n) x)) (Init.Nat.mul n q)) *)
split with (Zabs_nat x).
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq nat (Z.abs_nat (Z.mul (Z.of_nat n) x)) (Init.Nat.mul n (Z.abs_nat x)) *)
pattern n at 2 in |- *.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: (fun n0 : nat => @eq nat (Z.abs_nat (Z.mul (Z.of_nat n) x)) (Init.Nat.mul n0 (Z.abs_nat x))) n *)
rewrite <- (abs_inj n).
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq nat (Z.abs_nat (Z.mul (Z.of_nat n) x)) (Init.Nat.mul (Z.abs_nat (Z.of_nat n)) (Z.abs_nat x)) *)
apply abs_mult.
(* Goal: forall _ : @ex nat (fun q : nat => @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n q)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
elim H.
(* Goal: forall (x : nat) (_ : @eq nat (Z.abs_nat (Z.sub a b)) (Init.Nat.mul n x)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
elim (Zle_or_lt b a).
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: forall _ : Z.le b a, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
split with (Z_of_nat x).
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq Z a (Z.add b (Z.mul (Z.of_nat n) (Z.of_nat x))) *)
rewrite <- Znat.inj_mult.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq Z a (Z.add b (Z.of_nat (Init.Nat.mul n x))) *)
rewrite <- H0.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq Z a (Z.add b (Z.of_nat (Z.abs_nat (Z.sub a b)))) *)
rewrite inj_abs_pos.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.ge (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add b (Z.sub a b)) *)
unfold Zminus in |- *.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.ge (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add b (Z.add a (Z.opp b))) *)
rewrite Zplus_assoc.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.ge (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add (Z.add b a) (Z.opp b)) *)
rewrite Zplus_comm.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.ge (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add (Z.opp b) (Z.add b a)) *)
rewrite Zplus_assoc.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.ge (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add (Z.add (Z.opp b) b) a) *)
rewrite Zplus_opp_l.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.ge (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add Z0 a) *)
simpl in |- *.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.ge (Z.sub a b) Z0 *)
(* Goal: @eq Z a a *)
reflexivity.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.ge (Z.sub a b) Z0 *)
apply Zle_ge.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: Z.le Z0 (Z.sub a b) *)
replace 0%Z with (b - b)%Z.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq Z (Z.sub b b) Z0 *)
(* Goal: Z.le (Z.sub b b) (Z.sub a b) *)
unfold Zminus in |- *.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq Z (Z.sub b b) Z0 *)
(* Goal: Z.le (Z.add b (Z.opp b)) (Z.add a (Z.opp b)) *)
apply Zplus_le_compat_r.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq Z (Z.sub b b) Z0 *)
(* Goal: Z.le b a *)
assumption.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq Z (Z.sub b b) Z0 *)
unfold Zminus in |- *.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
(* Goal: @eq Z (Z.add b (Z.opp b)) Z0 *)
apply Zplus_opp_r.
(* Goal: forall _ : Z.lt a b, @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
split with (- Z_of_nat x)%Z.
(* Goal: @eq Z a (Z.add b (Z.mul (Z.of_nat n) (Z.opp (Z.of_nat x)))) *)
rewrite Zmult_comm.
(* Goal: @eq Z a (Z.add b (Z.mul (Z.opp (Z.of_nat x)) (Z.of_nat n))) *)
rewrite Zopp_mult_distr_l_reverse.
(* Goal: @eq Z a (Z.add b (Z.opp (Z.mul (Z.of_nat x) (Z.of_nat n)))) *)
rewrite <- Znat.inj_mult.
(* Goal: @eq Z a (Z.add b (Z.opp (Z.of_nat (Init.Nat.mul x n)))) *)
rewrite mult_comm.
(* Goal: @eq Z a (Z.add b (Z.opp (Z.of_nat (Nat.mul n x)))) *)
rewrite <- H0.
(* Goal: @eq Z a (Z.add b (Z.opp (Z.of_nat (Z.abs_nat (Z.sub a b))))) *)
rewrite inj_abs_neg.
(* Goal: Z.lt (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add b (Z.opp (Z.opp (Z.sub a b)))) *)
rewrite Zopp_involutive.
(* Goal: Z.lt (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add b (Z.sub a b)) *)
unfold Zminus in |- *.
(* Goal: Z.lt (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add b (Z.add a (Z.opp b))) *)
rewrite (Zplus_comm a).
(* Goal: Z.lt (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add b (Z.add (Z.opp b) a)) *)
rewrite Zplus_assoc.
(* Goal: Z.lt (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add (Z.add b (Z.opp b)) a) *)
rewrite Zplus_opp_r.
(* Goal: Z.lt (Z.sub a b) Z0 *)
(* Goal: @eq Z a (Z.add Z0 a) *)
simpl in |- *.
(* Goal: Z.lt (Z.sub a b) Z0 *)
(* Goal: @eq Z a a *)
reflexivity.
(* Goal: Z.lt (Z.sub a b) Z0 *)
replace 0%Z with (b - b)%Z.
(* Goal: @eq Z (Z.sub b b) Z0 *)
(* Goal: Z.lt (Z.sub a b) (Z.sub b b) *)
unfold Zminus in |- *.
(* Goal: @eq Z (Z.sub b b) Z0 *)
(* Goal: Z.lt (Z.add a (Z.opp b)) (Z.add b (Z.opp b)) *)
rewrite (Zplus_comm a).
(* Goal: @eq Z (Z.sub b b) Z0 *)
(* Goal: Z.lt (Z.add (Z.opp b) a) (Z.add b (Z.opp b)) *)
rewrite (Zplus_comm b).
(* Goal: @eq Z (Z.sub b b) Z0 *)
(* Goal: Z.lt (Z.add (Z.opp b) a) (Z.add (Z.opp b) b) *)
apply Zplus_lt_compat_l.
(* Goal: @eq Z (Z.sub b b) Z0 *)
(* Goal: Z.lt a b *)
assumption.
(* Goal: @eq Z (Z.sub b b) Z0 *)
unfold Zminus in |- *.
(* Goal: @eq Z (Z.add b (Z.opp b)) Z0 *)
apply Zplus_opp_r.
Qed.
Lemma moddec : forall (a b : Z) (n : nat), Mod a b n \/ ~ Mod a b n.
Proof.
(* Goal: forall (a b : Z) (n : nat), or (Mod a b n) (not (Mod a b n)) *)
intros.
(* Goal: or (Mod a b n) (not (Mod a b n)) *)
elim (moddivmin a b n).
(* Goal: forall (_ : forall _ : Mod a b n, Divides n (Z.abs_nat (Z.sub a b))) (_ : forall _ : Divides n (Z.abs_nat (Z.sub a b)), Mod a b n), or (Mod a b n) (not (Mod a b n)) *)
intros.
(* Goal: or (Mod a b n) (not (Mod a b n)) *)
elim (divdec (Zabs_nat (a - b)) n).
(* Goal: forall _ : not (Divides n (Z.abs_nat (Z.sub a b))), or (Mod a b n) (not (Mod a b n)) *)
(* Goal: forall _ : Divides n (Z.abs_nat (Z.sub a b)), or (Mod a b n) (not (Mod a b n)) *)
left.
(* Goal: forall _ : not (Divides n (Z.abs_nat (Z.sub a b))), or (Mod a b n) (not (Mod a b n)) *)
(* Goal: Mod a b n *)
apply H0.
(* Goal: forall _ : not (Divides n (Z.abs_nat (Z.sub a b))), or (Mod a b n) (not (Mod a b n)) *)
(* Goal: Divides n (Z.abs_nat (Z.sub a b)) *)
assumption.
(* Goal: forall _ : not (Divides n (Z.abs_nat (Z.sub a b))), or (Mod a b n) (not (Mod a b n)) *)
right.
(* Goal: not (Mod a b n) *)
intro.
(* Goal: False *)
elim H1.
(* Goal: Divides n (Z.abs_nat (Z.sub a b)) *)
apply H.
(* Goal: Mod a b n *)
assumption.
Qed.
Lemma mod_0not1 : forall n : nat, n > 1 -> ~ Mod 0 1 n.
Proof.
(* Goal: forall (n : nat) (_ : gt n (S O)), not (Mod Z0 (Zpos xH) n) *)
intros.
(* Goal: not (Mod Z0 (Zpos xH) n) *)
intro.
(* Goal: False *)
absurd (Divides n 1).
(* Goal: Divides n (S O) *)
(* Goal: not (Divides n (S O)) *)
intro.
(* Goal: Divides n (S O) *)
(* Goal: False *)
elim (le_not_lt n 1).
(* Goal: Divides n (S O) *)
(* Goal: lt (S O) n *)
(* Goal: le n (S O) *)
apply div_le1.
(* Goal: Divides n (S O) *)
(* Goal: lt (S O) n *)
(* Goal: Divides n (S O) *)
assumption.
(* Goal: Divides n (S O) *)
(* Goal: lt (S O) n *)
assumption.
(* Goal: Divides n (S O) *)
elim (moddivmin 0 1 n).
(* Goal: forall (_ : forall _ : Mod Z0 (Zpos xH) n, Divides n (Z.abs_nat (Z.sub Z0 (Zpos xH)))) (_ : forall _ : Divides n (Z.abs_nat (Z.sub Z0 (Zpos xH))), Mod Z0 (Zpos xH) n), Divides n (S O) *)
intros.
(* Goal: Divides n (S O) *)
apply H1.
(* Goal: Mod Z0 (Zpos xH) n *)
assumption.
Qed.
Lemma mod_exp1 :
forall (a : Z) (n : nat), Mod a 1 n -> forall m : nat, Mod (Exp a m) 1 n.
Proof.
(* Goal: forall (a : Z) (n : nat) (_ : Mod a (Zpos xH) n) (m : nat), Mod (Exp a m) (Zpos xH) n *)
intros a n H.
(* Goal: forall m : nat, Mod (Exp a m) (Zpos xH) n *)
simple induction m.
(* Goal: forall (n0 : nat) (_ : Mod (Exp a n0) (Zpos xH) n), Mod (Exp a (S n0)) (Zpos xH) n *)
(* Goal: Mod (Exp a O) (Zpos xH) n *)
simpl in |- *.
(* Goal: forall (n0 : nat) (_ : Mod (Exp a n0) (Zpos xH) n), Mod (Exp a (S n0)) (Zpos xH) n *)
(* Goal: Mod (Zpos xH) (Zpos xH) n *)
apply mod_refl.
(* Goal: forall (n0 : nat) (_ : Mod (Exp a n0) (Zpos xH) n), Mod (Exp a (S n0)) (Zpos xH) n *)
intros m1 IH.
(* Goal: Mod (Exp a (S m1)) (Zpos xH) n *)
simpl in |- *.
(* Goal: Mod (Z.mul a (Exp a m1)) (Zpos xH) n *)
replace 1%Z with (1 * 1)%Z.
(* Goal: @eq Z (Z.mul (Zpos xH) (Zpos xH)) (Zpos xH) *)
(* Goal: Mod (Z.mul a (Exp a m1)) (Z.mul (Zpos xH) (Zpos xH)) n *)
apply mod_mult_compat.
(* Goal: @eq Z (Z.mul (Zpos xH) (Zpos xH)) (Zpos xH) *)
(* Goal: Mod (Exp a m1) (Zpos xH) n *)
(* Goal: Mod a (Zpos xH) n *)
assumption.
(* Goal: @eq Z (Z.mul (Zpos xH) (Zpos xH)) (Zpos xH) *)
(* Goal: Mod (Exp a m1) (Zpos xH) n *)
apply IH.
(* Goal: @eq Z (Z.mul (Zpos xH) (Zpos xH)) (Zpos xH) *)
simpl in |- *.
(* Goal: @eq Z (Zpos xH) (Zpos xH) *)
reflexivity.
Qed.
Lemma mod_repr_non_0 :
forall (n : nat) (x : Z), (0 < x < Z_of_nat n)%Z -> ~ Mod x 0 n.
Proof.
(* Goal: forall (n : nat) (x : Z) (_ : and (Z.lt Z0 x) (Z.lt x (Z.of_nat n))), not (Mod x Z0 n) *)
intros.
(* Goal: not (Mod x Z0 n) *)
intro.
(* Goal: False *)
elim H.
(* Goal: forall (_ : Z.lt Z0 x) (_ : Z.lt x (Z.of_nat n)), False *)
intros.
(* Goal: False *)
elim (moddivmin x 0 n).
(* Goal: forall (_ : forall _ : Mod x Z0 n, Divides n (Z.abs_nat (Z.sub x Z0))) (_ : forall _ : Divides n (Z.abs_nat (Z.sub x Z0)), Mod x Z0 n), False *)
rewrite <- Zminus_0_l_reverse.
(* Goal: forall (_ : forall _ : Mod x Z0 n, Divides n (Z.abs_nat x)) (_ : forall _ : Divides n (Z.abs_nat x), Mod x Z0 n), False *)
intros.
(* Goal: False *)
elim (le_not_lt n (Zabs_nat x)).
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: le n (Z.abs_nat x) *)
apply div_le.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
(* Goal: lt O (Z.abs_nat x) *)
change (Zabs_nat 0 < Zabs_nat x) in |- *.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
(* Goal: lt (Z.abs_nat Z0) (Z.abs_nat x) *)
apply ltzlt.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
(* Goal: Z.lt Z0 x *)
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 Z0 *)
unfold Zle in |- *.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
(* Goal: Z.lt Z0 x *)
(* Goal: Z.le Z0 x *)
(* Goal: not (@eq comparison (Z.compare Z0 Z0) Gt) *)
simpl in |- *.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
(* Goal: Z.lt Z0 x *)
(* Goal: Z.le Z0 x *)
(* Goal: not (@eq comparison Eq Gt) *)
discriminate.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
(* Goal: Z.lt Z0 x *)
(* Goal: Z.le Z0 x *)
apply Zlt_le_weak.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
(* Goal: Z.lt Z0 x *)
(* Goal: Z.lt Z0 x *)
assumption.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
(* Goal: Z.lt Z0 x *)
assumption.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Divides n (Z.abs_nat x) *)
apply H3.
(* Goal: lt (Z.abs_nat x) n *)
(* Goal: Mod x Z0 n *)
assumption.
(* Goal: lt (Z.abs_nat x) n *)
rewrite <- (abs_inj n).
(* Goal: lt (Z.abs_nat x) (Z.abs_nat (Z.of_nat n)) *)
apply ltzlt.
(* Goal: Z.lt x (Z.of_nat n) *)
(* Goal: Z.le Z0 (Z.of_nat n) *)
(* Goal: Z.le Z0 x *)
apply Zlt_le_weak.
(* Goal: Z.lt x (Z.of_nat n) *)
(* Goal: Z.le Z0 (Z.of_nat n) *)
(* Goal: Z.lt Z0 x *)
assumption.
(* Goal: Z.lt x (Z.of_nat n) *)
(* Goal: Z.le Z0 (Z.of_nat n) *)
change (Z_of_nat 0 <= Z_of_nat n)%Z in |- *.
(* Goal: Z.lt x (Z.of_nat n) *)
(* Goal: Z.le (Z.of_nat O) (Z.of_nat n) *)
apply Znat.inj_le.
(* Goal: Z.lt x (Z.of_nat n) *)
(* Goal: le O n *)
apply le_O_n.
(* Goal: Z.lt x (Z.of_nat n) *)
assumption.
Qed.
Lemma mod_repr_eq :
forall (p : nat) (x y : Z),
0 < p ->
(0 < x < Z_of_nat p)%Z -> (0 < y < Z_of_nat p)%Z -> Mod x y p -> x = y.
Proof.
(* Goal: forall (p : nat) (x y : Z) (_ : lt O p) (_ : and (Z.lt Z0 x) (Z.lt x (Z.of_nat p))) (_ : and (Z.lt Z0 y) (Z.lt y (Z.of_nat p))) (_ : Mod x y p), @eq Z x y *)
intros.
(* Goal: @eq Z x y *)
unfold Mod in H2.
(* Goal: @eq Z x y *)
elim H2.
(* Goal: forall (x0 : Z) (_ : @eq Z x (Z.add y (Z.mul (Z.of_nat p) x0))), @eq Z x y *)
intros q Hq.
(* Goal: @eq Z x y *)
rewrite Hq in H0.
(* Goal: @eq Z x y *)
elim H0.
(* Goal: forall (_ : Z.lt Z0 (Z.add y (Z.mul (Z.of_nat p) q))) (_ : Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p)), @eq Z x y *)
elim H1.
(* Goal: forall (_ : Z.lt Z0 y) (_ : Z.lt y (Z.of_nat p)) (_ : Z.lt Z0 (Z.add y (Z.mul (Z.of_nat p) q))) (_ : Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p)), @eq Z x y *)
intros.
(* Goal: @eq Z x y *)
elim (Zle_or_lt 0 q).
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: forall _ : Z.le Z0 q, @eq Z x y *)
intro.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: @eq Z x y *)
elim (Zle_lt_or_eq 0 q).
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: forall _ : Z.lt Z0 q, @eq Z x y *)
intro.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: @eq Z x y *)
elim (Zlt_not_le 0 y).
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.le y Z0 *)
(* Goal: Z.lt Z0 y *)
assumption.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.le y Z0 *)
apply Zplus_le_reg_l with (Z_of_nat p).
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.le (Z.add (Z.of_nat p) y) (Z.add (Z.of_nat p) Z0) *)
rewrite (Zplus_comm (Z_of_nat p)).
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.le (Z.add y (Z.of_nat p)) (Z.add (Z.of_nat p) Z0) *)
rewrite (Zplus_comm (Z_of_nat p)).
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.le (Z.add y (Z.of_nat p)) (Z.add Z0 (Z.of_nat p)) *)
simpl in |- *.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.le (Z.add y (Z.of_nat p)) (Z.of_nat p) *)
apply Zlt_le_weak.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.of_nat p)) (Z.of_nat p) *)
apply Zle_lt_trans with (y + Z_of_nat p * q)%Z.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Z.add y (Z.of_nat p)) (Z.add y (Z.mul (Z.of_nat p) q)) *)
apply Zplus_le_compat_l.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Z.of_nat p) (Z.mul (Z.of_nat p) q) *)
pattern (Z_of_nat p) at 1 in |- *.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: (fun z : Z => Z.le z (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
rewrite <- Zmult_1_l with (Z_of_nat p).
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Z.mul (Zpos xH) (Z.of_nat p)) (Z.mul (Z.of_nat p) q) *)
rewrite (Zmult_comm 1).
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Z.mul (Z.of_nat p) (Zpos xH)) (Z.mul (Z.of_nat p) q) *)
apply Zle_mult_l.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Zpos xH) q *)
(* Goal: Z.lt Z0 (Z.of_nat p) *)
change (Z_of_nat 0 < Z_of_nat p)%Z in |- *.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Zpos xH) q *)
(* Goal: Z.lt (Z.of_nat O) (Z.of_nat p) *)
apply Znat.inj_lt.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Zpos xH) q *)
(* Goal: lt O p *)
assumption.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Zpos xH) q *)
change (Zsucc 0 <= q)%Z in |- *.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.le (Z.succ Z0) q *)
apply Zlt_le_succ.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
(* Goal: Z.lt Z0 q *)
assumption.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
(* Goal: Z.lt (Z.add y (Z.mul (Z.of_nat p) q)) (Z.of_nat p) *)
assumption.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: forall _ : @eq Z Z0 q, @eq Z x y *)
intro.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: @eq Z x y *)
rewrite <- H8 in Hq.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: @eq Z x y *)
rewrite Zmult_comm in Hq.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: @eq Z x y *)
rewrite Zplus_comm in Hq.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: @eq Z x y *)
simpl in Hq.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
(* Goal: @eq Z x y *)
assumption.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
(* Goal: Z.le Z0 q *)
assumption.
(* Goal: forall _ : Z.lt q Z0, @eq Z x y *)
intro.
(* Goal: @eq Z x y *)
elim (Zlt_not_le 0 (y + Z_of_nat p * q)).
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) q)) Z0 *)
(* Goal: Z.lt Z0 (Z.add y (Z.mul (Z.of_nat p) q)) *)
assumption.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) q)) Z0 *)
apply Zle_trans with (y + Z_of_nat p * -1)%Z.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) q)) (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) *)
apply Zplus_le_compat_l.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
(* Goal: Z.le (Z.mul (Z.of_nat p) q) (Z.mul (Z.of_nat p) (Zneg xH)) *)
apply Zle_mult_l.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
(* Goal: Z.le q (Zneg xH) *)
(* Goal: Z.lt Z0 (Z.of_nat p) *)
change (Z_of_nat 0 < Z_of_nat p)%Z in |- *.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
(* Goal: Z.le q (Zneg xH) *)
(* Goal: Z.lt (Z.of_nat O) (Z.of_nat p) *)
apply Znat.inj_lt.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
(* Goal: Z.le q (Zneg xH) *)
(* Goal: lt O p *)
assumption.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
(* Goal: Z.le q (Zneg xH) *)
apply Zlt_succ_le.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
(* Goal: Z.lt q (Z.succ (Zneg xH)) *)
simpl in |- *.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
(* Goal: Z.lt q Z0 *)
assumption.
(* Goal: Z.le (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) Z0 *)
apply Zplus_le_reg_l with (Z_of_nat p).
(* Goal: Z.le (Z.add (Z.of_nat p) (Z.add y (Z.mul (Z.of_nat p) (Zneg xH)))) (Z.add (Z.of_nat p) Z0) *)
rewrite (Zplus_comm (Z_of_nat p)).
(* Goal: Z.le (Z.add (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) (Z.of_nat p)) (Z.add (Z.of_nat p) Z0) *)
rewrite (Zplus_comm (Z_of_nat p)).
(* Goal: Z.le (Z.add (Z.add y (Z.mul (Z.of_nat p) (Zneg xH))) (Z.of_nat p)) (Z.add Z0 (Z.of_nat p)) *)
rewrite (Zmult_comm (Z_of_nat p)).
(* Goal: Z.le (Z.add (Z.add y (Z.mul (Zneg xH) (Z.of_nat p))) (Z.of_nat p)) (Z.add Z0 (Z.of_nat p)) *)
rewrite (Zopp_mult_distr_l_reverse 1).
(* Goal: Z.le (Z.add (Z.add y (Z.opp (Z.mul (Zpos xH) (Z.of_nat p)))) (Z.of_nat p)) (Z.add Z0 (Z.of_nat p)) *)
rewrite Zmult_1_l.
(* Goal: Z.le (Z.add (Z.add y (Z.opp (Z.of_nat p))) (Z.of_nat p)) (Z.add Z0 (Z.of_nat p)) *)
rewrite Zplus_assoc_reverse.
(* Goal: Z.le (Z.add y (Z.add (Z.opp (Z.of_nat p)) (Z.of_nat p))) (Z.add Z0 (Z.of_nat p)) *)
rewrite Zplus_opp_l.
(* Goal: Z.le (Z.add y Z0) (Z.add Z0 (Z.of_nat p)) *)
rewrite (Zplus_comm y 0).
(* Goal: Z.le (Z.add Z0 y) (Z.add Z0 (Z.of_nat p)) *)
simpl in |- *.
(* Goal: Z.le y (Z.of_nat p) *)
apply Zlt_le_weak.
(* Goal: Z.lt y (Z.of_nat p) *)
assumption.
Qed.
Definition ZMod (a b n : Z) := exists q : Z, a = (b + n * q)%Z.
Lemma zmodpq_modp : forall a b p q : Z, ZMod a b (p * q) -> ZMod a b p.
Proof.
(* Goal: forall (a b p q : Z) (_ : ZMod a b (Z.mul p q)), ZMod a b p *)
unfold ZMod in |- *.
(* Goal: forall (a b p q : Z) (_ : @ex Z (fun q0 : Z => @eq Z a (Z.add b (Z.mul (Z.mul p q) q0)))), @ex Z (fun q0 : Z => @eq Z a (Z.add b (Z.mul p q0))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul p q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.mul p q) x))), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul p q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul p q))) *)
split with (q * x)%Z.
(* Goal: @eq Z a (Z.add b (Z.mul p (Z.mul q x))) *)
rewrite Zmult_assoc.
(* Goal: @eq Z a (Z.add b (Z.mul (Z.mul p q) x)) *)
assumption.
Qed.
Lemma zmod_refl : forall a n : Z, ZMod a a n.
Proof.
(* Goal: forall a n : Z, ZMod a a n *)
unfold ZMod in |- *.
(* Goal: forall a n : Z, @ex Z (fun q : Z => @eq Z a (Z.add a (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add a (Z.mul n q))) *)
split with 0%Z.
(* Goal: @eq Z a (Z.add a (Z.mul n Z0)) *)
rewrite <- Zmult_0_r_reverse.
(* Goal: @eq Z a (Z.add a Z0) *)
rewrite <- Zplus_0_r_reverse.
(* Goal: @eq Z a a *)
reflexivity.
Qed.
Lemma zmod_sym : forall a b n : Z, ZMod a b n -> ZMod b a n.
Proof.
(* Goal: forall (a b n : Z) (_ : ZMod a b n), ZMod b a n *)
unfold ZMod in |- *.
(* Goal: forall (a b n : Z) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q)))), @ex Z (fun q : Z => @eq Z b (Z.add a (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z b (Z.add a (Z.mul n q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul n x))), @ex Z (fun q : Z => @eq Z b (Z.add a (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z b (Z.add a (Z.mul n q))) *)
split with (- x)%Z.
(* Goal: @eq Z b (Z.add a (Z.mul n (Z.opp x))) *)
simpl in |- *.
(* Goal: @eq Z b (Z.add a (Z.mul n (Z.opp x))) *)
rewrite H0.
(* Goal: @eq Z b (Z.add (Z.add b (Z.mul n x)) (Z.mul n (Z.opp x))) *)
simpl in |- *.
(* Goal: @eq Z b (Z.add (Z.add b (Z.mul n x)) (Z.mul n (Z.opp x))) *)
rewrite Zplus_assoc_reverse.
(* Goal: @eq Z b (Z.add b (Z.add (Z.mul n x) (Z.mul n (Z.opp x)))) *)
rewrite <- Zmult_plus_distr_r.
(* Goal: @eq Z b (Z.add b (Z.mul n (Z.add x (Z.opp x)))) *)
rewrite Zplus_opp_r.
(* Goal: @eq Z b (Z.add b (Z.mul n Z0)) *)
rewrite <- Zmult_0_r_reverse.
(* Goal: @eq Z b (Z.add b Z0) *)
apply Zplus_0_r_reverse.
Qed.
Lemma zmod_trans : forall a b c n : Z, ZMod a b n -> ZMod b c n -> ZMod a c n.
Proof.
(* Goal: forall (a b c n : Z) (_ : ZMod a b n) (_ : ZMod b c n), ZMod a c n *)
unfold ZMod in |- *.
(* Goal: forall (a b c n : Z) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q)))) (_ : @ex Z (fun q : Z => @eq Z b (Z.add c (Z.mul n q)))), @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul n q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul n x))), @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul n q))) *)
elim H0.
(* Goal: forall (x : Z) (_ : @eq Z b (Z.add c (Z.mul n x))) (x0 : Z) (_ : @eq Z a (Z.add b (Z.mul n x0))), @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add c (Z.mul n q))) *)
rewrite H2.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x0)) (Z.add c (Z.mul n q))) *)
rewrite H1.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add (Z.add c (Z.mul n x)) (Z.mul n x0)) (Z.add c (Z.mul n q))) *)
split with (x + x0)%Z.
(* Goal: @eq Z (Z.add (Z.add c (Z.mul n x)) (Z.mul n x0)) (Z.add c (Z.mul n (Z.add x x0))) *)
rewrite Zmult_plus_distr_r.
(* Goal: @eq Z (Z.add (Z.add c (Z.mul n x)) (Z.mul n x0)) (Z.add c (Z.add (Z.mul n x) (Z.mul n x0))) *)
rewrite (Zplus_assoc c (n * x) (n * x0)).
(* Goal: @eq Z (Z.add (Z.add c (Z.mul n x)) (Z.mul n x0)) (Z.add (Z.add c (Z.mul n x)) (Z.mul n x0)) *)
reflexivity.
Qed.
Lemma zeqmod : forall x y : Z, x = y -> forall n : Z, ZMod x y n.
Proof.
(* Goal: forall (x y : Z) (_ : @eq Z x y) (n : Z), ZMod x y n *)
intros.
(* Goal: ZMod x y n *)
rewrite H.
(* Goal: ZMod y y n *)
apply zmod_refl.
Qed.
Lemma zmod_plus_compat :
forall a b c d n : Z, ZMod a b n -> ZMod c d n -> ZMod (a + c) (b + d) n.
Proof.
(* Goal: forall (a b c d n : Z) (_ : ZMod a b n) (_ : ZMod c d n), ZMod (Z.add a c) (Z.add b d) n *)
unfold ZMod in |- *.
(* Goal: forall (a b c d n : Z) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q)))) (_ : @ex Z (fun q : Z => @eq Z c (Z.add d (Z.mul n q)))), @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul n q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul n x))), @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul n q))) *)
elim H0.
(* Goal: forall (x : Z) (_ : @eq Z c (Z.add d (Z.mul n x))) (x0 : Z) (_ : @eq Z a (Z.add b (Z.mul n x0))), @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul n q))) *)
split with (x + x0)%Z.
(* Goal: @eq Z (Z.add a c) (Z.add (Z.add b d) (Z.mul n (Z.add x x0))) *)
rewrite H1.
(* Goal: @eq Z (Z.add a (Z.add d (Z.mul n x))) (Z.add (Z.add b d) (Z.mul n (Z.add x x0))) *)
rewrite H2.
(* Goal: @eq Z (Z.add (Z.add b (Z.mul n x0)) (Z.add d (Z.mul n x))) (Z.add (Z.add b d) (Z.mul n (Z.add x x0))) *)
rewrite (Zplus_assoc (b + n * x0) d (n * x)).
(* Goal: @eq Z (Z.add (Z.add (Z.add b (Z.mul n x0)) d) (Z.mul n x)) (Z.add (Z.add b d) (Z.mul n (Z.add x x0))) *)
rewrite (Zplus_assoc_reverse b (n * x0) d).
(* Goal: @eq Z (Z.add (Z.add b (Z.add (Z.mul n x0) d)) (Z.mul n x)) (Z.add (Z.add b d) (Z.mul n (Z.add x x0))) *)
rewrite (Zplus_comm (n * x0) d).
(* Goal: @eq Z (Z.add (Z.add b (Z.add d (Z.mul n x0))) (Z.mul n x)) (Z.add (Z.add b d) (Z.mul n (Z.add x x0))) *)
rewrite (Zplus_comm x x0).
(* Goal: @eq Z (Z.add (Z.add b (Z.add d (Z.mul n x0))) (Z.mul n x)) (Z.add (Z.add b d) (Z.mul n (Z.add x0 x))) *)
rewrite (Zmult_plus_distr_r n x0 x).
(* Goal: @eq Z (Z.add (Z.add b (Z.add d (Z.mul n x0))) (Z.mul n x)) (Z.add (Z.add b d) (Z.add (Z.mul n x0) (Z.mul n x))) *)
rewrite Zplus_assoc.
(* Goal: @eq Z (Z.add (Z.add (Z.add b d) (Z.mul n x0)) (Z.mul n x)) (Z.add (Z.add b d) (Z.add (Z.mul n x0) (Z.mul n x))) *)
rewrite Zplus_assoc.
(* Goal: @eq Z (Z.add (Z.add (Z.add b d) (Z.mul n x0)) (Z.mul n x)) (Z.add (Z.add (Z.add b d) (Z.mul n x0)) (Z.mul n x)) *)
reflexivity.
Qed.
Lemma zmod_mult_compat :
forall a b c d n : Z, ZMod a b n -> ZMod c d n -> ZMod (a * c) (b * d) n.
Proof.
(* Goal: forall (a b c d n : Z) (_ : ZMod a b n) (_ : ZMod c d n), ZMod (Z.mul a c) (Z.mul b d) n *)
unfold ZMod in |- *.
(* Goal: forall (a b c d n : Z) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q)))) (_ : @ex Z (fun q : Z => @eq Z c (Z.add d (Z.mul n q)))), @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul n q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul n x))), @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul n q))) *)
elim H0.
(* Goal: forall (x : Z) (_ : @eq Z c (Z.add d (Z.mul n x))) (x0 : Z) (_ : @eq Z a (Z.add b (Z.mul n x0))), @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul a c) (Z.add (Z.mul b d) (Z.mul n q))) *)
rewrite H1.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul a (Z.add d (Z.mul n x))) (Z.add (Z.mul b d) (Z.mul n q))) *)
rewrite H2.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul (Z.add b (Z.mul n x0)) (Z.add d (Z.mul n x))) (Z.add (Z.mul b d) (Z.mul n q))) *)
split with (x0 * d + x * b + n * x0 * x)%Z.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul n x0)) (Z.add d (Z.mul n x))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_plus_distr_r (b + n * x0) d (n * x)).
(* Goal: @eq Z (Z.add (Z.mul (Z.add b (Z.mul n x0)) d) (Z.mul (Z.add b (Z.mul n x0)) (Z.mul n x))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite Zmult_plus_distr_l.
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.mul (Z.add b (Z.mul n x0)) (Z.mul n x))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite Zmult_plus_distr_l.
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.add (Z.mul b (Z.mul n x)) (Z.mul (Z.mul n x0) (Z.mul n x)))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_assoc b n x).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.add (Z.mul (Z.mul b n) x) (Z.mul (Z.mul n x0) (Z.mul n x)))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_comm b n).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.add (Z.mul (Z.mul n b) x) (Z.mul (Z.mul n x0) (Z.mul n x)))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_assoc (n * x0) n x).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.add (Z.mul (Z.mul n b) x) (Z.mul (Z.mul (Z.mul n x0) n) x))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_assoc_reverse n x0 n).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.add (Z.mul (Z.mul n b) x) (Z.mul (Z.mul n (Z.mul x0 n)) x))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_assoc_reverse n (x0 * n) x).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.add (Z.mul (Z.mul n b) x) (Z.mul n (Z.mul (Z.mul x0 n) x)))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_assoc_reverse n b x).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.add (Z.mul n (Z.mul b x)) (Z.mul n (Z.mul (Z.mul x0 n) x)))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite <- (Zmult_plus_distr_r n (b * x) (x0 * n * x)).
(* Goal: @eq Z (Z.add (Z.add (Z.mul b d) (Z.mul (Z.mul n x0) d)) (Z.mul n (Z.add (Z.mul b x) (Z.mul (Z.mul x0 n) x)))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zplus_assoc_reverse (b * d)).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.add (Z.mul (Z.mul n x0) d) (Z.mul n (Z.add (Z.mul b x) (Z.mul (Z.mul x0 n) x))))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_assoc_reverse n x0 d).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.add (Z.mul n (Z.mul x0 d)) (Z.mul n (Z.add (Z.mul b x) (Z.mul (Z.mul x0 n) x))))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite <- (Zmult_plus_distr_r n (x0 * d) (b * x + x0 * n * x)).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.mul x0 d) (Z.add (Z.mul b x) (Z.mul (Z.mul x0 n) x))))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_comm x0 n).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.mul x0 d) (Z.add (Z.mul b x) (Z.mul (Z.mul n x0) x))))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite Zplus_assoc.
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul b x)) (Z.mul (Z.mul n x0) x)))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
rewrite (Zmult_comm b x).
(* Goal: @eq Z (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) (Z.add (Z.mul b d) (Z.mul n (Z.add (Z.add (Z.mul x0 d) (Z.mul x b)) (Z.mul (Z.mul n x0) x)))) *)
reflexivity.
Qed.
Lemma zmod_sqr_compat :
forall a b n : Z, ZMod a b n -> ZMod (a * a) (b * b) n.
Proof.
(* Goal: forall (a b n : Z) (_ : ZMod a b n), ZMod (Z.mul a a) (Z.mul b b) n *)
intros.
(* Goal: ZMod (Z.mul a a) (Z.mul b b) n *)
apply zmod_mult_compat.
(* Goal: ZMod a b n *)
(* Goal: ZMod a b n *)
assumption.
(* Goal: ZMod a b n *)
assumption.
Qed.
Lemma zmodmod : forall a b n : Z, ZMod a b n -> Mod a b (Zabs_nat n).
Proof.
(* Goal: forall (a b n : Z) (_ : ZMod a b n), Mod a b (Z.abs_nat n) *)
unfold ZMod, Mod in |- *.
(* Goal: forall (a b n : Z) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q)))), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul n x))), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
rewrite H0.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
elim (Zle_or_lt 0 n).
(* Goal: forall _ : Z.lt n Z0, @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
(* Goal: forall _ : Z.le Z0 n, @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
intro.
(* Goal: forall _ : Z.lt n Z0, @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
rewrite inj_abs_pos.
(* Goal: forall _ : Z.lt n Z0, @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
(* Goal: Z.ge n Z0 *)
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul n q))) *)
split with x.
(* Goal: forall _ : Z.lt n Z0, @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
(* Goal: Z.ge n Z0 *)
(* Goal: @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul n x)) *)
reflexivity.
(* Goal: forall _ : Z.lt n Z0, @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
(* Goal: Z.ge n Z0 *)
apply Zle_ge.
(* Goal: forall _ : Z.lt n Z0, @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
(* Goal: Z.le Z0 n *)
assumption.
(* Goal: forall _ : Z.lt n Z0, @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
intro.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) q))) *)
rewrite inj_abs_neg.
(* Goal: Z.lt n Z0 *)
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.opp n) q))) *)
split with (- x)%Z.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul (Z.opp n) (Z.opp x))) *)
rewrite Zopp_mult_distr_l_reverse.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.opp (Z.mul n (Z.opp x)))) *)
rewrite Zopp_mult_distr_r.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul n (Z.opp (Z.opp x)))) *)
rewrite Zopp_involutive.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z (Z.add b (Z.mul n x)) (Z.add b (Z.mul n x)) *)
reflexivity.
(* Goal: Z.lt n Z0 *)
assumption.
Qed.
Lemma modzmod :
forall (a b : Z) (n : nat), Mod a b n -> ZMod a b (Z_of_nat n).
Proof.
(* Goal: forall (a b : Z) (n : nat) (_ : Mod a b n), ZMod a b (Z.of_nat n) *)
unfold Mod, ZMod in |- *.
(* Goal: forall (a b : Z) (n : nat) (_ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q)))), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat n) x))), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul (Z.of_nat n) q))) *)
rewrite H0.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.add b (Z.mul (Z.of_nat n) x)) (Z.add b (Z.mul (Z.of_nat n) q))) *)
split with x.
(* Goal: @eq Z (Z.add b (Z.mul (Z.of_nat n) x)) (Z.add b (Z.mul (Z.of_nat n) x)) *)
reflexivity.
Qed.
Lemma absmodzmod : forall a b n : Z, Mod a b (Zabs_nat n) -> ZMod a b n.
Proof.
(* Goal: forall (a b n : Z) (_ : Mod a b (Z.abs_nat n)), ZMod a b n *)
intros.
(* Goal: ZMod a b n *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul (Z.of_nat (Z.abs_nat n)) x))), ZMod a b n *)
intros q Hq.
(* Goal: ZMod a b n *)
elim Zle_or_lt with 0%Z n.
(* Goal: forall _ : Z.lt n Z0, ZMod a b n *)
(* Goal: forall _ : Z.le Z0 n, ZMod a b n *)
intro.
(* Goal: forall _ : Z.lt n Z0, ZMod a b n *)
(* Goal: ZMod a b n *)
split with q.
(* Goal: forall _ : Z.lt n Z0, ZMod a b n *)
(* Goal: @eq Z a (Z.add b (Z.mul n q)) *)
rewrite inj_abs_pos in Hq.
(* Goal: forall _ : Z.lt n Z0, ZMod a b n *)
(* Goal: Z.ge n Z0 *)
(* Goal: @eq Z a (Z.add b (Z.mul n q)) *)
assumption.
(* Goal: forall _ : Z.lt n Z0, ZMod a b n *)
(* Goal: Z.ge n Z0 *)
apply Zle_ge.
(* Goal: forall _ : Z.lt n Z0, ZMod a b n *)
(* Goal: Z.le Z0 n *)
assumption.
(* Goal: forall _ : Z.lt n Z0, ZMod a b n *)
intros.
(* Goal: ZMod a b n *)
split with (- q)%Z.
(* Goal: @eq Z a (Z.add b (Z.mul n (Z.opp q))) *)
rewrite inj_abs_neg in Hq.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z a (Z.add b (Z.mul n (Z.opp q))) *)
rewrite Zmult_comm.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z a (Z.add b (Z.mul (Z.opp q) n)) *)
rewrite Zopp_mult_distr_l_reverse.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z a (Z.add b (Z.opp (Z.mul q n))) *)
rewrite Zopp_mult_distr_l_reverse in Hq.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z a (Z.add b (Z.opp (Z.mul q n))) *)
rewrite Zmult_comm.
(* Goal: Z.lt n Z0 *)
(* Goal: @eq Z a (Z.add b (Z.opp (Z.mul n q))) *)
assumption.
(* Goal: Z.lt n Z0 *)
assumption.
Qed.
Lemma zmod_exp_compat :
forall a b n : Z, ZMod a b n -> forall m : Z, ZMod (ZExp a m) (ZExp b m) n.
Proof.
(* Goal: forall (a b n : Z) (_ : ZMod a b n) (m : Z), ZMod (ZExp a m) (ZExp b m) n *)
intros.
(* Goal: ZMod (ZExp a m) (ZExp b m) n *)
apply absmodzmod.
(* Goal: Mod (ZExp a m) (ZExp b m) (Z.abs_nat n) *)
rewrite expzexp.
(* Goal: Mod (Exp a (Z.abs_nat m)) (ZExp b m) (Z.abs_nat n) *)
rewrite expzexp.
(* Goal: Mod (Exp a (Z.abs_nat m)) (Exp b (Z.abs_nat m)) (Z.abs_nat n) *)
apply mod_exp_compat.
(* Goal: Mod a b (Z.abs_nat n) *)
apply zmodmod.
(* Goal: ZMod a b n *)
assumption.
Qed.
Lemma zmoda0_exp_compat :
forall a n : Z,
(n > 0)%Z -> ZMod a 0 n -> forall m : Z, (m > 0)%Z -> ZMod (ZExp a m) 0 n.
Proof.
(* Goal: forall (a n : Z) (_ : Z.gt n Z0) (_ : ZMod a Z0 n) (m : Z) (_ : Z.gt m Z0), ZMod (ZExp a m) Z0 n *)
intros.
(* Goal: ZMod (ZExp a m) Z0 n *)
rewrite <- (inj_abs_pos n).
(* Goal: Z.ge n Z0 *)
(* Goal: ZMod (ZExp a m) Z0 (Z.of_nat (Z.abs_nat n)) *)
apply modzmod.
(* Goal: Z.ge n Z0 *)
(* Goal: Mod (ZExp a m) Z0 (Z.abs_nat n) *)
rewrite expzexp.
(* Goal: Z.ge n Z0 *)
(* Goal: Mod (Exp a (Z.abs_nat m)) Z0 (Z.abs_nat n) *)
apply moda0_exp_compat.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
(* Goal: gt (Z.abs_nat n) O *)
change (Zabs_nat n > Zabs_nat 0) in |- *.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
(* Goal: gt (Z.abs_nat n) (Z.abs_nat Z0) *)
apply gtzgt.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
(* Goal: Z.gt n Z0 *)
(* Goal: Z.le Z0 Z0 *)
(* Goal: Z.le Z0 n *)
apply Zlt_le_weak.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
(* Goal: Z.gt n Z0 *)
(* Goal: Z.le Z0 Z0 *)
(* Goal: Z.lt Z0 n *)
apply Zgt_lt.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
(* Goal: Z.gt n Z0 *)
(* Goal: Z.le Z0 Z0 *)
(* Goal: Z.gt n Z0 *)
assumption.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
(* Goal: Z.gt n Z0 *)
(* Goal: Z.le Z0 Z0 *)
apply Zeq_le.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
(* Goal: Z.gt n Z0 *)
(* Goal: @eq Z Z0 Z0 *)
reflexivity.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
(* Goal: Z.gt n Z0 *)
assumption.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: Mod a Z0 (Z.abs_nat n) *)
apply zmodmod.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
(* Goal: ZMod a Z0 n *)
assumption.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) O *)
change (Zabs_nat m > Zabs_nat 0) in |- *.
(* Goal: Z.ge n Z0 *)
(* Goal: gt (Z.abs_nat m) (Z.abs_nat Z0) *)
apply gtzgt.
(* Goal: Z.ge n Z0 *)
(* Goal: Z.gt m Z0 *)
(* Goal: Z.le Z0 Z0 *)
(* Goal: Z.le Z0 m *)
apply Zlt_le_weak.
(* Goal: Z.ge n Z0 *)
(* Goal: Z.gt m Z0 *)
(* Goal: Z.le Z0 Z0 *)
(* Goal: Z.lt Z0 m *)
apply Zgt_lt.
(* Goal: Z.ge n Z0 *)
(* Goal: Z.gt m Z0 *)
(* Goal: Z.le Z0 Z0 *)
(* Goal: Z.gt m Z0 *)
assumption.
(* Goal: Z.ge n Z0 *)
(* Goal: Z.gt m Z0 *)
(* Goal: Z.le Z0 Z0 *)
apply Zeq_le.
(* Goal: Z.ge n Z0 *)
(* Goal: Z.gt m Z0 *)
(* Goal: @eq Z Z0 Z0 *)
reflexivity.
(* Goal: Z.ge n Z0 *)
(* Goal: Z.gt m Z0 *)
assumption.
(* Goal: Z.ge n Z0 *)
apply Zle_ge.
(* Goal: Z.le Z0 n *)
apply Zlt_le_weak.
(* Goal: Z.lt Z0 n *)
apply Zgt_lt.
(* Goal: Z.gt n Z0 *)
assumption.
Qed.
Lemma zmod_opp_compat : forall a b n : Z, ZMod a b n -> ZMod (- a) (- b) n.
Proof.
(* Goal: forall (a b n : Z) (_ : ZMod a b n), ZMod (Z.opp a) (Z.opp b) n *)
intros.
(* Goal: ZMod (Z.opp a) (Z.opp b) n *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul n x))), ZMod (Z.opp a) (Z.opp b) n *)
intros.
(* Goal: ZMod (Z.opp a) (Z.opp b) n *)
split with (- x)%Z.
(* Goal: @eq Z (Z.opp a) (Z.add (Z.opp b) (Z.mul n (Z.opp x))) *)
rewrite H0.
(* Goal: @eq Z (Z.opp (Z.add b (Z.mul n x))) (Z.add (Z.opp b) (Z.mul n (Z.opp x))) *)
rewrite Zopp_eq_mult_neg_1.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul n x)) (Zneg xH)) (Z.add (Z.opp b) (Z.mul n (Z.opp x))) *)
rewrite Zopp_eq_mult_neg_1.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul n x)) (Zneg xH)) (Z.add (Z.mul b (Zneg xH)) (Z.mul n (Z.opp x))) *)
rewrite Zopp_eq_mult_neg_1.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul n x)) (Zneg xH)) (Z.add (Z.mul b (Zneg xH)) (Z.mul n (Z.mul x (Zneg xH)))) *)
rewrite Zmult_assoc.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul n x)) (Zneg xH)) (Z.add (Z.mul b (Zneg xH)) (Z.mul (Z.mul n x) (Zneg xH))) *)
rewrite <- Zmult_plus_distr_l.
(* Goal: @eq Z (Z.mul (Z.add b (Z.mul n x)) (Zneg xH)) (Z.mul (Z.add b (Z.mul n x)) (Zneg xH)) *)
reflexivity.
Qed.
Lemma zmod_minus_compat :
forall a b c d n : Z, ZMod a b n -> ZMod c d n -> ZMod (a - c) (b - d) n.
Proof.
(* Goal: forall (a b c d n : Z) (_ : ZMod a b n) (_ : ZMod c d n), ZMod (Z.sub a c) (Z.sub b d) n *)
intros.
(* Goal: ZMod (Z.sub a c) (Z.sub b d) n *)
unfold Zminus in |- *.
(* Goal: ZMod (Z.add a (Z.opp c)) (Z.add b (Z.opp d)) n *)
apply zmod_plus_compat.
(* Goal: ZMod (Z.opp c) (Z.opp d) n *)
(* Goal: ZMod a b n *)
assumption.
(* Goal: ZMod (Z.opp c) (Z.opp d) n *)
apply zmod_opp_compat.
(* Goal: ZMod c d n *)
assumption.
Qed.
Lemma zmod_nx_0_n : forall n x : Z, ZMod (n * x) 0 n.
Proof.
(* Goal: forall n x : Z, ZMod (Z.mul n x) Z0 n *)
intros.
(* Goal: ZMod (Z.mul n x) Z0 n *)
unfold ZMod in |- *.
(* Goal: @ex Z (fun q : Z => @eq Z (Z.mul n x) (Z.add Z0 (Z.mul n q))) *)
split with x.
(* Goal: @eq Z (Z.mul n x) (Z.add Z0 (Z.mul n x)) *)
simpl in |- *.
(* Goal: @eq Z (Z.mul n x) (Z.mul n x) *)
reflexivity.
Qed.
Lemma zmoddivmin : forall a b n : Z, ZMod a b n <-> ZDivides n (a - b).
Proof.
(* Goal: forall a b n : Z, iff (ZMod a b n) (ZDivides n (Z.sub a b)) *)
unfold ZMod, Divides in |- *.
(* Goal: forall a b n : Z, iff (@ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q)))) (ZDivides n (Z.sub a b)) *)
split.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: forall _ : @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))), ZDivides n (Z.sub a b) *)
intros.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.sub a b) *)
elim H.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: forall (x : Z) (_ : @eq Z a (Z.add b (Z.mul n x))), ZDivides n (Z.sub a b) *)
intros.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.sub a b) *)
rewrite H0.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.sub (Z.add b (Z.mul n x)) b) *)
unfold Zminus in |- *.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.add (Z.add b (Z.mul n x)) (Z.opp b)) *)
rewrite Zplus_assoc_reverse.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.add b (Z.add (Z.mul n x) (Z.opp b))) *)
rewrite Zplus_comm.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.add (Z.add (Z.mul n x) (Z.opp b)) b) *)
rewrite Zplus_assoc_reverse.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.add (Z.mul n x) (Z.add (Z.opp b) b)) *)
rewrite (Zplus_comm (- b) b).
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.add (Z.mul n x) (Z.add b (Z.opp b))) *)
rewrite Zplus_opp_r.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.add (Z.mul n x) Z0) *)
rewrite <- Zplus_0_r_reverse.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: ZDivides n (Z.mul n x) *)
split with x.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
(* Goal: @eq Z (Z.mul n x) (Z.mul n x) *)
reflexivity.
(* Goal: forall _ : ZDivides n (Z.sub a b), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
elim H.
(* Goal: forall (x : Z) (_ : @eq Z (Z.sub a b) (Z.mul n x)), @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
intros.
(* Goal: @ex Z (fun q : Z => @eq Z a (Z.add b (Z.mul n q))) *)
split with x.
(* Goal: @eq Z a (Z.add b (Z.mul n x)) *)
rewrite <- H0.
(* Goal: @eq Z a (Z.add b (Z.sub a b)) *)
unfold Zminus in |- *.
(* Goal: @eq Z a (Z.add b (Z.add a (Z.opp b))) *)
rewrite Zplus_assoc.
(* Goal: @eq Z a (Z.add (Z.add b a) (Z.opp b)) *)
rewrite Zplus_comm.
(* Goal: @eq Z a (Z.add (Z.opp b) (Z.add b a)) *)
rewrite Zplus_assoc.
(* Goal: @eq Z a (Z.add (Z.add (Z.opp b) b) a) *)
rewrite Zplus_opp_l.
(* Goal: @eq Z a (Z.add Z0 a) *)
simpl in |- *.
(* Goal: @eq Z a a *)
reflexivity.
Qed.
Lemma zmoddec : forall a b n : Z, ZMod a b n \/ ~ ZMod a b n.
Proof.
(* Goal: forall a b n : Z, or (ZMod a b n) (not (ZMod a b n)) *)
intros.
(* Goal: or (ZMod a b n) (not (ZMod a b n)) *)
elim (zmoddivmin a b n).
(* Goal: forall (_ : forall _ : ZMod a b n, ZDivides n (Z.sub a b)) (_ : forall _ : ZDivides n (Z.sub a b), ZMod a b n), or (ZMod a b n) (not (ZMod a b n)) *)
intros.
(* Goal: or (ZMod a b n) (not (ZMod a b n)) *)
elim (zdivdec (a - b) n).
(* Goal: forall _ : not (ZDivides n (Z.sub a b)), or (ZMod a b n) (not (ZMod a b n)) *)
(* Goal: forall _ : ZDivides n (Z.sub a b), or (ZMod a b n) (not (ZMod a b n)) *)
left.
(* Goal: forall _ : not (ZDivides n (Z.sub a b)), or (ZMod a b n) (not (ZMod a b n)) *)
(* Goal: ZMod a b n *)
apply H0.
(* Goal: forall _ : not (ZDivides n (Z.sub a b)), or (ZMod a b n) (not (ZMod a b n)) *)
(* Goal: ZDivides n (Z.sub a b) *)
assumption.
(* Goal: forall _ : not (ZDivides n (Z.sub a b)), or (ZMod a b n) (not (ZMod a b n)) *)
right.
(* Goal: not (ZMod a b n) *)
intro.
(* Goal: False *)
elim H1.
(* Goal: ZDivides n (Z.sub a b) *)
apply H.
(* Goal: ZMod a b n *)
assumption.
Qed.
Lemma zmod_0not1 : forall n : Z, (n > 1)%Z -> ~ ZMod 0 1 n.
Proof.
(* Goal: forall (n : Z) (_ : Z.gt n (Zpos xH)), not (ZMod Z0 (Zpos xH) n) *)
intros.
(* Goal: not (ZMod Z0 (Zpos xH) n) *)
intro.
(* Goal: False *)
elim (mod_0not1 (Zabs_nat n)).
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: gt (Z.abs_nat n) (S O) *)
change (Zabs_nat n > Zabs_nat 1) in |- *.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: gt (Z.abs_nat n) (Z.abs_nat (Zpos xH)) *)
apply gtzgt.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.le Z0 n *)
apply Zlt_le_weak.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.lt Z0 n *)
apply Zlt_trans with 1%Z.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.lt (Zpos xH) n *)
(* Goal: Z.lt Z0 (Zpos xH) *)
unfold Zlt in |- *.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.lt (Zpos xH) n *)
(* Goal: @eq comparison (Z.compare Z0 (Zpos xH)) Lt *)
simpl in |- *.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.lt (Zpos xH) n *)
(* Goal: @eq comparison Lt Lt *)
reflexivity.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.lt (Zpos xH) n *)
apply Zgt_lt.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.gt n (Zpos xH) *)
assumption.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
unfold Zle in |- *.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: not (@eq comparison (Z.compare Z0 (Zpos xH)) Gt) *)
simpl in |- *.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
(* Goal: not (@eq comparison Lt Gt) *)
discriminate.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
(* Goal: Z.gt n (Zpos xH) *)
assumption.
(* Goal: Mod Z0 (Zpos xH) (Z.abs_nat n) *)
apply zmodmod.
(* Goal: ZMod Z0 (Zpos xH) n *)
assumption.
Qed.
Lemma zmod_repr_non_0 : forall n x : Z, (0 < x < n)%Z -> ~ ZMod x 0 n.
Proof.
(* Goal: forall (n x : Z) (_ : and (Z.lt Z0 x) (Z.lt x n)), not (ZMod x Z0 n) *)
intros.
(* Goal: not (ZMod x Z0 n) *)
intro.
(* Goal: False *)
elim H.
(* Goal: forall (_ : Z.lt Z0 x) (_ : Z.lt x n), False *)
intros.
(* Goal: False *)
elim (mod_repr_non_0 (Zabs_nat n) x).
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat (Z.abs_nat n))) *)
split.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.lt x (Z.of_nat (Z.abs_nat n)) *)
(* Goal: Z.lt Z0 x *)
assumption.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.lt x (Z.of_nat (Z.abs_nat n)) *)
rewrite inj_abs_pos.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.ge n Z0 *)
(* Goal: Z.lt x n *)
assumption.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.ge n Z0 *)
apply Zle_ge.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.le Z0 n *)
apply Zle_trans with x.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.le x n *)
(* Goal: Z.le Z0 x *)
apply Zlt_le_weak.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.le x n *)
(* Goal: Z.lt Z0 x *)
assumption.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.le x n *)
apply Zlt_le_weak.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
(* Goal: Z.lt x n *)
assumption.
(* Goal: Mod x Z0 (Z.abs_nat n) *)
apply zmodmod.
(* Goal: ZMod x Z0 n *)
assumption.
Qed.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Classical_Prop.
Require Export Parts.
Comments "We define here complement of a part, image of a part by a map.".
Section Complement1.
Variable E : Setoid.
Lemma not_in_comp_l :
forall (E : Setoid) (A : part_set E) (x y : E),
~ in_part x A -> Equal y x -> ~ in_part y A.
Proof.
(* Goal: forall (E : Setoid) (A : Carrier (part_set E)) (x y : Carrier E) (_ : not (@in_part E x A)) (_ : @Equal E y x), not (@in_part E y A) *)
unfold not in |- *.
(* Goal: forall (E : Setoid) (A : Carrier (part_set E)) (x y : Carrier E) (_ : forall _ : @in_part E x A, False) (_ : @Equal E y x) (_ : @in_part E y A), False *)
intros E0 A x y H' H'0 H'1; try assumption.
(* Goal: False *)
apply H'.
(* Goal: @in_part E0 x A *)
apply in_part_comp_l with y; auto with algebra.
Qed.
Lemma not_in_comp_r :
forall (E : Setoid) (A B : part_set E) (x : E),
~ in_part x A -> Equal A B -> ~ in_part x B.
Proof.
(* Goal: forall (E : Setoid) (A B : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)) (_ : @Equal (part_set E) A B), not (@in_part E x B) *)
unfold not in |- *.
(* Goal: forall (E : Setoid) (A B : Carrier (part_set E)) (x : Carrier E) (_ : forall _ : @in_part E x A, False) (_ : @Equal (part_set E) A B) (_ : @in_part E x B), False *)
intros E0 A B x H' H'0 H'1; try assumption.
(* Goal: False *)
apply H'.
(* Goal: @in_part E0 x A *)
apply in_part_comp_r with B; auto with algebra.
Qed.
Definition compl : part_set E -> part_set E.
Proof.
(* Goal: forall _ : Carrier (part_set E), Carrier (part_set E) *)
intros A.
(* Goal: Carrier (part_set E) *)
apply (Build_Predicate (Pred_fun:=fun x : E => ~ in_part x A)).
(* Goal: @pred_compatible E (fun x : Carrier E => not (@in_part E x A)) *)
red in |- *.
(* Goal: forall (x y : Carrier E) (_ : not (@in_part E x A)) (_ : @Equal E y x), not (@in_part E y A) *)
intros x y H' H'0; try assumption.
(* Goal: not (@in_part E y A) *)
apply not_in_comp_l with x; auto with algebra.
Qed.
Lemma compl_in :
forall (A : part_set E) (x : E), ~ in_part x A -> in_part x (compl A).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : not (@in_part E x A)), @in_part E x (compl A) *)
simpl in |- *; auto with algebra.
Qed.
Hint Resolve compl_in: algebra.
Lemma in_compl :
forall (A : part_set E) (x : E), in_part x (compl A) -> ~ in_part x A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x (compl A)), not (@in_part E x A) *)
simpl in |- *; auto with algebra.
Qed.
Lemma compl_comp :
forall A B : part_set E, Equal A B -> Equal (compl A) (compl B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : @Equal (part_set E) A B), @Equal (part_set E) (compl A) (compl B) *)
simpl in |- *; auto with algebra.
(* Goal: forall (A B : Predicate E) (_ : @eq_part E A B), @eq_part E (compl A) (compl B) *)
unfold eq_part in |- *; auto with algebra.
(* Goal: forall (A B : Predicate E) (_ : forall x : Carrier E, and (forall _ : @in_part E x A, @in_part E x B) (forall _ : @in_part E x B, @in_part E x A)) (x : Carrier E), and (forall _ : @in_part E x (compl A), @in_part E x (compl B)) (forall _ : @in_part E x (compl B), @in_part E x (compl A)) *)
intros A B H' x; try assumption.
(* Goal: and (forall _ : @in_part E x (compl A), @in_part E x (compl B)) (forall _ : @in_part E x (compl B), @in_part E x (compl A)) *)
elim (H' x).
(* Goal: forall (_ : forall _ : @in_part E x A, @in_part E x B) (_ : forall _ : @in_part E x B, @in_part E x A), and (forall _ : @in_part E x (compl A), @in_part E x (compl B)) (forall _ : @in_part E x (compl B), @in_part E x (compl A)) *)
simpl in |- *; unfold not in |- *.
(* Goal: forall (_ : forall _ : @in_part E x A, @in_part E x B) (_ : forall _ : @in_part E x B, @in_part E x A), and (forall (_ : forall _ : @in_part E x A, False) (_ : @in_part E x B), False) (forall (_ : forall _ : @in_part E x B, False) (_ : @in_part E x A), False) *)
intuition.
Qed.
Hint Resolve compl_comp: algebra.
Lemma compl_comp_rev :
forall A B : part_set E, Equal (compl A) (compl B) -> Equal A B.
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : @Equal (part_set E) (compl A) (compl B)), @Equal (part_set E) A B *)
simpl in |- *; auto with algebra.
(* Goal: forall (A B : Predicate E) (_ : @eq_part E (compl A) (compl B)), @eq_part E A B *)
unfold eq_part in |- *; auto with algebra.
(* Goal: forall (A B : Predicate E) (_ : forall x : Carrier E, and (forall _ : @in_part E x (compl A), @in_part E x (compl B)) (forall _ : @in_part E x (compl B), @in_part E x (compl A))) (x : Carrier E), and (forall _ : @in_part E x A, @in_part E x B) (forall _ : @in_part E x B, @in_part E x A) *)
simpl in |- *; unfold not in |- *.
(* Goal: forall (A B : Predicate E) (_ : forall x : Carrier E, and (forall (_ : forall _ : @in_part E x A, False) (_ : @in_part E x B), False) (forall (_ : forall _ : @in_part E x B, False) (_ : @in_part E x A), False)) (x : Carrier E), and (forall _ : @in_part E x A, @in_part E x B) (forall _ : @in_part E x B, @in_part E x A) *)
intros A B H' x; try assumption.
(* Goal: and (forall _ : @in_part E x A, @in_part E x B) (forall _ : @in_part E x B, @in_part E x A) *)
elim (H' x).
(* Goal: forall (_ : forall (_ : forall _ : @in_part E x A, False) (_ : @in_part E x B), False) (_ : forall (_ : forall _ : @in_part E x B, False) (_ : @in_part E x A), False), and (forall _ : @in_part E x A, @in_part E x B) (forall _ : @in_part E x B, @in_part E x A) *)
apply NNPP.
(* Goal: not (not (forall (_ : forall (_ : forall _ : @in_part E x A, False) (_ : @in_part E x B), False) (_ : forall (_ : forall _ : @in_part E x B, False) (_ : @in_part E x A), False), and (forall _ : @in_part E x A, @in_part E x B) (forall _ : @in_part E x B, @in_part E x A))) *)
tauto.
Qed.
Lemma compl_compl : forall A : part_set E, Equal (compl (compl A)) A.
Proof.
(* Goal: forall A : Carrier (part_set E), @Equal (part_set E) (compl (compl A)) A *)
simpl in |- *; auto with algebra.
(* Goal: forall A : Predicate E, @eq_part E (compl (compl A)) A *)
unfold eq_part in |- *; auto with algebra.
(* Goal: forall (A : Predicate E) (x : Carrier E), and (forall _ : @in_part E x (compl (compl A)), @in_part E x A) (forall _ : @in_part E x A, @in_part E x (compl (compl A))) *)
simpl in |- *; unfold not in |- *.
(* Goal: forall (A : Predicate E) (x : Carrier E), and (forall _ : forall _ : forall _ : @in_part E x A, False, False, @in_part E x A) (forall (_ : @in_part E x A) (_ : forall _ : @in_part E x A, False), False) *)
intros A x; try assumption.
(* Goal: and (forall _ : forall _ : forall _ : @in_part E x A, False, False, @in_part E x A) (forall (_ : @in_part E x A) (_ : forall _ : @in_part E x A, False), False) *)
split; [ try assumption | idtac ].
(* Goal: forall (_ : @in_part E x A) (_ : forall _ : @in_part E x A, False), False *)
(* Goal: forall _ : forall _ : forall _ : @in_part E x A, False, False, @in_part E x A *)
apply NNPP.
(* Goal: forall (_ : @in_part E x A) (_ : forall _ : @in_part E x A, False), False *)
tauto.
Qed.
Hint Resolve compl_compl: algebra.
Lemma compl_not_in :
forall (A : part_set E) (x : E), in_part x A -> ~ in_part x (compl A).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x A), not (@in_part E x (compl A)) *)
simpl in |- *; auto with algebra.
Qed.
Hint Resolve compl_not_in: algebra.
Lemma not_in_compl :
forall (A : part_set E) (x : E), in_part x (compl A) -> ~ in_part x A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x (compl A)), not (@in_part E x A) *)
simpl in |- *; auto with algebra.
Qed.
Lemma compl_included :
forall A B : part_set E, included A B -> included (compl B) (compl A).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : @included E A B), @included E (compl B) (compl A) *)
unfold included in |- *.
(* Goal: forall (A B : Carrier (part_set E)) (_ : forall (x : Carrier E) (_ : @in_part E x A), @in_part E x B) (x : Carrier E) (_ : @in_part E x (compl B)), @in_part E x (compl A) *)
simpl in |- *; auto with algebra.
Qed.
Lemma compl_not_compl :
forall (A : part_set E) (x : E), in_part x A \/ in_part x (compl A).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E), or (@in_part E x A) (@in_part E x (compl A)) *)
intros A x; try assumption.
(* Goal: or (@in_part E x A) (@in_part E x (compl A)) *)
simpl in |- *.
(* Goal: or (@in_part E x A) (not (@in_part E x A)) *)
unfold not in |- *.
(* Goal: or (@in_part E x A) (forall _ : @in_part E x A, False) *)
apply NNPP; intuition.
Qed.
End Complement1.
Hint Resolve compl_included compl_not_in compl_compl compl_comp compl_in:
algebra.
Section Images1.
Variable E F : Setoid.
Variable f : MAP E F.
Definition image : part_set E -> part_set F.
Proof.
(* Goal: forall _ : Carrier (part_set E), Carrier (part_set F) *)
intros A.
(* Goal: Carrier (part_set F) *)
apply (Build_Predicate (Pred_fun:=fun y : F => exists x : E, in_part x A /\ Equal y (f x))).
(* Goal: @pred_compatible F (fun y : Carrier F => @ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F y (@Ap E F f x)))) *)
red in |- *.
(* Goal: forall (x y : Carrier F) (_ : @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F x (@Ap E F f x0)))) (_ : @Equal F y x), @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F y (@Ap E F f x0))) *)
intros y y' H' H'0; try assumption.
(* Goal: @ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F y' (@Ap E F f x))) *)
elim H'; intros x E0; elim E0; intros H'1 H'2; try exact H'1; clear E0 H'.
(* Goal: @ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F y' (@Ap E F f x))) *)
exists x; split; [ try assumption | idtac ].
(* Goal: @Equal F y' (@Ap E F f x) *)
apply Trans with y; auto with algebra.
Qed.
Lemma image_in :
forall (A : part_set E) (y : F),
in_part y (image A) -> exists x : E, in_part x A /\ Equal y (f x).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (y : Carrier F) (_ : @in_part F y (image A)), @ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F y (@Ap E F f x))) *)
simpl in |- *; auto with algebra.
Qed.
Lemma in_image :
forall (A : part_set E) (x : E) (y : F),
in_part x A -> Equal y (f x) -> in_part y (image A).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (y : Carrier F) (_ : @in_part E x A) (_ : @Equal F y (@Ap E F f x)), @in_part F y (image A) *)
simpl in |- *; auto with algebra.
(* Goal: forall (A : Predicate E) (x : Carrier E) (y : Carrier F) (_ : @in_part E x A) (_ : @Equal F y (@Ap E F f x)), @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F y (@Ap E F f x0))) *)
intros A x y H' H'0; try assumption.
(* Goal: @ex (Carrier E) (fun x : Carrier E => and (@in_part E x A) (@Equal F y (@Ap E F f x))) *)
exists x; split; [ try assumption | idtac ]; auto with algebra.
Qed.
Hint Resolve in_image: algebra.
Lemma image_included :
forall A B : part_set E, included A B -> included (image A) (image B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : @included E A B), @included F (image A) (image B) *)
intros A B H'; try assumption.
(* Goal: @included F (image A) (image B) *)
unfold included in |- *.
(* Goal: forall (x : Carrier F) (_ : @in_part F x (image A)), @in_part F x (image B) *)
intros x H'0; try assumption.
(* Goal: @in_part F x (image B) *)
elim H'0.
(* Goal: forall (x0 : Carrier E) (_ : and (@in_part E x0 A) (@Equal F x (@Ap E F f x0))), @in_part F x (image B) *)
intros x0 H'1; try assumption.
(* Goal: @in_part F x (image B) *)
apply in_image with (x := x0); auto with algebra.
(* Goal: @Equal F x (@Ap E F f x0) *)
(* Goal: @in_part E x0 B *)
red in H'.
(* Goal: @Equal F x (@Ap E F f x0) *)
(* Goal: @in_part E x0 B *)
elim H'1.
(* Goal: @Equal F x (@Ap E F f x0) *)
(* Goal: forall (_ : @in_part E x0 A) (_ : @Equal F x (@Ap E F f x0)), @in_part E x0 B *)
auto with algebra.
(* Goal: @Equal F x (@Ap E F f x0) *)
elim H'1; auto with algebra.
Qed.
Hint Resolve image_included: algebra.
Lemma image_comp :
forall A B : part_set E, Equal A B -> Equal (image A) (image B).
Proof.
(* Goal: forall (A B : Carrier (part_set E)) (_ : @Equal (part_set E) A B), @Equal (part_set F) (image A) (image B) *)
intros A B H'; try assumption.
(* Goal: @Equal (part_set F) (image A) (image B) *)
apply included_antisym; auto with algebra.
Qed.
Hint Resolve image_comp: algebra.
Lemma image_in_image :
forall (A : part_set E) (x : E), in_part x A -> in_part (f x) (image A).
Proof.
(* Goal: forall (A : Carrier (part_set E)) (x : Carrier E) (_ : @in_part E x A), @in_part F (@Ap E F f x) (image A) *)
simpl in |- *; auto with algebra.
(* Goal: forall (A : Predicate E) (x : Carrier E) (_ : @in_part E x A), @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F (@Ap E F f x) (@Ap E F f x0))) *)
intros A x H'; try assumption.
(* Goal: @ex (Carrier E) (fun x0 : Carrier E => and (@in_part E x0 A) (@Equal F (@Ap E F f x) (@Ap E F f x0))) *)
exists x; split; [ try assumption | idtac ]; auto with algebra.
Qed.
Hint Resolve image_in_image: algebra.
Definition image_map := image (full E).
Let surj_set_image_fun : E -> image_map.
Proof.
(* Goal: forall _ : Carrier E, Carrier (@set_of_subtype_image F (@part F image_map)) *)
intros x; try assumption.
(* Goal: Carrier (@set_of_subtype_image F (@part F image_map)) *)
unfold image_map in |- *.
(* Goal: Carrier (@set_of_subtype_image F (@part F (image (full E)))) *)
simpl in |- *.
(* Goal: @subtype F (image (full E)) *)
cut (in_part (f x) (image (full E))).
(* Goal: @in_part F (@Ap E F f x) (image (full E)) *)
(* Goal: forall _ : @in_part F (@Ap E F f x) (image (full E)), @subtype F (image (full E)) *)
intros H'; try assumption.
(* Goal: @in_part F (@Ap E F f x) (image (full E)) *)
(* Goal: @subtype F (image (full E)) *)
apply (Build_subtype (P:=image (full E)) (subtype_elt:=f x) H').
(* Goal: @in_part F (@Ap E F f x) (image (full E)) *)
auto with algebra.
Qed.
Definition surj_set_image : MAP E image_map.
Proof.
(* Goal: Carrier (MAP E (@set_of_subtype_image F (@part F image_map))) *)
apply (Build_Map (Ap:=surj_set_image_fun)).
(* Goal: @fun_compatible E (@set_of_subtype_image F (@part F image_map)) surj_set_image_fun *)
red in |- *.
(* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal (@set_of_subtype_image F (@part F image_map)) (surj_set_image_fun x) (surj_set_image_fun y) *)
simpl in |- *.
(* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @subtype_image_equal F (@subtype F image_map) (@subtype_elt F image_map) (surj_set_image_fun x) (surj_set_image_fun y) *)
unfold subtype_image_equal in |- *.
(* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal F (@subtype_elt F image_map (surj_set_image_fun x)) (@subtype_elt F image_map (surj_set_image_fun y)) *)
simpl in |- *.
(* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal F (@Ap E F f x) (@Ap E F f y) *)
auto with algebra.
Qed.
Lemma surj_set_image_surjective : surjective surj_set_image.
Proof.
(* Goal: @surjective E (@set_of_subtype_image F (@part F image_map)) surj_set_image *)
red in |- *.
(* Goal: forall y : Carrier (@set_of_subtype_image F (@part F image_map)), @ex (Carrier E) (fun x : Carrier E => @Equal (@set_of_subtype_image F (@part F image_map)) y (@Ap E (@set_of_subtype_image F (@part F image_map)) surj_set_image x)) *)
simpl in |- *.
(* Goal: forall y : @subtype F image_map, @ex (Carrier E) (fun x : Carrier E => @subtype_image_equal F (@subtype F image_map) (@subtype_elt F image_map) y (surj_set_image_fun x)) *)
unfold subtype_image_equal in |- *.
(* Goal: forall y : @subtype F image_map, @ex (Carrier E) (fun x : Carrier E => @Equal F (@subtype_elt F image_map y) (@subtype_elt F image_map (surj_set_image_fun x))) *)
simpl in |- *.
(* Goal: forall y : @subtype F image_map, @ex (Carrier E) (fun x : Carrier E => @Equal F (@subtype_elt F image_map y) (@Ap E F f x)) *)
unfold image_map in |- *.
(* Goal: forall y : @subtype F (image (full E)), @ex (Carrier E) (fun x : Carrier E => @Equal F (@subtype_elt F (image (full E)) y) (@Ap E F f x)) *)
intros y; try assumption.
(* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F (@subtype_elt F (image (full E)) y) (@Ap E F f x)) *)
elim y.
(* Goal: forall (subtype_elt0 : Carrier F) (subtype_prf : @Pred_fun F (image (full E)) subtype_elt0), @ex (Carrier E) (fun x : Carrier E => @Equal F (@subtype_elt F (image (full E)) (@Build_subtype F (image (full E)) subtype_elt0 subtype_prf)) (@Ap E F f x)) *)
intros x' subtype_prf; try assumption.
(* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F (@subtype_elt F (image (full E)) (@Build_subtype F (image (full E)) x' subtype_prf)) (@Ap E F f x)) *)
elim subtype_prf.
(* Goal: forall (x : Carrier E) (_ : and (@in_part E x (full E)) (@Equal F x' (@Ap E F f x))), @ex (Carrier E) (fun x0 : Carrier E => @Equal F (@subtype_elt F (image (full E)) (@Build_subtype F (image (full E)) x' subtype_prf)) (@Ap E F f x0)) *)
intros x H'; try assumption.
(* Goal: @ex (Carrier E) (fun x : Carrier E => @Equal F (@subtype_elt F (image (full E)) (@Build_subtype F (image (full E)) x' subtype_prf)) (@Ap E F f x)) *)
exists x; try assumption.
(* Goal: @Equal F (@subtype_elt F (image (full E)) (@Build_subtype F (image (full E)) x' subtype_prf)) (@Ap E F f x) *)
elim H'; intros H'0 H'1; try exact H'1; clear H'.
Qed.
Let surj_part_image_fun : forall A : part_set E, A -> image A.
Proof.
(* Goal: forall (A : Carrier (part_set E)) (_ : Carrier (@set_of_subtype_image E (@part E A))), Carrier (@set_of_subtype_image F (@part F (image A))) *)
intros A x; try assumption.
(* Goal: Carrier (@set_of_subtype_image F (@part F (image A))) *)
elim x.
(* Goal: forall (subtype_elt : Carrier E) (_ : @Pred_fun E A subtype_elt), Carrier (@set_of_subtype_image F (@part F (image A))) *)
intros x' H'; try assumption.
(* Goal: Carrier (@set_of_subtype_image F (@part F (image A))) *)
cut (in_part (f x') (image A)).
(* Goal: @in_part F (@Ap E F f x') (image A) *)
(* Goal: forall _ : @in_part F (@Ap E F f x') (image A), Carrier (@set_of_subtype_image F (@part F (image A))) *)
intros H'0; try assumption.
(* Goal: @in_part F (@Ap E F f x') (image A) *)
(* Goal: Carrier (@set_of_subtype_image F (@part F (image A))) *)
simpl in |- *.
(* Goal: @in_part F (@Ap E F f x') (image A) *)
(* Goal: @subtype F (image A) *)
apply (Build_subtype (P:=image A) (subtype_elt:=f x') H'0).
(* Goal: @in_part F (@Ap E F f x') (image A) *)
auto with algebra.
Qed.
Definition surj_part_image : forall A : part_set E, MAP A (image A).
Proof.
(* Goal: forall A : Carrier (part_set E), Carrier (MAP (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A)))) *)
intros A; try assumption.
(* Goal: Carrier (MAP (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A)))) *)
apply (Build_Map (Ap:=surj_part_image_fun (A:=A))).
(* Goal: @fun_compatible (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A))) (@surj_part_image_fun A) *)
red in |- *.
(* Goal: forall (x y : Carrier (@set_of_subtype_image E (@part E A))) (_ : @Equal (@set_of_subtype_image E (@part E A)) x y), @Equal (@set_of_subtype_image F (@part F (image A))) (@surj_part_image_fun A x) (@surj_part_image_fun A y) *)
simpl in |- *.
(* Goal: forall (x y : @subtype E A) (_ : @subtype_image_equal E (@subtype E A) (@subtype_elt E A) x y), @subtype_image_equal F (@subtype F (image A)) (@subtype_elt F (image A)) (@surj_part_image_fun A x) (@surj_part_image_fun A y) *)
unfold subtype_image_equal in |- *.
(* Goal: forall (x y : @subtype E A) (_ : @Equal E (@subtype_elt E A x) (@subtype_elt E A y)), @Equal F (@subtype_elt F (image A) (@surj_part_image_fun A x)) (@subtype_elt F (image A) (@surj_part_image_fun A y)) *)
intros x y; try assumption.
(* Goal: forall _ : @Equal E (@subtype_elt E A x) (@subtype_elt E A y), @Equal F (@subtype_elt F (image A) (@surj_part_image_fun A x)) (@subtype_elt F (image A) (@surj_part_image_fun A y)) *)
elim x.
(* Goal: forall (subtype_elt0 : Carrier E) (subtype_prf : @Pred_fun E A subtype_elt0) (_ : @Equal E (@subtype_elt E A (@Build_subtype E A subtype_elt0 subtype_prf)) (@subtype_elt E A y)), @Equal F (@subtype_elt F (image A) (@surj_part_image_fun A (@Build_subtype E A subtype_elt0 subtype_prf))) (@subtype_elt F (image A) (@surj_part_image_fun A y)) *)
elim y.
(* Goal: forall (subtype_elt0 : Carrier E) (subtype_prf : @Pred_fun E A subtype_elt0) (subtype_elt1 : Carrier E) (subtype_prf0 : @Pred_fun E A subtype_elt1) (_ : @Equal E (@subtype_elt E A (@Build_subtype E A subtype_elt1 subtype_prf0)) (@subtype_elt E A (@Build_subtype E A subtype_elt0 subtype_prf))), @Equal F (@subtype_elt F (image A) (@surj_part_image_fun A (@Build_subtype E A subtype_elt1 subtype_prf0))) (@subtype_elt F (image A) (@surj_part_image_fun A (@Build_subtype E A subtype_elt0 subtype_prf))) *)
simpl in |- *.
(* Goal: forall (subtype_elt : Carrier E) (_ : @Pred_fun E A subtype_elt) (subtype_elt0 : Carrier E) (_ : @Pred_fun E A subtype_elt0) (_ : @Equal E subtype_elt0 subtype_elt), @Equal F (@Ap E F f subtype_elt0) (@Ap E F f subtype_elt) *)
auto with algebra.
Qed.
Lemma surj_part_image_surjective :
forall A : part_set E, surjective (surj_part_image A).
Proof.
(* Goal: forall A : Carrier (part_set E), @surjective (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A))) (surj_part_image A) *)
red in |- *.
(* Goal: forall (A : Carrier (part_set E)) (y : Carrier (@set_of_subtype_image F (@part F (image A)))), @ex (Carrier (@set_of_subtype_image E (@part E A))) (fun x : Carrier (@set_of_subtype_image E (@part E A)) => @Equal (@set_of_subtype_image F (@part F (image A))) y (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A))) (surj_part_image A) x)) *)
intros A y; try assumption.
(* Goal: @ex (Carrier (@set_of_subtype_image E (@part E A))) (fun x : Carrier (@set_of_subtype_image E (@part E A)) => @Equal (@set_of_subtype_image F (@part F (image A))) y (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A))) (surj_part_image A) x)) *)
case (image_in (subtype_prf y)).
(* Goal: forall (x : Carrier E) (_ : and (@in_part E x A) (@Equal F (@subtype_elt F (image A) y) (@Ap E F f x))), @ex (Carrier (@set_of_subtype_image E (@part E A))) (fun x0 : Carrier (@set_of_subtype_image E (@part E A)) => @Equal (@set_of_subtype_image F (@part F (image A))) y (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A))) (surj_part_image A) x0)) *)
intros x H'; try assumption.
(* Goal: @ex (Carrier (@set_of_subtype_image E (@part E A))) (fun x : Carrier (@set_of_subtype_image E (@part E A)) => @Equal (@set_of_subtype_image F (@part F (image A))) y (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A))) (surj_part_image A) x)) *)
elim H'; intros H'0 H'1; try exact H'1; clear H'.
(* Goal: @ex (Carrier (@set_of_subtype_image E (@part E A))) (fun x : Carrier (@set_of_subtype_image E (@part E A)) => @Equal (@set_of_subtype_image F (@part F (image A))) y (@Ap (@set_of_subtype_image E (@part E A)) (@set_of_subtype_image F (@part F (image A))) (surj_part_image A) x)) *)
exists (Build_subtype H'0); try assumption.
Qed.
End Images1.
Hint Resolve in_image image_included image_comp image_in_image
surj_set_image_surjective surj_part_image_surjective: algebra.
|
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 hexDigitToN (c : ascii) : option N :=
match c with
| "0" => Some 0
| "1" => Some 1
| "2" => Some 2
| "3" => Some 3
| "4" => Some 4
| "5" => Some 5
| "6" => Some 6
| "7" => Some 7
| "8" => Some 8
| "9" => Some 9
| "a" | "A" => Some 10
| "b" | "B" => Some 11
| "c" | "C" => Some 12
| "d" | "D" => Some 13
| "e" | "E" => Some 14
| "f" | "F" => Some 15
| _ => None
end.
Local Open Scope string_scope.
Fixpoint readHexNAux (s : string) (acc : N) : option N :=
match s with
| "" => Some acc
| String c s' =>
match hexDigitToN c with
| Some n => readHexNAux s' (16 * acc + n)
| None => None
end
end.
Definition readHexN (s : string) : option N := readHexNAux s 0.
Goal readHexN "ff" = 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 hex (s : string) := forceOption N parseError (readHexN s) ParseError.
Goal hex"ff" = 255.
Goal hex"a0f" = 2575.
Goal hex"1O" = ParseError.
Goal hex"ff34c8e3" = 4281649379.
Local Close Scope string_scope.
Local Close Scope N_scope.
Definition binDigitToNat (c : ascii) : option nat :=
match c with
| "0" => Some 0
| "1" => Some 1
| _ => None
end.
Open Scope string_scope.
Fixpoint readBinAux (s : string) (acc : nat) : option nat :=
match s with
| "" => Some acc
| String c s' =>
match binDigitToNat c with
| Some n => readBinAux s' (2 * acc + n)
| None => None
end
end.
Definition readBinNat (s : string) : option nat := readBinAux s 0.
Goal readBinNat "01" = Some 1.
Definition bin (s : string) := @forceOption nat parseError (readBinNat s) ParseError.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq div fintype finset.
From mathcomp
Require Import prime fingroup morphism automorphism quotient action gproduct.
From mathcomp
Require Import gfunctor commutator center pgroup finmodule nilpotent sylow.
From mathcomp
Require Import abelian maximal.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Section Hall.
Implicit Type gT : finGroupType.
Theorem SchurZassenhaus_split gT (G H : {group gT}) :
Hall G H -> H <| G -> [splits G, over H].
Theorem SchurZassenhaus_trans_sol gT (H K K1 : {group gT}) :
solvable H -> K \subset 'N(H) -> K1 \subset H * K ->
coprime #|H| #|K| -> #|K1| = #|K| ->
exists2 x, x \in H & K1 :=: K :^ x.
Proof.
(* Goal: forall (_ : is_true (@solvable 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 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)) (@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 K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) (_ : @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 K1)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K1) (@conjugate gT (@gval gT K) x)) *)
move: {2}_.+1 (ltnSn #|H|) => n; elim: n => // n IHn in gT H K K1 *.
rewrite ltnS => leHn solH nHK; have [-> | ] := eqsVneq H 1.
rewrite mul1g => sK1K _ eqK1K; exists 1; first exact: set11.
by apply/eqP; rewrite conjsg1 eqEcard sK1K eqK1K /=.
pose G := (H <*> K)%G.
(* Goal: forall (_ : is_true (@solvable 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 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)) (@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 K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) (_ : @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 K1)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K1) (@conjugate gT (@gval gT K) x)) *)
have defG: G :=: H * K by rewrite -normC // -norm_joinEl // joingC.
have sHG: H \subset G by apply: joing_subl.
(* Goal: forall (_ : is_true (@solvable 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 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)) (@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 K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) (_ : @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 K1)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K1) (@conjugate gT (@gval gT K) x)) *)
have sKG: K \subset G by apply: joing_subr.
(* Goal: forall (_ : is_true (@solvable 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 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)) (@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 K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) (_ : @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 K1)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K1) (@conjugate gT (@gval gT K) x)) *)
have nsHG: H <| G by rewrite /(H <| G) sHG join_subG normG.
case/(solvable_norm_abelem solH nsHG)=> M [sMH nsMG ntM] /and3P[_ abelM _].
have [sMG nMG] := andP nsMG; rewrite -defG => sK1G coHK oK1K.
have nMsG (L : {set gT}): L \subset G -> L \subset 'N(M).
by move/subset_trans->.
have [coKM coHMK]: coprime #|M| #|K| /\ coprime #|H / M| #|K|.
by apply/andP; rewrite -coprime_mull card_quotient ?nMsG ?Lagrange.
have oKM (K' : {group gT}): K' \subset G -> #|K'| = #|K| -> #|K' / M| = #|K|.
move=> sK'G oK'.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) (_ : @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 K1)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K1) (@conjugate gT (@gval gT K) x)) *)
rewrite -quotientMidr -?norm_joinEl ?card_quotient ?nMsG //; last first.
by rewrite gen_subG subUset sK'G.
rewrite -divgS /=; last by rewrite -gen_subG genS ?subsetUr.
by rewrite norm_joinEl ?nMsG // coprime_cardMg ?mulnK // oK' coprime_sym.
have [xb]: exists2 xb, xb \in H / M & K1 / M = (K / M) :^ xb.
apply: IHn; try by rewrite (quotient_sol, morphim_norms, oKM K) ?(oKM K1).
by apply: leq_trans leHn; rewrite ltn_quotient.
by rewrite -morphimMl ?nMsG // -defG morphimS.
case/morphimP=> x nMx Hx ->{xb} eqK1Kx; pose K2 := (K :^ x)%G.
have{eqK1Kx} eqK12: K1 / M = K2 / M by rewrite quotientJ.
suff [y My ->]: exists2 y, y \in M & K1 :=: K2 :^ y.
by exists (x * y); [rewrite groupMl // (subsetP sMH) | rewrite conjsgM].
have nMK1: K1 \subset 'N(M) by apply: nMsG.
have defMK: M * K1 = M <*> K1 by rewrite -normC // -norm_joinEl // joingC.
have sMKM: M \subset M <*> K1 by rewrite joing_subl.
have nMKM: M <| M <*> K1 by rewrite normalYl.
have trMK1: M :&: K1 = 1 by rewrite coprime_TIg ?oK1K.
have trMK2: M :&: K2 = 1 by rewrite coprime_TIg ?cardJg ?oK1K.
apply: (Gaschutz_transitive nMKM _ sMKM) => //=; last 2 first.
-
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) (_ : @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 K1)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K1) (@conjugate gT (@gval gT K) x)) *)
by rewrite inE trMK1 defMK !eqxx.
-
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) (_ : @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 K1)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K1) (@conjugate gT (@gval gT K) x)) *)
by rewrite -!(setIC M) trMK1.
-
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) (_ : @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 K1)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K1) (@conjugate gT (@gval gT K) x)) *)
by rewrite -divgS //= -defMK coprime_cardMg oK1K // mulKn.
rewrite inE trMK2 eqxx eq_sym eqEcard /= -defMK andbC.
by rewrite !coprime_cardMg ?cardJg ?oK1K ?leqnn //= mulGS -quotientSK -?eqK12.
Qed.
Qed.
Lemma SchurZassenhaus_trans_actsol gT (G A B : {group gT}) :
solvable A -> A \subset 'N(G) -> B \subset A <*> G ->
coprime #|G| #|A| -> #|A| = #|B| ->
exists2 x, x \in G & B :=: A :^ x.
Lemma Hall_exists_subJ pi gT (G : {group gT}) :
solvable G -> exists2 H : {group gT}, pi.-Hall(G) H
End Hall.
Section HallCorollaries.
Variable gT : finGroupType.
Corollary Hall_exists pi (G : {group gT}) :
solvable G -> exists H : {group gT}, pi.-Hall(G) H.
Proof.
(* Goal: forall _ : is_true (@solvable gT (@gval gT G)), @ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) *)
by case/(Hall_exists_subJ pi) => H; exists H.
Qed.
Corollary Hall_trans pi (G H1 H2 : {group gT}) :
solvable G -> pi.-Hall(G) H1 -> pi.-Hall(G) H2 ->
Proof.
(* Goal: forall (_ : is_true (@solvable gT (@gval gT G))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
move=> solG; have [H hallH transH] := Hall_exists_subJ pi solG.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
have conjH (K : {group gT}): pi.-Hall(G) K -> exists2 x, x \in G & K = (H :^ x)%G.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
(* Goal: forall _ : is_true (@pHall gT pi (@gval gT G) (@gval gT K)), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K (@conjG_group gT H x)) *)
-
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
(* Goal: forall _ : is_true (@pHall gT pi (@gval gT G) (@gval gT K)), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K (@conjG_group gT H x)) *)
move=> hallK; have [sKG piK _] := and3P hallK.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K (@conjG_group gT H x)) *)
case: (transH K sKG piK) => x Gx sKH; exists x => //.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
(* Goal: @eq (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) K (@conjG_group gT H x) *)
apply/eqP; rewrite -val_eqE eqEcard sKH cardJg.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
(* Goal: is_true (andb true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@val (Equality.sort (group_set_eqType (FinGroup.base gT))) (@group_set gT) (group_of_subType gT) K)))))) *)
by rewrite (card_Hall hallH) (card_Hall hallK) /=.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
case/conjH=> x1 Gx1 ->{H1}; case/conjH=> x2 Gx2 ->{H2}.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT (@conjG_group gT H x1)) (@conjugate gT (@gval gT (@conjG_group gT H x2)) x)) *)
exists (x2^-1 * x1); first by rewrite groupMl ?groupV.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT (@conjG_group gT H x1)) (@conjugate gT (@gval gT (@conjG_group gT H x2)) (@mulg (FinGroup.base gT) (@invg (FinGroup.base gT) x2) x1)) *)
by apply: val_inj; rewrite /= conjsgM conjsgK.
Qed.
Corollary Hall_superset pi (G K : {group gT}) :
solvable G -> K \subset G -> pi.-group K ->
Proof.
(* Goal: forall (_ : is_true (@solvable 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 K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@pgroup gT pi (@gval gT K))), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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 H))))) *)
move=> solG sKG; have [H hallH transH] := Hall_exists_subJ pi solG.
(* Goal: forall _ : is_true (@pgroup gT pi (@gval gT K)), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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 H))))) *)
by case/transH=> // x Gx sKHx; exists (H :^ x)%G; rewrite ?pHallJ.
Qed.
Corollary Hall_subJ pi (G H K : {group gT}) :
solvable G -> pi.-Hall(G) H -> K \subset G -> pi.-group K ->
Proof.
(* Goal: forall (_ : is_true (@solvable gT (@gval gT G))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@pgroup gT pi (@gval gT K))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT H) x))))) *)
move=> solG HallH sKG piK; have [M HallM sKM]:= Hall_superset solG sKG piK.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT H) x))))) *)
have [x Gx defM] := Hall_trans solG HallM HallH.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => 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.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT H) x))))) *)
by exists x; rewrite // -defM.
Qed.
Corollary Hall_Jsub pi (G H K : {group gT}) :
solvable G -> pi.-Hall(G) H -> K \subset G -> pi.-group K ->
Proof.
(* Goal: forall (_ : is_true (@solvable gT (@gval gT G))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@pgroup gT pi (@gval gT K))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@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 (@gval gT K) 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))))) *)
move=> solG HallH sKG piK; have [x Gx sKHx] := Hall_subJ solG HallH sKG piK.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@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 (@gval gT K) x))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *)
by exists x^-1; rewrite ?groupV // sub_conjgV.
Qed.
Lemma Hall_Frattini_arg pi (G K H : {group gT}) :
solvable K -> K <| G -> pi.-Hall(K) H -> K * 'N_G(H) = G.
End HallCorollaries.
Section InternalAction.
Variables (pi : nat_pred) (gT : finGroupType).
Implicit Types G H K A X : {group gT}.
Lemma coprime_norm_cent A G :
A \subset 'N(G) -> coprime #|G| #|A| -> 'N_G(A) = 'C_G(A).
Proposition coprime_Hall_exists A G :
A \subset 'N(G) -> coprime #|G| #|A| -> solvable G ->
exists2 H : {group gT}, pi.-Hall(G) H & A \subset 'N(H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval 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 (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))))) (_ : is_true (@solvable gT (@gval gT G))), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
move=> nGA coGA solG; have [H hallH] := Hall_exists pi solG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have sG_AG: G \subset A <*> G by rewrite joing_subr.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have nG_AG: A <*> G \subset 'N(G) by rewrite join_subG nGA normG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
pose N := 'N_(A <*> G)(H)%G.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have nGN: N \subset 'N(G) by rewrite subIset ?nG_AG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have nGN_N: G :&: N <| N by rewrite /(_ <| N) subsetIr normsI ?normG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have NG_AG: G * N = A <*> G.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT N)) (@joing gT (@gval gT A) (@gval gT G)) *)
by apply: Hall_Frattini_arg hallH => //; apply/andP.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have iGN_A: #|N| %/ #|G :&: N| = #|A|.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
(* Goal: @eq nat (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT N)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT N)))))) (@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 A)))) *)
rewrite setIC divgI -card_quotient // -quotientMidl NG_AG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
(* Goal: @eq nat (@card (@coset_finType gT (@gval gT G)) (@mem (Finite.sort (@coset_finType gT (@gval gT G))) (predPredType (Finite.sort (@coset_finType gT (@gval gT G)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT G)) (@quotient gT (@joing gT (@gval gT A) (@gval gT G)) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))) *)
rewrite card_quotient -?divgS //= norm_joinEl //.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
(* Goal: @eq nat (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT A) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@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 A)))) *)
by rewrite coprime_cardMg 1?coprime_sym // mulnK.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have hallGN: Hall N (G :&: N).
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
(* Goal: is_true (@Hall gT (@gval gT N) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT N))) *)
by rewrite /Hall -divgS subsetIr //= iGN_A (coprimeSg _ coGA) ?subsetIl.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
case/splitsP: {hallGN nGN_N}(SchurZassenhaus_split hallGN nGN_N) => B.
(* Goal: forall _ : is_true (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) B (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) (@complements_to_in gT (@gval gT (@setI_group gT G N)) (@gval gT N))))), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
case/complP=> trBGN defN.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have{trBGN iGN_A} oBA: #|B| = #|A|.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
(* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT B)))) (@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 A)))) *)
by rewrite -iGN_A -{1}defN (TI_cardMg trBGN) mulKn.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
have sBN: B \subset N by rewrite -defN mulG_subr.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
case: (SchurZassenhaus_trans_sol solG nGA _ coGA oBA) => [|x Gx defB].
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
(* 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 B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT A))))) *)
by rewrite -(normC nGA) -norm_joinEl // -NG_AG -(mul1g B) mulgSS ?sub1G.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun 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 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)))))) *)
exists (H :^ x^-1)%G; first by rewrite pHallJ ?groupV.
(* 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 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 (@conjG_group gT H (@invg (FinGroup.base gT) x))))))) *)
apply/subsetP=> y Ay; have: y ^ x \in B by rewrite defB memJ_conjg.
(* Goal: forall _ : is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT y x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT B)))), 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 (@conjG_group gT H (@invg (FinGroup.base gT) x))))))) *)
move/(subsetP sBN)=> /setIP[_ /normP nHyx].
(* 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 (@conjG_group gT H (@invg (FinGroup.base gT) x))))))) *)
by apply/normP; rewrite -conjsgM conjgCV invgK conjsgM nHyx.
Qed.
Proposition coprime_Hall_trans A G H1 H2 :
A \subset 'N(G) -> coprime #|G| #|A| -> solvable G ->
pi.-Hall(G) H1 -> A \subset 'N(H1) ->
Lemma norm_conj_cent A G x : x \in 'C(A) ->
(A \subset 'N(G :^ x)) = (A \subset 'N(G)).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT A))))), @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 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 (@conjugate gT (@gval gT G) x))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT G))))) *)
by move=> cAx; rewrite norm_conj_norm ?(subsetP (cent_sub A)).
Qed.
Lemma strongest_coprime_quotient_cent A G H :
let R := H :&: [~: G, A] in
A \subset 'N(H) -> R \subset G -> coprime #|R| #|A| ->
solvable R || solvable A ->
'C_G(A) / H = 'C_(G / H)(A / H).
Lemma coprime_norm_quotient_cent A G H :
A \subset 'N(G) -> A \subset 'N(H) -> coprime #|H| #|A| -> solvable H ->
'C_G(A) / H = 'C_(G / H)(A / H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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)) (@gval 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 (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))))) (_ : is_true (@solvable gT (@gval gT H))), @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT A))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT A) (@gval gT H)))) *)
move=> nGA nHA coHA solH; have sRH := subsetIl H [~: G, A].
(* Goal: @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT A))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT A) (@gval gT H)))) *)
rewrite strongest_coprime_quotient_cent ?(coprimeSg sRH) 1?(solvableS sRH) //.
(* 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 H) (@commutator gT (@gval gT G) (@gval gT A))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by rewrite subIset // commg_subl nGA orbT.
Qed.
Lemma coprime_cent_mulG A G H :
A \subset 'N(G) -> A \subset 'N(H) -> G \subset 'N(H) ->
coprime #|H| #|A| -> solvable H ->
'C_(H * G)(A) = 'C_H(A) * 'C_G(A).
Lemma quotient_TI_subcent K G H :
G \subset 'N(K) -> G \subset 'N(H) -> K :&: H = 1 ->
'C_K(G) / H = 'C_(K / H)(G / H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT 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)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)))))) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))), @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT G))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT K) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) *)
move=> nGK nGH tiKH.
(* Goal: @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT G))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT K) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) *)
have tiHR: H :&: [~: K, G] = 1.
(* Goal: @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT G))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT K) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@commutator gT (@gval gT K) (@gval gT G))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by apply/trivgP; rewrite /= setIC -tiKH setSI ?commg_subl.
(* Goal: @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT G))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT K) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) *)
apply: strongest_coprime_quotient_cent; rewrite ?tiHR ?sub1G ?solvable1 //.
(* Goal: is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (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))))) *)
by rewrite cards1 coprime1n.
Qed.
Proposition coprime_quotient_cent A G H :
H \subset G -> A \subset 'N(H) -> coprime #|G| #|A| -> solvable G ->
'C_G(A) / H = 'C_(G / H)(A / H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A))) (@mem (Finite.sort (FinGroup.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 (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))))) (_ : is_true (@solvable gT (@gval gT G))), @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT A))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT A) (@gval gT H)))) *)
move=> sHG nHA coGA solG.
(* Goal: @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT A))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT A) (@gval gT H)))) *)
have sRG: H :&: [~: G, A] \subset G by rewrite subIset ?sHG.
(* Goal: @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT A))) (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT A) (@gval gT H)))) *)
by rewrite strongest_coprime_quotient_cent ?(coprimeSg sRG) 1?(solvableS sRG).
Qed.
Proposition coprime_comm_pcore A G K :
A \subset 'N(G) -> coprime #|G| #|A| -> solvable G ->
pi^'.-Hall(G) K -> K \subset 'C_G(A) ->
End InternalAction.
Proposition coprime_Hall_subset pi (gT : finGroupType) (A G X : {group gT}) :
A \subset 'N(G) -> coprime #|G| #|A| -> solvable G ->
X \subset G -> pi.-group X -> A \subset 'N(X) ->
Section ExternalAction.
Variables (pi : nat_pred) (aT gT : finGroupType).
Variables (A : {group aT}) (G : {group gT}) (to : groupAction A G).
Section FullExtension.
Local Notation inA := (sdpair2 to).
Local Notation inG := (sdpair1 to).
Local Notation A' := (inA @* gval A).
Local Notation G' := (inG @* gval G).
Let injG : 'injm inG := injm_sdpair1 _.
Let injA : 'injm inA := injm_sdpair2 _.
Hypotheses (coGA : coprime #|G| #|A|) (solG : solvable G).
Lemma external_action_im_coprime : coprime #|G'| #|A'|.
Proof.
(* Goal: is_true (coprime (@card (FinGroup.finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@morphim gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@gval gT G))))) (@card (FinGroup.finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@morphim aT (@sdprod_groupType aT gT A G to) (@gval aT A) (@sdpair2_morphism aT gT A G to) (@MorPhantom aT (@sdprod_groupType aT gT A G to) (@sdpair2 aT gT A G to)) (@gval aT A)))))) *)
by rewrite !card_injm.
Qed.
Let coGA' := external_action_im_coprime.
Let solG' : solvable G' := morphim_sol _ solG.
Let nGA' := im_sdpair_norm to.
Lemma ext_coprime_Hall_exists :
exists2 H : {group gT}, pi.-Hall(G) H & [acts A, on H | to].
Proof.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => 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 A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) *)
have [H' hallH' nHA'] := coprime_Hall_exists pi nGA' coGA' solG'.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => 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 A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) *)
have sHG' := pHall_sub hallH'.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => 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 A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) *)
exists (inG @*^-1 H')%G => /=.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@gval (@sdprod_groupType aT gT A G to) H')) (@gact aT gT (@gval aT A) (@gval gT G) to))))) *)
(* Goal: is_true (@pHall gT pi (@gval gT G) (@morphpre gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@gval (@sdprod_groupType aT gT A G to) H'))) *)
by rewrite -(morphim_invmE injG) -{1}(im_invm injG) morphim_pHall.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@gval (@sdprod_groupType aT gT A G to) H')) (@gact aT gT (@gval aT A) (@gval gT G) to))))) *)
by rewrite actsEsd ?morphpreK // subsetIl.
Qed.
Lemma ext_coprime_Hall_trans (H1 H2 : {group gT}) :
pi.-Hall(G) H1 -> [acts A, on H1 | to] ->
Proof.
(* Goal: forall (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H1))) (_ : 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 A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H1) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) (_ : is_true (@pHall gT pi (@gval gT G) (@gval gT H2))) (_ : 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 A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H2) (@gact aT gT (@gval aT A) (@gval gT G) to)))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
move=> hallH1 nH1A hallH2 nH2A.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
have sH1G := pHall_sub hallH1; have sH2G := pHall_sub hallH2.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
rewrite !actsEsd // in nH1A nH2A.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
have hallH1': pi.-Hall(G') (inG @* H1) by rewrite morphim_pHall.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
have hallH2': pi.-Hall(G') (inG @* H2) by rewrite morphim_pHall.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
have [x'] := coprime_Hall_trans nGA' coGA' solG' hallH1' nH1A hallH2' nH2A.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) x' (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@setI (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) G)) (@centraliser (@sdprod_groupType aT gT A G to) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group aT (@sdprod_groupType aT gT A G to) A (@sdpair2_morphism aT gT A G to) (@MorPhantom aT (@sdprod_groupType aT gT A G to) (@sdpair2 aT gT A G to)) A)))))))) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))))) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) H1)) (@conjugate (@sdprod_groupType aT gT A G to) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) H2)) x')), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
case/setIP=> /= Gx' cAx' /eqP defH1; pose x := invm injG x'.
(* Goal: @ex2 (FinGroup.arg_sort (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
have Gx: x \in G by rewrite -(im_invm injG) mem_morphim.
(* Goal: @ex2 (FinGroup.arg_sort (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
have def_x': x' = inG x by rewrite invmK.
(* Goal: @ex2 (FinGroup.arg_sort (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
exists x; first by rewrite inE Gx gacentEsd mem_morphpre /= -?def_x'.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT H1) (@conjugate gT (@gval gT H2) x) *)
apply/eqP; move: defH1; rewrite def_x' /= -morphimJ //=.
(* Goal: forall _ : is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (@sdprod_baseFinGroupType aT gT A G to))) (@morphim gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@gval gT H1)) (@morphim gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@conjugate gT (@gval gT H2) x))), is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H1) (@conjugate gT (@gval gT H2) x)) *)
by rewrite !eqEsubset !injmSK // conj_subG.
Qed.
Lemma ext_norm_conj_cent (H : {group gT}) x :
H \subset G -> x \in 'C_(G | to)(A) ->
[acts A, on H :^ x | to] = [acts A, on H | to].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))))), @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT H) x) (@gact aT gT (@gval aT A) (@gval gT G) to))))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to))))) *)
move=> sHG /setIP[Gx].
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gacent aT gT (@gval aT A) (@gval gT G) to (@gval aT A))))), @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT H) x) (@gact aT gT (@gval aT A) (@gval gT G) to))))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to))))) *)
rewrite gacentEsd !actsEsd ?conj_subG ?morphimJ // 2!inE Gx /=.
(* Goal: forall _ : is_true (@in_mem (@sdprod_by aT gT A G to) (@sdpair1 aT gT A G to x) (@mem (@sdprod_by aT gT A G to) (predPredType (@sdprod_by aT gT A G to)) (@SetDef.pred_of_set (FinGroup.arg_finType (@sdprod_baseFinGroupType aT gT A G to)) (@centraliser (@sdprod_groupType aT gT A G to) (@morphim aT (@sdprod_groupType aT gT A G to) (@gval aT A) (@sdpair2_morphism aT gT A G to) (@MorPhantom aT (@sdprod_groupType aT gT A G to) (@sdpair2 aT gT A G to)) (@gval aT A)))))), @eq bool (@subset (FinGroup.finType (@sdprod_baseFinGroupType aT gT A G to)) (@mem (@sdprod_by aT gT A G to) (predPredType (@sdprod_by aT gT A G to)) (@SetDef.pred_of_set (FinGroup.finType (@sdprod_baseFinGroupType aT gT A G to)) (@morphim aT (@sdprod_groupType aT gT A G to) (@gval aT A) (@sdpair2_morphism aT gT A G to) (@MorPhantom aT (@sdprod_groupType aT gT A G to) (@sdpair2 aT gT A G to)) (@gval aT A)))) (@mem (@sdprod_by aT gT A G to) (predPredType (@sdprod_by aT gT A G to)) (@SetDef.pred_of_set (FinGroup.arg_finType (@sdprod_baseFinGroupType aT gT A G to)) (@normaliser (@sdprod_groupType aT gT A G to) (@conjugate (@sdprod_groupType aT gT A G to) (@morphim gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@gval gT H)) (@sdpair1 aT gT A G to x)))))) (@subset (FinGroup.finType (@sdprod_baseFinGroupType aT gT A G to)) (@mem (@sdprod_by aT gT A G to) (predPredType (@sdprod_by aT gT A G to)) (@SetDef.pred_of_set (FinGroup.finType (@sdprod_baseFinGroupType aT gT A G to)) (@morphim aT (@sdprod_groupType aT gT A G to) (@gval aT A) (@sdpair2_morphism aT gT A G to) (@MorPhantom aT (@sdprod_groupType aT gT A G to) (@sdpair2 aT gT A G to)) (@gval aT A)))) (@mem (@sdprod_by aT gT A G to) (predPredType (@sdprod_by aT gT A G to)) (@SetDef.pred_of_set (FinGroup.arg_finType (@sdprod_baseFinGroupType aT gT A G to)) (@normaliser (@sdprod_groupType aT gT A G to) (@morphim gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@gval gT H)))))) *)
exact: norm_conj_cent.
Qed.
Lemma ext_coprime_Hall_subset (X : {group gT}) :
X \subset G -> pi.-group X -> [acts A, on X | to] ->
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 X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@pgroup gT pi (@gval gT X))) (_ : 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 A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X) (@gact aT gT (@gval aT A) (@gval gT G) to)))))), @ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *)
move=> sXG piX; rewrite actsEsd // => nXA'.
(* Goal: @ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *)
case: (coprime_Hall_subset nGA' coGA' solG' _ (morphim_pgroup _ piX) nXA').
(* Goal: forall (x : @group_of (@sdprod_groupType aT gT A G to) (Phant (FinGroup.arg_sort (FinGroup.base (@sdprod_groupType aT gT A G to))))) (_ : and3 (is_true (@pHall (@sdprod_groupType aT gT A G to) pi (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) G)) (@gval (@sdprod_groupType aT gT A G to) x))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group aT (@sdprod_groupType aT gT A G to) A (@sdpair2_morphism aT gT A G to) (@MorPhantom aT (@sdprod_groupType aT gT A G to) (@sdpair2 aT gT A G to)) A)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@normaliser (@sdprod_groupType aT gT A G to) (@gval (@sdprod_groupType aT gT A G to) x)))))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@mfun gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to))) X)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) x)))))), @ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@mfun gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to))) X)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) G))))) *)
exact: morphimS.
(* Goal: forall (x : @group_of (@sdprod_groupType aT gT A G to) (Phant (FinGroup.arg_sort (FinGroup.base (@sdprod_groupType aT gT A G to))))) (_ : and3 (is_true (@pHall (@sdprod_groupType aT gT A G to) pi (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) G)) (@gval (@sdprod_groupType aT gT A G to) x))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group aT (@sdprod_groupType aT gT A G to) A (@sdpair2_morphism aT gT A G to) (@MorPhantom aT (@sdprod_groupType aT gT A G to) (@sdpair2 aT gT A G to)) A)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@normaliser (@sdprod_groupType aT gT A G to) (@gval (@sdprod_groupType aT gT A G to) x)))))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) (@morphim_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@mfun gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to))) X)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@sdprod_groupType aT gT A G to))) (@gval (@sdprod_groupType aT gT A G to) x)))))), @ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *)
move=> H' /= [piH' nHA' sXH']; have sHG' := pHall_sub piH'.
(* Goal: @ex (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun H : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@pHall gT pi (@gval gT G) (@gval gT H))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gact aT gT (@gval aT A) (@gval gT G) to)))))) (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 X))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *)
exists (inG @*^-1 H')%G; rewrite actsEsd ?subsetIl ?morphpreK // nHA'.
(* Goal: and3 (is_true (@pHall gT pi (@gval gT G) (@gval gT (@morphpre_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) H')))) (is_true true) (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 X))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@morphpre_group gT (@sdprod_groupType aT gT A G to) G (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) H')))))) *)
rewrite -sub_morphim_pre //= sXH'; split=> //.
(* Goal: is_true (@pHall gT pi (@gval gT G) (@morphpre gT (@sdprod_groupType aT gT A G to) (@gval gT G) (@sdpair1_morphism aT gT A G to) (@MorPhantom gT (@sdprod_groupType aT gT A G to) (@sdpair1 aT gT A G to)) (@gval (@sdprod_groupType aT gT A G to) H'))) *)
by rewrite -(morphim_invmE injG) -{1}(im_invm injG) morphim_pHall.
Qed.
End FullExtension.
Lemma ext_coprime_quotient_cent (H : {group gT}) :
H \subset G -> [acts A, on H | to] -> coprime #|H| #|A| -> solvable H ->
'C_(|to)(A) / H = 'C_(|to / H)(A).
End ExternalAction.
Section SylowSolvableAct.
Variables (gT : finGroupType) (p : nat).
Implicit Types A B G X : {group gT}.
Lemma sol_coprime_Sylow_exists A G :
solvable A -> A \subset 'N(G) -> coprime #|G| #|A| ->
exists2 P : {group gT}, p.-Sylow(G) P & A \subset 'N(P).
Proof.
(* Goal: forall (_ : is_true (@solvable gT (@gval gT A))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval 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 (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))))), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
move=> solA nGA coGA; pose AG := A <*> G.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have nsG_AG: G <| AG by rewrite /normal joing_subr join_subG nGA normG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have [sG_AG nG_AG]:= andP nsG_AG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have [P sylP] := Sylow_exists p G; pose N := 'N_AG(P); pose NG := G :&: N.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have nGN: N \subset 'N(G) by rewrite subIset ?nG_AG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have sNG_G: NG \subset G := subsetIl G N.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have nsNG_N: NG <| N by rewrite /normal subsetIr normsI ?normG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have defAG: G * N = AG := Frattini_arg nsG_AG sylP.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have oA : #|A| = #|N| %/ #|NG|.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
(* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) N))) (@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)) NG)))) *)
rewrite /NG setIC divgI -card_quotient // -quotientMidl defAG.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
(* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))) (@card (@coset_finType gT (@gval gT G)) (@mem (Finite.sort (@coset_finType gT (@gval gT G))) (predPredType (Finite.sort (@coset_finType gT (@gval gT G)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT G)) (@quotient gT AG (@gval gT G))))) *)
rewrite card_quotient -?divgS //= norm_joinEl //.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
(* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT A) (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
by rewrite coprime_cardMg 1?coprime_sym // mulnK.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have: [splits N, over NG].
(* Goal: forall _ : is_true (@splits_over gT N NG), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
(* Goal: is_true (@splits_over gT N NG) *)
rewrite SchurZassenhaus_split // /Hall -divgS subsetIr //.
(* Goal: forall _ : is_true (@splits_over gT N NG), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
(* Goal: is_true (andb true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@setI_group gT G (@setI_group gT (@joing_group gT (@gval gT A) (@gval gT G)) (@normaliser_group gT (@gval gT P)))))))) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@setI_group gT (@joing_group gT (@gval gT A) (@gval gT G)) (@normaliser_group gT (@gval gT P))))))) (@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 (@setI_group gT G (@setI_group gT (@joing_group gT (@gval gT A) (@gval gT G)) (@normaliser_group gT (@gval gT P))))))))))) *)
by rewrite -oA (coprimeSg sNG_G).
(* Goal: forall _ : is_true (@splits_over gT N NG), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
case/splitsP=> B; case/complP=> tNG_B defN.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
have [nPB]: B \subset 'N(P) /\ B \subset AG.
(* 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 B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) AG))), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
(* 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 B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT 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 B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) AG)))) *)
by apply/andP; rewrite andbC -subsetI -/N -defN mulG_subr.
(* 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 B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) AG))), @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
case/SchurZassenhaus_trans_actsol => // [|x Gx defB].
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
(* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT A)))) (@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 B)))) *)
by rewrite oA -defN TI_cardMg // mulKn.
(* Goal: @ex2 (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun P : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT))) => is_true (@pHall gT (nat_pred_of_nat p) (@gval gT G) (@gval gT P))) (fun P : @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 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 P)))))) *)
exists (P :^ x^-1)%G; first by rewrite pHallJ ?groupV.
(* 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 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 (@conjG_group gT P (@invg (FinGroup.base gT) x))))))) *)
by rewrite normJ -sub_conjg -defB.
Qed.
Lemma sol_coprime_Sylow_trans A G :
solvable A -> A \subset 'N(G) -> coprime #|G| #|A| ->
[transitive 'C_G(A), on [set P in 'Syl_p(G) | A \subset 'N(P)] | 'JG].
Lemma sol_coprime_Sylow_subset A G X :
A \subset 'N(G) -> coprime #|G| #|A| -> solvable A ->
X \subset G -> p.-group X -> A \subset 'N(X) ->
End SylowSolvableAct.
|
Require Export bbv.HexNotation.
Require Export bbv.ReservedNotations.
Require Import Coq.ZArith.BinInt.
Notation "'Ox' a" := (Z.of_N (hex a)).
Goal Ox"41" = 65%Z.
|
From mathcomp
Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.
From mathcomp
Require Import choice path finset finfun fintype bigop.
Require Import finmap.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Lemma sumn_map I (f : I -> nat) s :
sumn [seq f i | i <- s] = \sum_(i <- s) f i.
Proof.
(* Goal: @eq nat (sumn (@map I nat (fun i : I => f i) s)) (@BigOp.bigop nat I O s (fun i : I => @BigBody nat I i addn true (f i))) *)
by elim: s => [|i s IHs] in f *; rewrite ?(big_nil, big_cons) //= IHs.
Qed.
Lemma sumn_filter s P : sumn [seq i <- s | P i] = \sum_(i <- s | P i) i.
Proof.
(* Goal: @eq nat (sumn (@filter nat (fun i : nat => P i) s)) (@BigOp.bigop nat nat O s (fun i : nat => @BigBody nat nat i addn (P i) i)) *)
by rewrite -big_filter -sumn_map map_id.
Qed.
Lemma sumn_map_filter I s (f : I -> nat) P :
sumn [seq f i | i <- s & P i] = \sum_(i <- s | P i) f i.
Proof.
(* Goal: @eq nat (sumn (@map I nat (fun i : I => f i) (@filter I (fun i : I => P i) s))) (@BigOp.bigop nat I O s (fun i : I => @BigBody nat I i addn (P i) (f i))) *)
by rewrite sumn_map big_filter.
Qed.
Delimit Scope mset_scope with mset.
Local Open Scope fset_scope.
Local Open Scope fmap_scope.
Local Open Scope mset_scope.
Local Open Scope nat_scope.
Definition multiset (T : choiceType) := {fsfun T -> nat with 0}.
Definition multiset_of (T : choiceType) of phant T := @multiset T.
Notation "'{mset' T }" := (@multiset_of _ (Phant T))
(format "'{mset' T }") : mset_scope.
Notation "[ 'mset[' key ] x 'in' aT => F ]" := ([fsfun[key] x in aT => F] : {mset _})
(at level 0, x ident, only parsing) : mset_scope.
Notation "[ 'mset' x 'in' aT => F ]" := ([fsfun x in aT => F] : {mset _})
(at level 0, x ident, only parsing) : mset_scope.
Notation "[ 'm' 'set' x 'in' aT => F ]" := ([fsfun[_] x in aT => F] : {mset _})
(at level 0, x ident, format "[ 'm' 'set' x 'in' aT => F ]") : mset_scope.
Identity Coercion multiset_multiset_of : multiset_of >-> multiset.
Notation enum_mset_def A :=
(flatten [seq nseq (A%mset x) x | x <- finsupp A%mset]).
Module Type EnumMsetSig.
Axiom f : forall K, multiset K -> seq K.
Axiom E : f = (fun K (A : multiset K) => enum_mset_def A).
End EnumMsetSig.
Module EnumMset : EnumMsetSig.
Definition f K (A : multiset K) := enum_mset_def A.
Definition E := (erefl f).
End EnumMset.
Notation enum_mset := EnumMset.f.
Coercion enum_mset : multiset >-> seq.
Canonical enum_mset_unlock := Unlockable EnumMset.E.
Canonical multiset_predType (K : choiceType) :=
Eval hnf in mkPredType (fun (A : multiset K) a => a \in enum_mset A).
Canonical mset_finpredType (T: choiceType) :=
mkFinPredType (multiset T) (fun A => undup (enum_mset A))
(fun _ => undup_uniq _) (fun _ _ => mem_undup _ _).
Section MultisetOps.
Context {K : choiceType}.
Implicit Types (a b c : K) (A B C D : {mset K}) (s : seq K).
Definition mset0 : {mset K} := [fsfun].
Definition msetn n a := [mset[msetn_key] x in [fset a] => n].
Definition seq_mset (s : seq K) :=
[mset[seq_mset_key] x in [fset x in s] => count (pred1 x) s].
Definition msetU A B :=
[mset[msetU_key] x in finsupp A `|` finsupp B => maxn (A x) (B x)].
Definition msetI A B :=
[mset[msetI_key] x in finsupp A `|` finsupp B => minn (A x) (B x)].
Definition msetD A B :=
[mset[msetD_key] x in finsupp A `|` finsupp B => A x + B x].
Definition msetB A B :=
[mset[msetB_key] x in finsupp A `|` finsupp B => A x - B x].
Definition msetM A B :=
[mset[msetM_key] x in finsupp A `*` finsupp B => A x.1 * B x.2].
Definition msubset A B := [forall x : finsupp A, A (val x) <= B (val x)].
Definition mproper A B := msubset A B && ~~ msubset B A.
Definition mdisjoint A B := (msetI A B == mset0).
End MultisetOps.
Notation "[ 'mset' a ]" := (msetn 1 a)
(at level 0, a at level 99, format "[ 'mset' a ]") : mset_scope.
Notation "[ 'mset' a : T ]" := [mset (a : T)]
(at level 0, a at level 99, format "[ 'mset' a : T ]") : mset_scope.
Notation "A `|` B" := (msetU A B) : mset_scope.
Notation "A `+` B" := (msetD A B) : mset_scope.
Notation "A `\` B" := (msetB A B) : mset_scope.
Notation "A `\ a" := (A `\` [mset a]) : mset_scope.
Notation "a |` A" := ([mset (a)] `|` A) : mset_scope.
Notation "a +` A" := ([mset (a)] `+` A) : mset_scope.
Notation "A `*` B" := (msetM A B) : mset_scope.
Notation "A `<=` B" := (msubset A B)
(at level 70, no associativity) : mset_scope.
Notation "A `<` B" := (mproper A B)
(at level 70, no associativity) : mset_scope.
Notation "[ 'mset' a1 ; a2 ; .. ; an ]" :=
(msetD .. (a1 +` (msetn 1 a2)) .. (msetn 1 an))
(at level 0, a1 at level 99,
format "[ 'mset' a1 ; a2 ; .. ; an ]") : mset_scope.
Notation "A `&` B" := (msetI A B) : mset_scope.
Section MSupp.
Context {K : choiceType}.
Implicit Types (a b c : K) (A B C D : {mset K}) (s : seq K).
Lemma enum_msetE a A :
(a \in A) = (a \in flatten [seq nseq (A x) x | x <- finsupp A]).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (seq_predType (Choice.eqType K)) (@flatten (Choice.sort K) (@map (Choice.sort K) (list (Choice.sort K)) (fun x : Choice.sort K => @nseq (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x) x) (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)))))) *)
by transitivity (a \in enum_mset A); rewrite // unlock.
Qed.
Lemma msuppE a A : (a \in finsupp A) = (a \in A).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Choice.sort K) (finSetPredType K) (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A))) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) *)
rewrite enum_msetE.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Choice.sort K) (finSetPredType K) (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A))) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (seq_predType (Choice.eqType K)) (@flatten (Choice.sort K) (@map (Choice.sort K) (list (Choice.sort K)) (fun x : Choice.sort K => @nseq (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x) x) (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)))))) *)
apply/idP/flattenP => [aA|/=[_ /mapP[x xA -> /nseqP[->//]]]].
(* Goal: @ex2 (Equality.sort (seq_eqType (Choice.eqType K))) (fun s : Equality.sort (seq_eqType (Choice.eqType K)) => is_true (@in_mem (Equality.sort (seq_eqType (Choice.eqType K))) s (@mem (Equality.sort (seq_eqType (Choice.eqType K))) (seq_predType (seq_eqType (Choice.eqType K))) (@map (Choice.sort K) (list (Choice.sort K)) (fun x : Choice.sort K => @nseq (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x) x) (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)))))) (fun s : Equality.sort (seq_eqType (Choice.eqType K)) => is_true (@in_mem (Equality.sort (Choice.eqType K)) a (@mem (Equality.sort (Choice.eqType K)) (seq_predType (Choice.eqType K)) s))) *)
exists (nseq (A a) a); first by apply/mapP; exists a.
(* Goal: is_true (@in_mem (Equality.sort (Choice.eqType K)) a (@mem (Equality.sort (Choice.eqType K)) (seq_predType (Choice.eqType K)) (@nseq (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) a))) *)
by apply/nseqP; split=> //; rewrite lt0n -mem_finsupp.
Qed.
End MSupp.
Section MSetTheory.
Context {K : choiceType}.
Implicit Types (a b c : K) (A B C D : {mset K}) (s : seq K).
Lemma msetP {A B} : A =1 B <-> A = B.
Proof.
(* Goal: iff (@eqfun (Equality.sort nat_eqType) (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B)) (@eq (@multiset_of K (Phant (Choice.sort K))) A B) *)
exact: fsfunP.
Qed.
Lemma mset_neq0 a A : (A a != 0) = (a \in A).
Proof.
(* Goal: @eq bool (negb (@eq_op nat_eqType (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) O)) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) *)
by rewrite -msuppE mem_finsupp.
Qed.
Lemma in_mset a A : (a \in A) = (A a > 0).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) (leq (S O) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a)) *)
by rewrite -mset_neq0 lt0n.
Qed.
Lemma mset_eq0 a A : (A a == 0) = (a \notin A).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) O) (negb (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) *)
by rewrite -mset_neq0 negbK.
Qed.
Lemma mset_eq0P {a A} : reflect (A a = 0) (a \notin A).
Proof.
(* Goal: Bool.reflect (@eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) O) (negb (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) *)
by rewrite -mset_eq0; apply: eqP.
Qed.
Lemma mset_gt0 a A : (A a > 0) = (a \in A).
Proof.
(* Goal: @eq bool (leq (S O) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a)) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) *)
by rewrite -in_mset.
Qed.
Lemma mset_eqP {A B} : reflect (A =1 B) (A == B).
Proof.
(* Goal: Bool.reflect (@eqfun (Equality.sort nat_eqType) (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B)) (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A B) *)
exact: (equivP eqP (iff_sym msetP)).
Qed.
Lemma mset0E a : mset0 a = 0.
Proof.
(* Goal: @eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@mset0 K) a) O *)
by rewrite /mset0 fsfunE.
Qed.
Lemma msetnE n a b : (msetn n a) b = if b == a then n else 0.
Proof.
(* Goal: @eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetn K n a) b) (if @eq_op (Choice.eqType K) b a then n else O) *)
by rewrite fsfunE inE.
Qed.
Lemma msetE2 A B a :
((A `+` B) a = A a + B a) * ((A `|` B) a = maxn (A a) (B a))
* ((A `&` B) a = minn (A a) (B a)) * ((A `\` B) a = (A a) - (B a)).
Proof.
(* Goal: prod (prod (prod (@eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetD K A B) a) (addn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a))) (@eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetU K A B) a) (maxn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a)))) (@eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetI K A B) a) (minn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a)))) (@eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetB K A B) a) (subn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a))) *)
rewrite !fsfunE !inE !msuppE -!mset_neq0; case: ifPn => //.
(* Goal: forall _ : is_true (negb (orb (negb (@eq_op nat_eqType (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) O)) (negb (@eq_op nat_eqType (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a) O)))), prod (prod (prod (@eq (Equality.sort nat_eqType) O (addn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a))) (@eq (Equality.sort nat_eqType) O (maxn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a)))) (@eq (Equality.sort nat_eqType) O (minn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a)))) (@eq (Equality.sort nat_eqType) O (subn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a))) *)
by rewrite negb_or !negbK => /andP [/eqP-> /eqP->].
Qed.
Lemma count_mem_mset a A : count_mem a A = A a.
Proof.
(* Goal: @eq nat (@count (Equality.sort (Choice.eqType K)) (@pred_of_simpl (Equality.sort (Choice.eqType K)) (@pred1 (Choice.eqType K) a)) (@EnumMset.f K A)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) *)
rewrite unlock count_flatten sumn_map big_map.
(* Goal: @eq nat (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)) (fun j : Choice.sort K => @BigBody nat (Choice.sort K) j addn true (@count (Equality.sort (Choice.eqType K)) (@pred_of_simpl (Equality.sort (Choice.eqType K)) (@pred1 (Choice.eqType K) a)) (@nseq (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A j) j)))) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) *)
rewrite (eq_bigr _ (fun _ _ => esym (sum1_count _ _))) /=.
(* Goal: @eq nat (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i addn true (@BigOp.bigop nat (Choice.sort K) O (@nseq (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A i) i) (fun j : Choice.sort K => @BigBody nat (Choice.sort K) j addn (@eq_op (Choice.eqType K) j a) (S O))))) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) *)
rewrite (eq_bigr _ (fun _ _ => big_nseq_cond _ _ _ _ _ _)) /= -big_mkcond /=.
(* Goal: @eq nat (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i addn (@eq_op (Choice.eqType K) i a) (@iter nat (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A i) (addn (S O)) O))) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) *)
have [aNA|aA] := finsuppP.
(* Goal: @eq nat (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i addn (@eq_op (Choice.eqType K) i a) (@iter nat (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A i) (addn (S O)) O))) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) *)
(* Goal: @eq nat (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i addn (@eq_op (Choice.eqType K) i a) (@iter nat (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A i) (addn (S O)) O))) O *)
by rewrite big1_fset // => i iA /eqP eq_ia; rewrite -eq_ia iA in aNA.
(* Goal: @eq nat (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i addn (@eq_op (Choice.eqType K) i a) (@iter nat (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A i) (addn (S O)) O))) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) *)
rewrite big_fset_condE/= (big_fsetD1 a) ?inE ?eqxx ?andbT //= iter_addn mul1n.
(* Goal: @eq nat (addn (addn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) O) (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@fsetD K (@Imfset.imfset imfset_key K K (fun i : Choice.sort K => i) (@mem_fin (Choice.eqType K) (simplPredType (Choice.sort K)) (@subfinset_finpred K (@mem_fin (Choice.eqType K) (seq_predType (Choice.eqType K)) (@fset_finpred K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A))) (fun i : Choice.sort K => @eq_op (Choice.eqType K) i a))) (Phantom (mem_pred (Choice.sort K)) (@mem (Choice.sort K) (simplPredType (Choice.sort K)) (@SimplPred (Choice.sort K) (fun i : Choice.sort K => andb (@in_mem (Choice.sort K) i (@mem (Choice.sort K) (finSetPredType K) (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A))) (@eq_op (Choice.eqType K) i a)))))) (@fset1 K a))) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i addn true (@iter nat (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A i) (addn (S O)) O)))) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) *)
rewrite (_ : (_ `\ _)%fset = fset0) ?big_seq_fset0 ?addn0//.
(* Goal: @eq (@finset_of K (Phant (Choice.sort K))) (@fsetD K (@Imfset.imfset imfset_key K K (fun i : Choice.sort K => i) (@mem_fin (Choice.eqType K) (simplPredType (Choice.sort K)) (@subfinset_finpred K (@mem_fin (Choice.eqType K) (seq_predType (Choice.eqType K)) (@fset_finpred K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A))) (fun i : Choice.sort K => @eq_op (Choice.eqType K) i a))) (Phantom (mem_pred (Choice.sort K)) (@mem (Choice.sort K) (simplPredType (Choice.sort K)) (@SimplPred (Choice.sort K) (fun i : Choice.sort K => andb (@in_mem (Choice.sort K) i (@mem (Choice.sort K) (finSetPredType K) (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A))) (@eq_op (Choice.eqType K) i a)))))) (@fset1 K a)) (@fset0 K) *)
by apply/fsetP=> i; rewrite !inE; case: (i == a); rewrite ?(andbF, andbT).
Qed.
Lemma perm_undup_mset A : perm_eq (undup A) (finsupp A).
Proof.
(* Goal: is_true (@perm_eq (Choice.eqType K) (@undup (Choice.eqType K) (@EnumMset.f K A)) (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A))) *)
apply: uniq_perm_eq; rewrite ?undup_uniq // => a.
(* Goal: @eq bool (@in_mem (Equality.sort (Choice.eqType K)) a (@mem (Equality.sort (Choice.eqType K)) (seq_predType (Choice.eqType K)) (@undup (Choice.eqType K) (@EnumMset.f K A)))) (@in_mem (Equality.sort (Choice.eqType K)) a (@mem (Equality.sort (Choice.eqType K)) (seq_predType (Choice.eqType K)) (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)))) *)
by rewrite mem_undup msuppE.
Qed.
Section big_com.
Variables (R : Type) (idx : R) (op : Monoid.com_law idx).
Implicit Types (X : {mset K}) (P : pred K) (F : K -> R).
Lemma big_mset X P F :
\big[op/idx]_(i <- X | P i) F i =
\big[op/idx]_(i <- finsupp X | P i) iterop (X i) op (F i) idx.
Proof.
(* Goal: @eq R (@BigOp.bigop R (Choice.sort K) idx (@EnumMset.f K X) (fun i : Choice.sort K => @BigBody R (Choice.sort K) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (P i) (F i))) (@BigOp.bigop R (Choice.sort K) idx (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) X)) (fun i : Choice.sort K => @BigBody R (Choice.sort K) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (P i) (@iterop R (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) X i) (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (F i) idx))) *)
rewrite [in RHS](eq_big_perm (undup X)) 1?perm_eq_sym ?perm_undup_mset//.
(* Goal: @eq R (@BigOp.bigop R (Choice.sort K) idx (@EnumMset.f K X) (fun i : Choice.sort K => @BigBody R (Choice.sort K) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (P i) (F i))) (@BigOp.bigop R (Equality.sort (Choice.eqType K)) idx (@undup (Choice.eqType K) (@EnumMset.f K X)) (fun i : Equality.sort (Choice.eqType K) => @BigBody R (Equality.sort (Choice.eqType K)) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (P i) (@iterop R (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) X i) (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (F i) idx))) *)
rewrite -[in LHS]big_undup_iterop_count; apply: eq_bigr => i _.
(* Goal: @eq R (@iterop R (@count (Equality.sort (Choice.eqType K)) (@pred_of_simpl (Equality.sort (Choice.eqType K)) (@pred1 (Choice.eqType K) i)) (@EnumMset.f K X)) (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (F i) idx) (@iterop R (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) X i) (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (F i) idx) *)
by rewrite count_mem_mset.
Qed.
End big_com.
Lemma sum_mset (X : {mset K}) (P : pred K) (F : K -> nat) :
\sum_(i <- X | P i) F i = \sum_(i <- finsupp X | P i) X i * F i.
Proof.
(* Goal: @eq nat (@BigOp.bigop nat (Choice.sort K) O (@EnumMset.f K X) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i addn (P i) (F i))) (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) X)) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i addn (P i) (muln (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) X i) (F i)))) *)
rewrite big_mset; apply: eq_bigr => i _ //.
(* Goal: @eq nat (@iterop nat (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) X i) (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (F i) O) (muln (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) X i) (F i)) *)
by rewrite Monoid.iteropE iter_addn addn0 mulnC.
Qed.
Lemma prod_mset (X : {mset K}) (P : pred K) (F : K -> nat) :
\prod_(i <- X | P i) F i = \prod_(i <- finsupp X | P i) F i ^ X i.
Proof.
(* Goal: @eq nat (@BigOp.bigop nat (Choice.sort K) (S O) (@EnumMset.f K X) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i muln (P i) (F i))) (@BigOp.bigop nat (Choice.sort K) (S O) (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) X)) (fun i : Choice.sort K => @BigBody nat (Choice.sort K) i muln (P i) (expn (F i) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) X i)))) *)
by rewrite big_mset.
Qed.
Lemma mset_seqE s a : (seq_mset s) a = count_mem a s.
Proof.
(* Goal: @eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@seq_mset K s) a) (@count (Equality.sort (Choice.eqType K)) (@pred_of_simpl (Equality.sort (Choice.eqType K)) (@pred1 (Choice.eqType K) a)) s) *)
by rewrite fsfunE inE/=; case: ifPn => // /count_memPn ->.
Qed.
Lemma perm_eq_seq_mset s : perm_eq (seq_mset s) s.
Proof.
(* Goal: is_true (@perm_eq (Choice.eqType K) (@EnumMset.f K (@seq_mset K s)) s) *)
by apply/allP => a _ /=; rewrite count_mem_mset mset_seqE.
Qed.
Lemma seq_mset_id A : seq_mset A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@seq_mset K (@EnumMset.f K A)) A *)
by apply/msetP=> a; rewrite mset_seqE count_mem_mset.
Qed.
Lemma eq_seq_msetP s s' : reflect (seq_mset s = seq_mset s') (perm_eq s s').
Proof.
(* Goal: Bool.reflect (@eq (@multiset_of K (Phant (Choice.sort K))) (@seq_mset K s) (@seq_mset K s')) (@perm_eq (Choice.eqType K) s s') *)
apply: (iffP idP) => [/perm_eqP perm_ss'|eq_ss'].
(* Goal: is_true (@perm_eq (Choice.eqType K) s s') *)
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@seq_mset K s) (@seq_mset K s') *)
by apply/msetP => a; rewrite !mset_seqE perm_ss'.
(* Goal: is_true (@perm_eq (Choice.eqType K) s s') *)
by apply/allP => a _ /=; rewrite -!mset_seqE eq_ss'.
Qed.
Lemma msetME A B (u : K * K) : (A `*` B) u = A u.1 * B u.2.
Proof.
(* Goal: @eq (Equality.sort nat_eqType) (@fun_of_fsfun (prod_choiceType K K) nat_eqType (fun _ : Choice.sort (prod_choiceType K K) => O) (@msetM K A B) u) (muln (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A (@fst (Choice.sort K) (Choice.sort K) u)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B (@snd (Choice.sort K) (Choice.sort K) u))) *)
rewrite !fsfunE inE; case: ifPn => //=.
(* Goal: forall _ : is_true (negb (andb (@in_mem (Choice.sort K) (@fst (Choice.sort K) (Choice.sort K) u) (@mem (Choice.sort K) (finSetPredType K) (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A))) (@in_mem (Choice.sort K) (@snd (Choice.sort K) (Choice.sort K) u) (@mem (Choice.sort K) (finSetPredType K) (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) B))))), @eq nat O (muln (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A (@fst (Choice.sort K) (Choice.sort K) u)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B (@snd (Choice.sort K) (Choice.sort K) u))) *)
by rewrite negb_and !memNfinsupp => /orP [] /eqP->; rewrite ?muln0.
Qed.
Lemma mset1DE a A b : (a +` A) b = (b == a) + A b.
Proof.
(* Goal: @eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetD K (@msetn K (S O) a) A) b) (addn (nat_of_bool (@eq_op (Choice.eqType K) b a)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A b)) *)
by rewrite msetE2 msetnE; case: (b == a).
Qed.
Lemma mset1UE a A b : (a |` A) b = maxn (b == a) (A b).
Proof.
(* Goal: @eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetU K (@msetn K (S O) a) A) b) (maxn (nat_of_bool (@eq_op (Choice.eqType K) b a)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A b)) *)
by rewrite msetE2 msetnE; case: (b == a).
Qed.
Lemma msetB1E a A b : (A `\ a) b = (A b) - (b == a).
Proof.
(* Goal: @eq (Equality.sort nat_eqType) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetB K A (@msetn K (S O) a)) b) (subn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A b) (nat_of_bool (@eq_op (Choice.eqType K) b a))) *)
by rewrite msetE2 msetnE; case: (b == a).
Qed.
Let msetE := (mset0E, msetE2, msetnE, msetnxx,
mset1DE, mset1UE, msetB1E,
mset_seqE, msetME).
Lemma in_mset0 a : a \in mset0 = false.
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@mset0 K))) false *)
by rewrite in_mset !msetE.
Qed.
Lemma in_msetn n a' a : a \in msetn n a' = (n > 0) && (a == a').
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetn K n a'))) (andb (leq (S O) n) (@eq_op (Choice.eqType K) a a')) *)
by rewrite in_mset msetE; case: (a == a'); rewrite ?andbT ?andbF.
Qed.
Lemma in_mset1 a' a : a \in [mset a'] = (a == a').
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetn K (S O) a'))) (@eq_op (Choice.eqType K) a a') *)
by rewrite in_msetn.
Qed.
Lemma in_msetD A B a : (a \in A `+` B) = (a \in A) || (a \in B).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K A B))) (orb (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B))) *)
by rewrite !in_mset !msetE addn_gt0.
Qed.
Lemma in_msetU A B a : (a \in A `|` B) = (a \in A) || (a \in B).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K A B))) (orb (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B))) *)
by rewrite !in_mset !msetE leq_max.
Qed.
Lemma in_msetDU A B a : (a \in A `+` B) = (a \in A `|` B).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K A B))) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K A B))) *)
by rewrite in_msetU in_msetD.
Qed.
Lemma in_msetI A B a : (a \in A `&` B) = (a \in A) && (a \in B).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetI K A B))) (andb (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B))) *)
by rewrite !in_mset msetE leq_min.
Qed.
Lemma in_msetB A B a : (a \in A `\` B) = (B a < A a).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetB K A B))) (leq (S (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a)) *)
by rewrite -mset_neq0 msetE subn_eq0 ltnNge.
Qed.
Lemma in_mset1U a' A a : (a \in a' |` A) = (a == a') || (a \in A).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K (@msetn K (S O) a') A))) (orb (@eq_op (Choice.eqType K) a a') (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) *)
by rewrite in_msetU in_mset msetE; case: (_ == _).
Qed.
Lemma in_mset1D a' A a : (a \in a' +` A) = (a == a') || (a \in A).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K (@msetn K (S O) a') A))) (orb (@eq_op (Choice.eqType K) a a') (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) *)
by rewrite in_msetDU in_mset1U.
Qed.
Lemma in_msetB1 A b a : (a \in A `\ b) = ((a == b) ==> (A a > 1)) && (a \in A).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetB K A (@msetn K (S O) b)))) (andb (implb (@eq_op (Choice.eqType K) a b) (leq (S (S O)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a))) (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) *)
by rewrite in_msetB msetE in_mset; case: (_ == _); rewrite -?geq_max.
Qed.
Lemma in_msetM A B (u : K * K) : (u \in A `*` B) = (u.1 \in A) && (u.2 \in B).
Proof.
(* Goal: @eq bool (@in_mem (prod (Choice.sort K) (Choice.sort K)) u (@mem (Equality.sort (Choice.eqType (prod_choiceType K K))) (multiset_predType (prod_choiceType K K)) (@msetM K A B))) (andb (@in_mem (Choice.sort K) (@fst (Choice.sort K) (Choice.sort K) u) (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)) (@in_mem (Choice.sort K) (@snd (Choice.sort K) (Choice.sort K) u) (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B))) *)
by rewrite -!msuppE !mem_finsupp msetE muln_eq0 negb_or.
Qed.
Definition in_msetE := (in_mset0, in_msetn,
in_msetB1, in_msetU, in_msetI, in_msetD, in_msetM).
Let inE := (inE, in_msetE, (@msuppE K)).
Lemma enum_mset0 : mset0 = [::] :> seq K.
Proof.
(* Goal: @eq (list (Choice.sort K)) (@EnumMset.f K (@mset0 K)) (@nil (Choice.sort K)) *)
by rewrite unlock finsupp0.
Qed.
Lemma msetn0 (a : K) : msetn 0 a = mset0.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetn K O a) (@mset0 K) *)
by apply/msetP=> i; rewrite !msetE if_same.
Qed.
Lemma finsupp_msetn n a : finsupp (msetn n a) = if n > 0 then [fset a] else fset0.
Proof.
(* Goal: @eq (@finset_of K (Phant (Choice.sort K))) (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) (@msetn K n a)) (if leq (S O) n then @fset1 K a else @fset0 K) *)
by apply/fsetP => i; rewrite !inE; case: ifP => //=; rewrite inE.
Qed.
Lemma enum_msetn n a : msetn n a = nseq n a :> seq K.
Proof.
(* Goal: @eq (list (Choice.sort K)) (@EnumMset.f K (@msetn K n a)) (@nseq (Choice.sort K) n a) *)
case: n => [|n]; first by rewrite msetn0 /= enum_mset0.
(* Goal: @eq (list (Choice.sort K)) (@EnumMset.f K (@msetn K (S n) a)) (@nseq (Choice.sort K) (S n) a) *)
rewrite unlock finsupp_msetn /= enum_fsetE /= enum_fset1 /= cats0.
(* Goal: @eq (list (Choice.sort K)) (@nseq (Choice.sort K) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) (@msetn K (S n) a) a) a) (@cons (Choice.sort K) a (@nseq (Choice.sort K) n a)) *)
by rewrite msetE eqxx.
Qed.
Section big.
Variables (R : Type) (idx : R) (op : Monoid.law idx).
Implicit Types (X : {mset K}) (P : pred K) (F : K -> R).
Lemma big_mset0 P F : \big[op/idx]_(i <- mset0 | P i) F i = idx.
Proof.
(* Goal: @eq R (@BigOp.bigop R (Choice.sort K) idx (@EnumMset.f K (@mset0 K)) (fun i : Choice.sort K => @BigBody R (Choice.sort K) i (@Monoid.operator R idx op) (P i) (F i))) idx *)
by rewrite enum_mset0 big_nil.
Qed.
Lemma big_msetn n a P F :
\big[op/idx]_(i <- msetn n a | P i) F i =
if P a then iterop n op (F a) idx else idx.
Proof.
(* Goal: @eq R (@BigOp.bigop R (Choice.sort K) idx (@EnumMset.f K (@msetn K n a)) (fun i : Choice.sort K => @BigBody R (Choice.sort K) i (@Monoid.operator R idx op) (P i) (F i))) (if P a then @iterop R n (@Monoid.operator R idx op) (F a) idx else idx) *)
by rewrite enum_msetn big_nseq_cond Monoid.iteropE.
Qed.
End big.
Lemma msetDC (A B : {mset K}) : A `+` B = B `+` A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K A B) (@msetD K B A) *)
by apply/msetP=> a; rewrite !msetE addnC.
Qed.
Lemma msetIC (A B : {mset K}) : A `&` B = B `&` A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A B) (@msetI K B A) *)
by apply/msetP=> a; rewrite !msetE minnC.
Qed.
Lemma msetUC (A B : {mset K}) : A `|` B = B `|` A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A B) (@msetU K B A) *)
by apply/msetP => a; rewrite !msetE maxnC.
Qed.
Lemma mset0I A : mset0 `&` A = mset0.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@mset0 K) A) (@mset0 K) *)
by apply/msetP => x; rewrite !msetE min0n.
Qed.
Lemma msetI0 A : A `&` mset0 = mset0.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@mset0 K)) (@mset0 K) *)
by rewrite msetIC mset0I.
Qed.
Lemma msetIA A B C : A `&` (B `&` C) = A `&` B `&` C.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetI K B C)) (@msetI K (@msetI K A B) C) *)
by apply/msetP=> x; rewrite !msetE minnA.
Qed.
Lemma msetICA A B C : A `&` (B `&` C) = B `&` (A `&` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetI K B C)) (@msetI K B (@msetI K A C)) *)
by rewrite !msetIA (msetIC A).
Qed.
Lemma msetIAC A B C : A `&` B `&` C = A `&` C `&` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetI K A B) C) (@msetI K (@msetI K A C) B) *)
by rewrite -!msetIA (msetIC B).
Qed.
Lemma msetIACA A B C D : (A `&` B) `&` (C `&` D) = (A `&` C) `&` (B `&` D).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetI K A B) (@msetI K C D)) (@msetI K (@msetI K A C) (@msetI K B D)) *)
by rewrite -!msetIA (msetICA B).
Qed.
Lemma msetIid A : A `&` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A A) A *)
by apply/msetP=> x; rewrite !msetE minnn.
Qed.
Lemma msetIIl A B C : A `&` B `&` C = (A `&` C) `&` (B `&` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetI K A B) C) (@msetI K (@msetI K A C) (@msetI K B C)) *)
by rewrite msetIA !(msetIAC _ C) -(msetIA _ C) msetIid.
Qed.
Lemma msetIIr A B C : A `&` (B `&` C) = (A `&` B) `&` (A `&` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetI K B C)) (@msetI K (@msetI K A B) (@msetI K A C)) *)
by rewrite !(msetIC A) msetIIl.
Qed.
Lemma mset0U A : mset0 `|` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@mset0 K) A) A *)
by apply/msetP => x; rewrite !msetE max0n.
Qed.
Lemma msetU0 A : A `|` mset0 = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@mset0 K)) A *)
by rewrite msetUC mset0U.
Qed.
Lemma msetUA A B C : A `|` (B `|` C) = A `|` B `|` C.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@msetU K B C)) (@msetU K (@msetU K A B) C) *)
by apply/msetP=> x; rewrite !msetE maxnA.
Qed.
Lemma msetUCA A B C : A `|` (B `|` C) = B `|` (A `|` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@msetU K B C)) (@msetU K B (@msetU K A C)) *)
by rewrite !msetUA (msetUC B).
Qed.
Lemma msetUAC A B C : A `|` B `|` C = A `|` C `|` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetU K A B) C) (@msetU K (@msetU K A C) B) *)
by rewrite -!msetUA (msetUC B).
Qed.
Lemma msetUACA A B C D : (A `|` B) `|` (C `|` D) = (A `|` C) `|` (B `|` D).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetU K A B) (@msetU K C D)) (@msetU K (@msetU K A C) (@msetU K B D)) *)
by rewrite -!msetUA (msetUCA B).
Qed.
Lemma msetUid A : A `|` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A A) A *)
by apply/msetP=> x; rewrite !msetE maxnn.
Qed.
Lemma msetUUl A B C : A `|` B `|` C = (A `|` C) `|` (B `|` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetU K A B) C) (@msetU K (@msetU K A C) (@msetU K B C)) *)
by rewrite msetUA !(msetUAC _ C) -(msetUA _ C) msetUid.
Qed.
Lemma msetUUr A B C : A `|` (B `|` C) = (A `|` B) `|` (A `|` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@msetU K B C)) (@msetU K (@msetU K A B) (@msetU K A C)) *)
by rewrite !(msetUC A) msetUUl.
Qed.
Lemma mset0D A : mset0 `+` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K (@mset0 K) A) A *)
by apply/msetP => x; rewrite !msetE add0n.
Qed.
Lemma msetD0 A : A `+` mset0 = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K A (@mset0 K)) A *)
by rewrite msetDC mset0D.
Qed.
Lemma msetDA A B C : A `+` (B `+` C) = A `+` B `+` C.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K A (@msetD K B C)) (@msetD K (@msetD K A B) C) *)
by apply/msetP=> x; rewrite !msetE addnA.
Qed.
Lemma msetDCA A B C : A `+` (B `+` C) = B `+` (A `+` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K A (@msetD K B C)) (@msetD K B (@msetD K A C)) *)
by rewrite !msetDA (msetDC B).
Qed.
Lemma msetDAC A B C : A `+` B `+` C = A `+` C `+` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K (@msetD K A B) C) (@msetD K (@msetD K A C) B) *)
by rewrite -!msetDA (msetDC B).
Qed.
Lemma msetDACA A B C D : (A `+` B) `+` (C `+` D) = (A `+` C) `+` (B `+` D).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K (@msetD K A B) (@msetD K C D)) (@msetD K (@msetD K A C) (@msetD K B D)) *)
by rewrite -!msetDA (msetDCA B).
Qed.
Lemma msetU1l x A B : x \in A -> x \in A `|` B.
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)), is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K A B))) *)
by move=> Ax /=; rewrite inE Ax.
Qed.
Lemma msetU1r A b : b \in A `|` [mset b].
Proof.
(* Goal: is_true (@in_mem (Choice.sort K) b (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K A (@msetn K (S O) b)))) *)
by rewrite !inE eqxx orbT.
Qed.
Lemma msetB1P x A b : reflect ((x = b -> A x > 1) /\ x \in A) (x \in A `\ b).
Lemma msetB11 b A : (b \in A `\ b) = (A b > 1).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) b (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetB K A (@msetn K (S O) b)))) (leq (S (S O)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A b)) *)
by rewrite inE eqxx /= in_mset -geq_max.
Qed.
Lemma msetB1K a A : a \in A -> a +` (A `\ a) = A.
Proof.
(* Goal: forall _ : is_true (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K (@msetn K (S O) a) (@msetB K A (@msetn K (S O) a))) A *)
move=> aA; apply/msetP=> x; rewrite !msetE subnKC //=.
(* Goal: is_true (leq (if @eq_op (Choice.eqType K) x a then S O else O) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x)) *)
by have [->|//] := altP eqP; rewrite mset_gt0.
Qed.
Lemma msetD1K a B : (a +` B) `\ a = B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K (@msetD K (@msetn K (S O) a) B) (@msetn K (S O) a)) B *)
by apply/msetP => x; rewrite !msetE addKn.
Qed.
Lemma msetU1K a B : a \notin B -> (a |` B) `\ a = B.
Proof.
(* Goal: forall _ : is_true (negb (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B))), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K (@msetU K (@msetn K (S O) a) B) (@msetn K (S O) a)) B *)
move=> aB; apply/msetP=> x; rewrite !msetE.
(* Goal: @eq (Equality.sort nat_eqType) (subn (maxn (if @eq_op (Choice.eqType K) x a then S O else O) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B x)) (if @eq_op (Choice.eqType K) x a then S O else O)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B x) *)
have [->|] := altP eqP; first by rewrite (mset_eq0P _).
(* Goal: forall _ : is_true (negb (@eq_op (Choice.eqType K) x a)), @eq (Equality.sort nat_eqType) (subn (maxn O (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B x)) O) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B x) *)
by rewrite max0n subn0.
Qed.
Lemma mset1U1 x B : x \in x |` B. Proof. by rewrite !inE eqxx. Qed.
Proof.
(* Goal: is_true (@in_mem (Choice.sort K) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K (@msetn K (S O) x) B))) *)
by rewrite !inE eqxx.
Qed.
Lemma mset1Ur x a B : x \in B -> x \in a |` B.
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B)), is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K (@msetn K (S O) a) B))) *)
by move=> Bx; rewrite !inE predU1r.
Qed.
Lemma mset1Dr x a B : x \in B -> x \in a +` B.
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B)), is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K (@msetn K (S O) a) B))) *)
by move=> Bx; rewrite !inE predU1r.
Qed.
Lemma mset2P x a b : reflect (x = a \/ x = b) (x \in [mset a; b]).
Proof.
(* Goal: Bool.reflect (or (@eq (Choice.sort K) x a) (@eq (Choice.sort K) x b)) (@in_mem (Choice.sort K) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K (@msetn K (S O) a) (@msetn K (S O) b)))) *)
by rewrite !inE; apply: (iffP orP) => [] [] /eqP; intuition.
Qed.
Lemma in_mset2 x a b : (x \in [mset a; b]) = (x == a) || (x == b).
Proof.
(* Goal: @eq bool (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K (@msetn K (S O) a) (@msetn K (S O) b)))) (orb (@eq_op (Choice.eqType K) x a) (@eq_op (Choice.eqType K) x b)) *)
by rewrite !inE.
Qed.
Lemma mset21 a b : a \in [mset a; b]. Proof. by rewrite mset1D1. Qed.
Proof.
(* Goal: is_true (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K (@msetn K (S O) a) (@msetn K (S O) b)))) *)
by rewrite mset1D1.
Qed.
Lemma msetUP x A B : reflect (x \in A \/ x \in B) (x \in A `|` B).
Proof.
(* Goal: Bool.reflect (or (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B)))) (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K A B))) *)
by rewrite !inE; exact: orP.
Qed.
Lemma msetDP x A B : reflect (x \in A \/ x \in B) (x \in A `+` B).
Proof.
(* Goal: Bool.reflect (or (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B)))) (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K A B))) *)
by rewrite !inE; exact: orP.
Qed.
Lemma msetULVR x A B : x \in A `|` B -> (x \in A) + (x \in B).
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K A B))), sum (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B))) *)
by rewrite inE; case: (x \in A); [left|right].
Qed.
Lemma msetDLVR x A B : x \in A `+` B -> (x \in A) + (x \in B).
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetD K A B))), sum (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B))) *)
by rewrite inE; case: (x \in A); [left|right].
Qed.
Lemma msetIUr A B C : A `&` (B `|` C) = (A `&` B) `|` (A `&` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetU K B C)) (@msetU K (@msetI K A B) (@msetI K A C)) *)
by apply/msetP=> x; rewrite !msetE minn_maxr.
Qed.
Lemma msetIUl A B C : (A `|` B) `&` C = (A `&` C) `|` (B `&` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetU K A B) C) (@msetU K (@msetI K A C) (@msetI K B C)) *)
by apply/msetP=> x; rewrite !msetE minn_maxl.
Qed.
Lemma msetUIr A B C : A `|` (B `&` C) = (A `|` B) `&` (A `|` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@msetI K B C)) (@msetI K (@msetU K A B) (@msetU K A C)) *)
by apply/msetP=> x; rewrite !msetE maxn_minr.
Qed.
Lemma msetUIl A B C : (A `&` B) `|` C = (A `|` C) `&` (B `|` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetI K A B) C) (@msetI K (@msetU K A C) (@msetU K B C)) *)
by apply/msetP=> x; rewrite !msetE maxn_minl.
Qed.
Lemma msetUKC A B : (A `|` B) `&` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetU K A B) A) A *)
by apply/msetP=> x; rewrite !msetE maxnK.
Qed.
Lemma msetUK A B : (B `|` A) `&` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetU K B A) A) A *)
by rewrite msetUC msetUKC.
Qed.
Lemma msetKUC A B : A `&` (B `|` A) = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetU K B A)) A *)
by rewrite msetIC msetUK.
Qed.
Lemma msetKU A B : A `&` (A `|` B) = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetU K A B)) A *)
by rewrite msetIC msetUKC.
Qed.
Lemma msetIKC A B : (A `&` B) `|` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetI K A B) A) A *)
by apply/msetP=> x; rewrite !msetE minnK.
Qed.
Lemma msetIK A B : (B `&` A) `|` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetI K B A) A) A *)
by rewrite msetIC msetIKC.
Qed.
Lemma msetKIC A B : A `|` (B `&` A) = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@msetI K B A)) A *)
by rewrite msetUC msetIK.
Qed.
Lemma msetKI A B : A `|` (A `&` B) = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@msetI K A B)) A *)
by rewrite msetIC msetKIC.
Qed.
Lemma msetUKid A B : B `|` A `|` A = B `|` A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetU K B A) A) (@msetU K B A) *)
by rewrite -msetUA msetUid.
Qed.
Lemma msetUKidC A B : A `|` B `|` A = A `|` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetU K A B) A) (@msetU K A B) *)
by rewrite msetUAC msetUid.
Qed.
Lemma msetKUid A B : A `|` (A `|` B) = A `|` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@msetU K A B)) (@msetU K A B) *)
by rewrite msetUA msetUid.
Qed.
Lemma msetKUidC A B : A `|` (B `|` A) = B `|` A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A (@msetU K B A)) (@msetU K B A) *)
by rewrite msetUCA msetUid.
Qed.
Lemma msetIKid A B : B `&` A `&` A = B `&` A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetI K B A) A) (@msetI K B A) *)
by rewrite -msetIA msetIid.
Qed.
Lemma msetIKidC A B : A `&` B `&` A = A `&` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetI K A B) A) (@msetI K A B) *)
by rewrite msetIAC msetIid.
Qed.
Lemma msetKIid A B : A `&` (A `&` B) = A `&` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetI K A B)) (@msetI K A B) *)
by rewrite msetIA msetIid.
Qed.
Lemma msetKIidC A B : A `&` (B `&` A) = B `&` A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetI K B A)) (@msetI K B A) *)
by rewrite msetICA msetIid.
Qed.
Lemma msetDIr A B C : A `+` (B `&` C) = (A `+` B) `&` (A `+` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K A (@msetI K B C)) (@msetI K (@msetD K A B) (@msetD K A C)) *)
by apply/msetP=> x; rewrite !msetE addn_minr.
Qed.
Lemma msetDIl A B C : (A `&` B) `+` C = (A `+` C) `&` (B `+` C).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K (@msetI K A B) C) (@msetI K (@msetD K A C) (@msetD K B C)) *)
by apply/msetP=> x; rewrite !msetE addn_minl.
Qed.
Lemma msetDKIC A B : (A `+` B) `&` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetD K A B) A) A *)
by apply/msetP=> x; rewrite !msetE (minn_idPr _) // leq_addr.
Qed.
Lemma msetDKI A B : (B `+` A) `&` A = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K (@msetD K B A) A) A *)
by rewrite msetDC msetDKIC.
Qed.
Lemma msetKDIC A B : A `&` (B `+` A) = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetD K B A)) A *)
by rewrite msetIC msetDKI.
Qed.
Lemma msetKDI A B : A `&` (A `+` B) = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetD K A B)) A *)
by rewrite msetDC msetKDIC.
Qed.
Lemma msetDKB A : cancel (msetD A) (msetB^~ A).
Proof.
(* Goal: @cancel (@multiset_of K (Phant (Choice.sort K))) (@multiset_of K (Phant (Choice.sort K))) (@msetD K A) (fun x : @multiset_of K (Phant (Choice.sort K)) => @msetB K x A) *)
by move=> B; apply/msetP => a; rewrite !msetE addKn.
Qed.
Lemma msetDKBC A : cancel (msetD^~ A) (msetB^~ A).
Proof.
(* Goal: @cancel (@multiset_of K (Phant (Choice.sort K))) (@multiset_of K (Phant (Choice.sort K))) (fun x : @multiset_of K (Phant (Choice.sort K)) => @msetD K x A) (fun x : @multiset_of K (Phant (Choice.sort K)) => @msetB K x A) *)
by move=> B; rewrite msetDC msetDKB.
Qed.
Lemma msetBSKl A B a : ((a +` A) `\` B) `\ a = A `\` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K (@msetB K (@msetD K (@msetn K (S O) a) A) B) (@msetn K (S O) a)) (@msetB K A B) *)
apply/msetP=> b; rewrite !msetE; case: ifPn; rewrite ?add0n ?subn0 //.
(* Goal: forall _ : is_true (@eq_op (Choice.eqType K) b a), @eq (Equality.sort nat_eqType) (subn (subn (addn (S O) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A b)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B b)) (S O)) (subn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A b) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B b)) *)
by rewrite add1n subn1 subSKn.
Qed.
Lemma msetBDl C A B : (C `+` A) `\` (C `+` B) = A `\` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K (@msetD K C A) (@msetD K C B)) (@msetB K A B) *)
by apply/msetP=> a; rewrite !msetE subnDl.
Qed.
Lemma msetBDr C A B : (A `+` C) `\` (B `+` C) = A `\` B.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K (@msetD K A C) (@msetD K B C)) (@msetB K A B) *)
by apply/msetP=> a; rewrite !msetE subnDr.
Qed.
Lemma msetBDA A B C : B `\` (A `+` C) = B `\` A `\` C.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K B (@msetD K A C)) (@msetB K (@msetB K B A) C) *)
by apply/msetP=> a; rewrite !msetE subnDA.
Qed.
Lemma msetUE A B C : msetU A B = A `+` (B `\` A).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A B) (@msetD K A (@msetB K B A)) *)
by apply/msetP=> a; rewrite !msetE maxnE.
Qed.
Lemma msubsetP {A B} : reflect (forall x, A x <= B x) (A `<=` B).
Proof.
(* Goal: Bool.reflect (forall x : Choice.sort K, is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B x))) (@msubset K A B) *)
apply: (iffP forallP)=> // ? x; case: (in_fsetP (finsupp A) x) => //.
(* Goal: forall _ : is_true (negb (@in_mem (Choice.sort K) x (@mem (Choice.sort K) (finSetPredType K) (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)))), is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B x)) *)
by rewrite msuppE => /mset_eq0P->.
Qed.
Lemma msubset_subset {A B} : A `<=` B -> {subset A <= B}.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), @sub_mem (Equality.sort (Choice.eqType K)) (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A) (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B) *)
by move=> /msubsetP AB x; rewrite !in_mset => ?; exact: (leq_trans _ (AB _)).
Qed.
Lemma msetB_eq0 (A B : {mset K}) : (A `\` B == mset0) = (A `<=` B).
Proof.
(* Goal: @eq bool (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) (@msetB K A B) (@mset0 K)) (@msubset K A B) *)
apply/mset_eqP/msubsetP => AB a; by have := AB a; rewrite !msetE -subn_eq0 => /eqP.
Qed.
Hint Resolve msubset_refl.
Lemma msubset_trans : transitive (@msubset K).
Proof.
(* Goal: @transitive (@multiset_of K (Phant (Choice.sort K))) (@msubset K) *)
move=> y x z /msubsetP xy /msubsetP yz ; apply/msubsetP => a.
(* Goal: is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) x a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) z a)) *)
by apply: (leq_trans (xy _)).
Qed.
Arguments msubset_trans {C A B} _ _ : rename.
Lemma msetUS C A B : A `<=` B -> C `|` A `<=` C `|` B.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), is_true (@msubset K (@msetU K C A) (@msetU K C B)) *)
move=> sAB; apply/msubsetP=> x; rewrite !msetE.
(* Goal: is_true (leq (maxn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) C x) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x)) (maxn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) C x) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B x))) *)
by rewrite geq_max !leq_max leqnn (msubsetP sAB) orbT.
Qed.
Lemma msetDS C A B : A `<=` B -> C `+` A `<=` C `+` B.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), is_true (@msubset K (@msetD K C A) (@msetD K C B)) *)
by move=> /msubsetP sAB; apply/msubsetP=> x; rewrite !msetE leq_add2l.
Qed.
Lemma msetSU C A B : A `<=` B -> A `|` C `<=` B `|` C.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), is_true (@msubset K (@msetU K A C) (@msetU K B C)) *)
by move=> sAB; rewrite -!(msetUC C) msetUS.
Qed.
Lemma msetSD C A B : A `<=` B -> A `+` C `<=` B `+` C.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), is_true (@msubset K (@msetD K A C) (@msetD K B C)) *)
by move=> sAB; rewrite -!(msetDC C) msetDS.
Qed.
Lemma msetUSS A B C D : A `<=` C -> B `<=` D -> A `|` B `<=` C `|` D.
Proof.
(* Goal: forall (_ : is_true (@msubset K A C)) (_ : is_true (@msubset K B D)), is_true (@msubset K (@msetU K A B) (@msetU K C D)) *)
by move=> /(msetSU B) /msubset_trans sAC /(msetUS C)/sAC.
Qed.
Lemma msetDSS A B C D : A `<=` C -> B `<=` D -> A `+` B `<=` C `+` D.
Proof.
(* Goal: forall (_ : is_true (@msubset K A C)) (_ : is_true (@msubset K B D)), is_true (@msubset K (@msetD K A B) (@msetD K C D)) *)
by move=> /(msetSD B) /msubset_trans sAC /(msetDS C)/sAC.
Qed.
Lemma msetIidPl {A B} : reflect (A `&` B = A) (A `<=` B).
Proof.
(* Goal: Bool.reflect (@eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A B) A) (@msubset K A B) *)
apply: (iffP msubsetP) => [?|<- a]; last by rewrite !msetE geq_min leqnn orbT.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A B) A *)
by apply/msetP => a; rewrite !msetE (minn_idPl _).
Qed.
Lemma msetIidPr {A B} : reflect (A `&` B = B) (B `<=` A).
Proof.
(* Goal: Bool.reflect (@eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A B) B) (@msubset K B A) *)
by rewrite msetIC; apply: msetIidPl.
Qed.
Lemma msubsetIidl A B : (A `<=` A `&` B) = (A `<=` B).
Proof.
(* Goal: @eq bool (@msubset K A (@msetI K A B)) (@msubset K A B) *)
apply/msubsetP/msubsetP=> sAB a; have := sAB a; rewrite !msetE.
(* Goal: forall _ : is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a)), is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (minn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a))) *)
(* Goal: forall _ : is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (minn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a))), is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a)) *)
by rewrite leq_min leqnn.
(* Goal: forall _ : is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a)), is_true (leq (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (minn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a))) *)
by move/minn_idPl->.
Qed.
Lemma msubsetIidr A B : (B `<=` A `&` B) = (B `<=` A).
Proof.
(* Goal: @eq bool (@msubset K B (@msetI K A B)) (@msubset K B A) *)
by rewrite msetIC msubsetIidl.
Qed.
Lemma msetUidPr A B : reflect (A `|` B = B) (A `<=` B).
Proof.
(* Goal: Bool.reflect (@eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A B) B) (@msubset K A B) *)
apply: (iffP msubsetP) => [AB|<- a]; last by rewrite !msetE leq_max leqnn.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A B) B *)
by apply/msetP=> a; rewrite !msetE (maxn_idPr _).
Qed.
Lemma msetUidPl A B : reflect (A `|` B = A) (B `<=` A).
Proof.
(* Goal: Bool.reflect (@eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K A B) A) (@msubset K B A) *)
by rewrite msetUC; apply/msetUidPr.
Qed.
Lemma msubsetUl A B : A `<=` A `|` B.
Proof.
(* Goal: is_true (@msubset K A (@msetU K A B)) *)
by apply/msubsetP=> a; rewrite !msetE leq_maxl.
Qed.
Hint Resolve msubsetUl.
Lemma msubsetUr A B : B `<=` (A `|` B).
Proof.
(* Goal: is_true (@msubset K B (@msetU K A B)) *)
by rewrite msetUC.
Qed.
Hint Resolve msubsetUr.
Lemma msubsetU1 x A : A `<=` (x |` A).
Proof.
(* Goal: is_true (@msubset K A (@msetU K (@msetn K (S O) x) A)) *)
by rewrite msubsetUr.
Qed.
Hint Resolve msubsetU1.
Lemma msubsetU A B C : (A `<=` B) || (A `<=` C) -> A `<=` (B `|` C).
Proof.
(* Goal: forall _ : is_true (orb (@msubset K A B) (@msubset K A C)), is_true (@msubset K A (@msetU K B C)) *)
by move=> /orP [] /msubset_trans ->.
Qed.
Lemma eqEmsubset A B : (A == B) = (A `<=` B) && (B `<=` A).
Proof.
(* Goal: @eq bool (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A B) (andb (@msubset K A B) (@msubset K B A)) *)
apply/eqP/andP => [<-|[/msubsetP AB /msubsetP BA]]; first by split.
(* Goal: @eq (Equality.sort (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O))) A B *)
by apply/msetP=> a; apply/eqP; rewrite eqn_leq AB BA.
Qed.
Lemma msubEproper A B : A `<=` B = (A == B) || (A `<` B).
Proof.
(* Goal: @eq bool (@msubset K A B) (orb (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A B) (@mproper K A B)) *)
by rewrite eqEmsubset -andb_orr orbN andbT.
Qed.
Lemma mproper_sub A B : A `<` B -> A `<=` B.
Proof.
(* Goal: forall _ : is_true (@mproper K A B), is_true (@msubset K A B) *)
by rewrite msubEproper orbC => ->.
Qed.
Lemma eqVmproper A B : A `<=` B -> A = B \/ A `<` B.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), or (@eq (@multiset_of K (Phant (Choice.sort K))) A B) (is_true (@mproper K A B)) *)
by rewrite msubEproper => /predU1P.
Qed.
Lemma mproperEneq A B : A `<` B = (A != B) && (A `<=` B).
Proof.
(* Goal: @eq bool (@mproper K A B) (andb (negb (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A B)) (@msubset K A B)) *)
by rewrite andbC eqEmsubset negb_and andb_orr andbN.
Qed.
Lemma mproper_neq A B : A `<` B -> A != B.
Proof.
(* Goal: forall _ : is_true (@mproper K A B), is_true (negb (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A B)) *)
by rewrite mproperEneq; case/andP.
Qed.
Lemma eqEmproper A B : (A == B) = (A `<=` B) && ~~ (A `<` B).
Proof.
(* Goal: @eq bool (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A B) (andb (@msubset K A B) (negb (@mproper K A B))) *)
by rewrite negb_and negbK andb_orr andbN eqEmsubset.
Qed.
Lemma msub0set A : msubset mset0 A.
Proof.
(* Goal: is_true (@msubset K (@mset0 K) A) *)
by apply/msubsetP=> x; rewrite msetE.
Qed.
Hint Resolve msub0set.
Lemma msubset0 A : (A `<=` mset0) = (A == mset0).
Proof.
(* Goal: @eq bool (@msubset K A (@mset0 K)) (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A (@mset0 K)) *)
by rewrite eqEmsubset msub0set andbT.
Qed.
Lemma mproper0 A : (mproper mset0 A) = (A != mset0).
Proof.
(* Goal: @eq bool (@mproper K (@mset0 K) A) (negb (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A (@mset0 K))) *)
by rewrite /mproper msub0set msubset0.
Qed.
Lemma mproperE A B : (A `<` B) = (A `<=` B) && ~~ (msubset B A).
Proof.
(* Goal: @eq bool (@mproper K A B) (andb (@msubset K A B) (negb (@msubset K B A))) *)
by [].
Qed.
Lemma mproper_sub_trans B A C : A `<` B -> B `<=` C -> A `<` C.
Proof.
(* Goal: forall (_ : is_true (@mproper K A B)) (_ : is_true (@msubset K B C)), is_true (@mproper K A C) *)
move=> /andP [AB NBA] BC; rewrite /mproper (msubset_trans AB) //=.
(* Goal: is_true (negb (@msubset K C A)) *)
by apply: contra NBA=> /(msubset_trans _)->.
Qed.
Lemma msub_proper_trans B A C :
A `<=` B -> B `<` C -> A `<` C.
Proof.
(* Goal: forall (_ : is_true (@msubset K A B)) (_ : is_true (@mproper K B C)), is_true (@mproper K A C) *)
move=> AB /andP [CB NCB]; rewrite /mproper (msubset_trans AB) //=.
(* Goal: is_true (negb (@msubset K C A)) *)
by apply: contra NCB=> /msubset_trans->.
Qed.
Lemma msubset_neq0 A B : A `<=` B -> A != mset0 -> B != mset0.
Proof.
(* Goal: forall (_ : is_true (@msubset K A B)) (_ : is_true (negb (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A (@mset0 K)))), is_true (negb (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) B (@mset0 K))) *)
by rewrite -!mproper0 => sAB /mproper_sub_trans->.
Qed.
Lemma msetBDKC A B : A `<=` B -> A `+` (B `\` A) = B.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K A (@msetB K B A)) B *)
by move=> /msubsetP AB; apply/msetP=> a; rewrite !msetE subnKC.
Qed.
Lemma msetBDK A B : A `<=` B -> B `\` A `+` A = B.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K (@msetB K B A) A) B *)
by move=> /msubsetP AB; apply/msetP => a; rewrite !msetE subnK.
Qed.
Lemma msetBBK A B : A `<=` B -> B `\` (B `\` A) = A.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K B (@msetB K B A)) A *)
by move=> /msubsetP AB; apply/msetP => a; rewrite !msetE subKn.
Qed.
Lemma msetBD1K A B a : A `<=` B -> A a < B a -> a +` (B `\` (a +` A)) = B `\` A.
Proof.
(* Goal: forall (_ : is_true (@msubset K A B)) (_ : is_true (leq (S (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B a))), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K (@msetn K (S O) a) (@msetB K B (@msetD K (@msetn K (S O) a) A))) (@msetB K B A) *)
move=> /msubsetP AB ABa; apply/msetP => b; rewrite !msetE.
(* Goal: @eq (Equality.sort nat_eqType) (addn (if @eq_op (Choice.eqType K) b a then S O else O) (subn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B b) (addn (if @eq_op (Choice.eqType K) b a then S O else O) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A b)))) (subn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B b) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A b)) *)
by case: ifP => //= /eqP->; rewrite !add1n subnSK.
Qed.
Lemma subset_msetBLR A B C : (msubset (A `\` B) C) = (A `<=` B `+` C).
Proof.
(* Goal: @eq bool (@msubset K (@msetB K A B) C) (@msubset K A (@msetD K B C)) *)
apply/msubsetP/msubsetP => [] sABC a; by have := sABC a; rewrite !msetE ?leq_subLR.
Qed.
Lemma msetnP n x a : reflect (0 < n /\ x = a) (x \in msetn n a).
Proof.
(* Goal: Bool.reflect (and (is_true (leq (S O) n)) (@eq (Choice.sort K) x a)) (@in_mem (Choice.sort K) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetn K n a))) *)
by do [apply: (iffP idP); rewrite !inE] => [/andP[]|[]] -> /eqP.
Qed.
Lemma gt0_msetnP n x a : 0 < n -> reflect (x = a) (x \in msetn n a).
Proof.
(* Goal: forall _ : is_true (leq (S O) n), Bool.reflect (@eq (Choice.sort K) x a) (@in_mem (Choice.sort K) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetn K n a))) *)
by move=> n_gt0; rewrite inE n_gt0 /=; exact: eqP.
Qed.
Lemma msetn1 n a : a \in msetn n a = (n > 0).
Proof.
(* Goal: @eq bool (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetn K n a))) (leq (S O) n) *)
by rewrite inE eqxx andbT.
Qed.
Lemma mset1P x a : reflect (x = a) (x \in [mset a]).
Proof.
(* Goal: Bool.reflect (@eq (Choice.sort K) x a) (@in_mem (Choice.sort K) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetn K (S O) a))) *)
by rewrite inE; exact: eqP.
Qed.
Lemma msetn_inj n : n > 0 -> injective (@msetn K n).
Lemma mset1UP x a B : reflect (x = a \/ x \in B) (x \in a |` B).
Proof.
(* Goal: Bool.reflect (or (@eq (Choice.sort K) x a) (is_true (@in_mem (Choice.sort K) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B)))) (@in_mem (Choice.sort K) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetU K (@msetn K (S O) a) B))) *)
by rewrite !inE; exact: predU1P.
Qed.
Lemma mset_cons a s : seq_mset (a :: s) = a +` (seq_mset s).
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@seq_mset K (@cons (Choice.sort K) a s)) (@msetD K (@msetn K (S O) a) (@seq_mset K s)) *)
by apply/msetP=> x; rewrite !msetE /= eq_sym.
Qed.
Lemma msetIP x A B : reflect (x \in A /\ x \in B) (x \in A `&` B).
Proof.
(* Goal: Bool.reflect (and (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))) (is_true (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) B)))) (@in_mem (Equality.sort (Choice.eqType K)) x (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) (@msetI K A B))) *)
by rewrite inE; apply: andP.
Qed.
Lemma msetIS C A B : A `<=` B -> C `&` A `<=` C `&` B.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), is_true (@msubset K (@msetI K C A) (@msetI K C B)) *)
move=> sAB; apply/msubsetP=> x; rewrite !msetE.
(* Goal: is_true (leq (minn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) C x) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x)) (minn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) C x) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) B x))) *)
by rewrite leq_min !geq_min leqnn (msubsetP sAB) orbT.
Qed.
Lemma msetSI C A B : A `<=` B -> A `&` C `<=` B `&` C.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), is_true (@msubset K (@msetI K A C) (@msetI K B C)) *)
by move=> sAB; rewrite -!(msetIC C) msetIS.
Qed.
Lemma msetISS A B C D : A `<=` C -> B `<=` D -> A `&` B `<=` C `&` D.
Proof.
(* Goal: forall (_ : is_true (@msubset K A C)) (_ : is_true (@msubset K B D)), is_true (@msubset K (@msetI K A B) (@msetI K C D)) *)
by move=> /(msetSI B) /msubset_trans sAC /(msetIS C) /sAC.
Qed.
Lemma msetSB C A B : A `<=` B -> A `\` C `<=` B `\` C.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), is_true (@msubset K (@msetB K A C) (@msetB K B C)) *)
by move=> /msubsetP sAB; apply/msubsetP=> x; rewrite !msetE leq_sub2r.
Qed.
Lemma msetBS C A B : A `<=` B -> C `\` B `<=` C `\` A.
Proof.
(* Goal: forall _ : is_true (@msubset K A B), is_true (@msubset K (@msetB K C B) (@msetB K C A)) *)
by move=> /msubsetP sAB; apply/msubsetP=> x; rewrite !msetE leq_sub2l.
Qed.
Lemma msetBSS A B C D : A `<=` C -> D `<=` B -> A `\` B `<=` C `\` D.
Proof.
(* Goal: forall (_ : is_true (@msubset K A C)) (_ : is_true (@msubset K D B)), is_true (@msubset K (@msetB K A B) (@msetB K C D)) *)
by move=> /(msetSB B) /msubset_trans sAC /(msetBS C) /sAC.
Qed.
Lemma msetB0 A : A `\` mset0 = A.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K A (@mset0 K)) A *)
by apply/msetP=> x; rewrite !msetE subn0.
Qed.
Lemma mset0B A : mset0 `\` A = mset0.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K (@mset0 K) A) (@mset0 K) *)
by apply/msetP=> x; rewrite !msetE sub0n.
Qed.
Lemma msetBxx A : A `\` A = mset0.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K A A) (@mset0 K) *)
by apply/msetP=> x; rewrite !msetE subnn.
Qed.
Lemma msubsetIl A B : A `&` B `<=` A.
Proof.
(* Goal: is_true (@msubset K (@msetI K A B) A) *)
by apply/msubsetP=> x; rewrite msetE geq_minl.
Qed.
Lemma msubsetIr A B : A `&` B `<=` B.
Proof.
(* Goal: is_true (@msubset K (@msetI K A B) B) *)
by apply/msubsetP=> x; rewrite msetE geq_minr.
Qed.
Lemma msubsetDl A B : A `\` B `<=` A.
Proof.
(* Goal: is_true (@msubset K (@msetB K A B) A) *)
by apply/msubsetP=> x; rewrite msetE leq_subLR leq_addl.
Qed.
Lemma msubD1set A x : A `\ x `<=` A.
Proof.
(* Goal: is_true (@msubset K (@msetB K A (@msetn K (S O) x)) A) *)
by rewrite msubsetDl.
Qed.
Hint Resolve msubsetIl msubsetIr msubsetDl msubD1set.
Lemma mem_mset1U a A : a \in A -> a |` A = A.
Proof.
(* Goal: forall _ : is_true (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A)), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetU K (@msetn K (S O) a) A) A *)
rewrite in_mset => aA; apply/msetP => x; rewrite !msetE (maxn_idPr _) //.
(* Goal: is_true (leq (if @eq_op (Choice.eqType K) x a then S O else O) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x)) *)
by have [->|//] := altP eqP; rewrite (leq_trans _ aA).
Qed.
Lemma mem_msetD1 a A : a \notin A -> A `\ a = A.
Proof.
(* Goal: forall _ : is_true (negb (@in_mem (Choice.sort K) a (@mem (Equality.sort (Choice.eqType K)) (multiset_predType K) A))), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetB K A (@msetn K (S O) a)) A *)
move=> /mset_eq0P aA; apply/msetP => x; rewrite !msetE.
(* Goal: @eq (Equality.sort nat_eqType) (subn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x) (if @eq_op (Choice.eqType K) x a then S O else O)) (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A x) *)
by have [->|] := altP eqP; rewrite ?aA ?subn0.
Qed.
Lemma msetIn a A n : A `&` msetn n a = msetn (minn (A a) n) a.
Proof.
(* Goal: @eq (@multiset_of K (Phant (Choice.sort K))) (@msetI K A (@msetn K n a)) (@msetn K (minn (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a) n) a) *)
by apply/msetP => x; rewrite !msetE; have [->|] := altP eqP; rewrite ?minn0.
Qed.
Lemma msubIset A B C : (B `<=` A) || (C `<=` A) -> (B `&` C `<=` A).
Proof.
(* Goal: forall _ : is_true (orb (@msubset K B A) (@msubset K C A)), is_true (@msubset K (@msetI K B C) A) *)
by case/orP; apply: msubset_trans; rewrite (msubsetIl, msubsetIr).
Qed.
Lemma msubsetI A B C : (A `<=` B `&` C) = (A `<=` B) && (A `<=` C).
Proof.
(* Goal: @eq bool (@msubset K A (@msetI K B C)) (andb (@msubset K A B) (@msubset K A C)) *)
rewrite !(sameP msetIidPl eqP) msetIA; have [-> //| ] := altP (A `&` B =P A).
(* Goal: forall _ : is_true (negb (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) (@msetI K A B) A)), @eq bool (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) (@msetI K (@msetI K A B) C) A) (andb false (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) (@msetI K A C) A)) *)
by apply: contraNF => /eqP <-; rewrite -msetIA -msetIIl msetIAC.
Qed.
Lemma msubsetIP A B C : reflect (A `<=` B /\ A `<=` C) (A `<=` B `&` C).
Proof.
(* Goal: Bool.reflect (and (is_true (@msubset K A B)) (is_true (@msubset K A C))) (@msubset K A (@msetI K B C)) *)
by rewrite msubsetI; exact: andP.
Qed.
Lemma msubUset A B C : (B `|` C `<=` A) = (B `<=` A) && (C `<=` A).
Proof.
(* Goal: @eq bool (@msubset K (@msetU K B C) A) (andb (@msubset K B A) (@msubset K C A)) *)
apply/idP/idP => [subA|/andP [AB CA]]; last by rewrite -[A]msetUid msetUSS.
(* Goal: is_true (andb (@msubset K B A) (@msubset K C A)) *)
by rewrite !(msubset_trans _ subA).
Qed.
Lemma msubUsetP A B C : reflect (A `<=` C /\ B `<=` C) (A `|` B `<=` C).
Proof.
(* Goal: Bool.reflect (and (is_true (@msubset K A C)) (is_true (@msubset K B C))) (@msubset K (@msetU K A B) C) *)
by rewrite msubUset; exact: andP.
Qed.
Lemma msetU_eq0 A B : (A `|` B == mset0) = (A == mset0) && (B == mset0).
Proof.
(* Goal: @eq bool (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) (@msetU K A B) (@mset0 K)) (andb (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) A (@mset0 K)) (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) B (@mset0 K))) *)
by rewrite -!msubset0 msubUset.
Qed.
Lemma setD_eq0 A B : (A `\` B == mset0) = (A `<=` B).
Proof.
(* Goal: @eq bool (@eq_op (@fsfun_eqType K nat_eqType (fun _ : Choice.sort K => O)) (@msetB K A B) (@mset0 K)) (@msubset K A B) *)
by rewrite -msubset0 subset_msetBLR msetD0.
Qed.
Lemma msub1set A a : ([mset a] `<=` A) = (a \in A).
Lemma msetDBA A B C : C `<=` B -> A `+` B `\` C = (A `+` B) `\` C.
Proof.
(* Goal: forall _ : is_true (@msubset K C B), @eq (@multiset_of K (Phant (Choice.sort K))) (@msetD K A (@msetB K B C)) (@msetB K (@msetD K A B) C) *)
by move=> /msubsetP CB; apply/msetP=> a; rewrite !msetE2 addnBA.
Qed.
Lemma mset_0Vmem A : (A = mset0) + {x : K | x \in A}.
Definition size_mset A : size A = \sum_(a <- finsupp A) A a.
Proof.
(* Goal: @eq nat (@size (Choice.sort K) (@EnumMset.f K A)) (@BigOp.bigop nat (Choice.sort K) O (@enum_fset K (@FinSupp.fs K nat_eqType (fun _ : Choice.sort K => O) A)) (fun a : Choice.sort K => @BigBody nat (Choice.sort K) a addn true (@fun_of_fsfun K nat_eqType (fun _ : Choice.sort K => O) A a))) *)
by rewrite -sum1_size sum_mset; apply: eq_bigr => i; rewrite muln1.
Qed.
Lemma size_mset0 : size (mset0 : {mset K}) = 0.
Proof.
(* Goal: @eq nat (@size (Choice.sort K) (@EnumMset.f K (@mset0 K : @multiset_of K (Phant (Choice.sort K))))) O *)
by rewrite -sum1_size big_mset0.
Qed.
From mathcomp Require Import tuple.
Lemma sum_nat_seq_eq0 (I : eqType) r (P : pred I) (E : I -> nat) :
(\sum_(i <- r | P i) E i == 0) = all [pred i | P i ==> (E i == 0)] r.
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (@BigOp.bigop nat (Equality.sort I) O r (fun i : Equality.sort I => @BigBody nat (Equality.sort I) i addn (P i) (E i))) O) (@all (Equality.sort I) (@pred_of_simpl (Equality.sort I) (@SimplPred (Equality.sort I) (fun i : Equality.sort I => implb (P i) (@eq_op nat_eqType (E i) O)))) r) *)
rewrite big_tnth sum_nat_eq0; apply/forallP/allP => /= HE x.
(* Goal: is_true (implb (P (@tnth (@size (Equality.sort I) r) (Equality.sort I) (@in_tuple (Equality.sort I) r) x)) (@eq_op nat_eqType (E (@tnth (@size (Equality.sort I) r) (Equality.sort I) (@in_tuple (Equality.sort I) r) x)) O)) *)
(* Goal: forall _ : is_true (@in_mem (Equality.sort I) x (@mem (Equality.sort I) (seq_predType I) r)), is_true (implb (P x) (@eq_op nat_eqType (E x) O)) *)
by move=> /seq_tnthP[i ->]; apply: HE.
(* Goal: is_true (implb (P (@tnth (@size (Equality.sort I) r) (Equality.sort I) (@in_tuple (Equality.sort I) r) x)) (@eq_op nat_eqType (E (@tnth (@size (Equality.sort I) r) (Equality.sort I) (@in_tuple (Equality.sort I) r) x)) O)) *)
by apply: HE; rewrite mem_tnth.
Qed.
Lemma size_mset_eq0 A : (size A == 0) = (A == mset0).
End MSetTheory.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq div choice fintype.
From mathcomp
Require Import finfun bigop prime binomial ssralg finset fingroup finalg.
From mathcomp
Require Import perm zmodp matrix.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Import GRing.Theory.
Local Open Scope ring_scope.
Reserved Notation "\rank A" (at level 10, A at level 8, format "\rank A").
Reserved Notation "A ^C" (at level 8, format "A ^C").
Notation "''A_' ( m , n )" := 'M_(m, n ^ 2)
(at level 8, format "''A_' ( m , n )") : type_scope.
Notation "''A_' ( n )" := 'A_(n ^ 2, n)
(at level 8, only parsing) : type_scope.
Notation "''A_' n" := 'A_(n)
(at level 8, n at next level, format "''A_' n") : type_scope.
Notation "''A' [ F ]_ ( m , n )" := 'M[F]_(m, n ^ 2)
(at level 8, only parsing) : type_scope.
Notation "''A' [ F ]_ ( n )" := 'A[F]_(n ^ 2, n)
(at level 8, only parsing) : type_scope.
Notation "''A' [ F ]_ n" := 'A[F]_(n)
(at level 8, n at level 2, only parsing) : type_scope.
Delimit Scope matrix_set_scope with MS.
Local Notation simp := (Monoid.Theory.simpm, oppr0).
Section RowSpaceTheory.
Variable F : fieldType.
Implicit Types m n p r : nat.
Local Notation "''M_' ( m , n )" := 'M[F]_(m, n) : type_scope.
Local Notation "''M_' n" := 'M[F]_(n, n) : type_scope.
Fixpoint Gaussian_elimination {m n} : 'M_(m, n) -> 'M_m * 'M_n * nat :=
match m, n with
| _.+1, _.+1 => fun A : 'M_(1 + _, 1 + _) =>
Let LUr := locked_with Gaussian_elimination_key (@Gaussian_elimination) m n A.
Definition col_ebase := LUr.1.1.
Definition row_ebase := LUr.1.2.
Definition mxrank := if [|| m == 0 | n == 0]%N then 0%N else LUr.2.
Definition row_free := mxrank == m.
Definition row_full := mxrank == n.
Definition row_base : 'M_(mxrank, n) := pid_mx mxrank *m row_ebase.
Definition col_base : 'M_(m, mxrank) := col_ebase *m pid_mx mxrank.
Definition complmx : 'M_n := copid_mx mxrank *m row_ebase.
Definition kermx : 'M_m := copid_mx mxrank *m invmx col_ebase.
Definition cokermx : 'M_n := invmx row_ebase *m copid_mx mxrank.
Definition pinvmx : 'M_(n, m) :=
invmx row_ebase *m pid_mx mxrank *m invmx col_ebase.
End Defs.
Arguments mxrank {m%N n%N} A%MS.
Local Notation "\rank A" := (mxrank A) : nat_scope.
Arguments complmx {m%N n%N} A%MS.
Local Notation "A ^C" := (complmx A) : matrix_set_scope.
Definition submx_def := idfun (fun m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) =>
A *m cokermx B == 0).
Definition submx := locked_with submx_key submx_def.
Canonical submx_unlockable := [unlockable fun submx].
Arguments submx {m1%N m2%N n%N} A%MS B%MS : rename.
Local Notation "A <= B" := (submx A B) : matrix_set_scope.
Local Notation "A <= B <= C" := ((A <= B) && (B <= C))%MS : matrix_set_scope.
Local Notation "A == B" := (A <= B <= A)%MS : matrix_set_scope.
Definition ltmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :=
(A <= B)%MS && ~~ (B <= A)%MS.
Arguments ltmx {m1%N m2%N n%N} A%MS B%MS.
Local Notation "A < B" := (ltmx A B) : matrix_set_scope.
Definition eqmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :=
prod (\rank A = \rank B)
(forall m3 (C : 'M_(m3, n)),
((A <= C) = (B <= C)) * ((C <= A) = (C <= B)))%MS.
Arguments eqmx {m1%N m2%N n%N} A%MS B%MS.
Local Notation "A :=: B" := (eqmx A B) : matrix_set_scope.
Section LtmxIdentities.
Variables (m1 m2 n : nat) (A : 'M_(m1, n)) (B : 'M_(m2, n)).
Lemma ltmxE : (A < B)%MS = ((A <= B)%MS && ~~ (B <= A)%MS). Proof. by []. Qed.
Proof.
(* Goal: @eq bool (@ltmx m1 m2 n A B) (andb (@submx m1 m2 n A B) (negb (@submx m2 m1 n B A))) *)
by [].
Qed.
Lemma ltmxEneq : (A < B)%MS = (A <= B)%MS && ~~ (A == B)%MS.
Proof.
(* Goal: @eq bool (@ltmx m1 m2 n A B) (andb (@submx m1 m2 n A B) (negb (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)))) *)
by apply: andb_id2l => ->.
Qed.
Lemma submxElt : (A <= B)%MS = (A == B)%MS || (A < B)%MS.
Proof.
(* Goal: @eq bool (@submx m1 m2 n A B) (orb (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)) (@ltmx m1 m2 n A B)) *)
by rewrite -andb_orr orbN andbT.
Qed.
End LtmxIdentities.
Let qidmx m n (A : 'M_(m, n)) :=
if m == n then A == pid_mx n else row_full A.
Let equivmx m n (A : 'M_(m, n)) idA (B : 'M_n) :=
(B == A)%MS && (qidmx B == idA).
Let equivmx_spec m n (A : 'M_(m, n)) idA (B : 'M_n) :=
prod (B :=: A)%MS (qidmx B = idA).
Definition genmx_witness m n (A : 'M_(m, n)) : 'M_n :=
if row_full A then 1%:M else pid_mx (\rank A) *m row_ebase A.
Definition genmx_def := idfun (fun m n (A : 'M_(m, n)) =>
choose (equivmx A (row_full A)) (genmx_witness A) : 'M_n).
Definition genmx := locked_with genmx_key genmx_def.
Canonical genmx_unlockable := [unlockable fun genmx].
Local Notation "<< A >>" := (genmx A) : matrix_set_scope.
Let addsmx_nop m n (A : 'M_(m, n)) := conform_mx <<A>>%MS A.
Definition addsmx_def := idfun (fun m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) =>
if A == 0 then addsmx_nop B else if B == 0 then addsmx_nop A else
<<col_mx A B>>%MS : 'M_n).
Definition addsmx := locked_with addsmx_key addsmx_def.
Canonical addsmx_unlockable := [unlockable fun addsmx].
Arguments addsmx {m1%N m2%N n%N} A%MS B%MS : rename.
Local Notation "A + B" := (addsmx A B) : matrix_set_scope.
Local Notation "\sum_ ( i | P ) B" := (\big[addsmx/0]_(i | P) B%MS)
: matrix_set_scope.
Local Notation "\sum_ ( i <- r | P ) B" := (\big[addsmx/0]_(i <- r | P) B%MS)
: matrix_set_scope.
Let capmx_witness m n (A : 'M_(m, n)) :=
if row_full A then conform_mx 1%:M A else <<A>>%MS.
Let capmx_norm m n (A : 'M_(m, n)) :=
choose (equivmx A (qidmx A)) (capmx_witness A).
Let capmx_nop m n (A : 'M_(m, n)) := conform_mx (capmx_norm A) A.
Definition capmx_gen m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :=
lsubmx (kermx (col_mx A B)) *m A.
Definition capmx_def := idfun (fun m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) =>
if qidmx A then capmx_nop B else
if qidmx B then capmx_nop A else
if row_full B then capmx_norm A else capmx_norm (capmx_gen A B) : 'M_n).
Definition capmx := locked_with capmx_key capmx_def.
Canonical capmx_unlockable := [unlockable fun capmx].
Arguments capmx {m1%N m2%N n%N} A%MS B%MS : rename.
Local Notation "A :&: B" := (capmx A B) : matrix_set_scope.
Local Notation "\bigcap_ ( i | P ) B" := (\big[capmx/1%:M]_(i | P) B)
: matrix_set_scope.
Definition diffmx_def := idfun (fun m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) =>
<<capmx_gen A (capmx_gen A B)^C>>%MS : 'M_n).
Definition diffmx := locked_with diffmx_key diffmx_def.
Canonical diffmx_unlockable := [unlockable fun diffmx].
Arguments diffmx {m1%N m2%N n%N} A%MS B%MS : rename.
Local Notation "A :\: B" := (diffmx A B) : matrix_set_scope.
Definition proj_mx n (U V : 'M_n) : 'M_n := pinvmx (col_mx U V) *m col_mx U 0.
Local Notation GaussE := Gaussian_elimination.
Fact mxrankE m n (A : 'M_(m, n)) : \rank A = (GaussE A).2.
Proof.
(* Goal: @eq nat (@mxrank m n A) (@snd (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n A)) *)
by rewrite /mxrank unlock /=; case: m n A => [|m] [|n].
Qed.
Lemma rank_leq_row m n (A : 'M_(m, n)) : \rank A <= m.
Proof.
(* Goal: is_true (leq (@mxrank m n A) m) *)
rewrite mxrankE.
(* Goal: is_true (leq (@snd (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n A)) m) *)
elim: m n A => [|m IHm] [|n] //= A; case: pickP => [[i j] _|] //=.
(* Goal: is_true (leq (@snd (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))) (S m)) *)
by move: (_ - _) => B; case: GaussE (IHm _ B) => [[L U] r] /=.
Qed.
Lemma row_leq_rank m n (A : 'M_(m, n)) : (m <= \rank A) = row_free A.
Proof.
(* Goal: @eq bool (leq m (@mxrank m n A)) (@row_free m n A) *)
by rewrite /row_free eqn_leq rank_leq_row.
Qed.
Lemma rank_leq_col m n (A : 'M_(m, n)) : \rank A <= n.
Proof.
(* Goal: is_true (leq (@mxrank m n A) n) *)
rewrite mxrankE.
(* Goal: is_true (leq (@snd (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n A)) n) *)
elim: m n A => [|m IHm] [|n] //= A; case: pickP => [[i j] _|] //=.
(* Goal: is_true (leq (@snd (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))) (S n)) *)
by move: (_ - _) => B; case: GaussE (IHm _ B) => [[L U] r] /=.
Qed.
Lemma col_leq_rank m n (A : 'M_(m, n)) : (n <= \rank A) = row_full A.
Proof.
(* Goal: @eq bool (leq n (@mxrank m n A)) (@row_full m n A) *)
by rewrite /row_full eqn_leq rank_leq_col.
Qed.
Let unitmx1F := @unitmx1 F.
Lemma row_ebase_unit m n (A : 'M_(m, n)) : row_ebase A \in unitmx.
Proof.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) n n) (@row_ebase m n A) (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
rewrite /row_ebase unlock; elim: m n A => [|m IHm] [|n] //= A.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) (S n) (S n)) (@snd (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType F)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))) (@scalar_mx (GRing.Field.ringType F) (S n) (GRing.one (GRing.Field.ringType F)))) O end)) (@mem (matrix (GRing.Field.sort F) (S n) (S n)) (predPredType (matrix (GRing.Field.sort F) (S n) (S n))) (@unitmx (GRing.Field.comUnitRingType F) (S n)))) *)
case: pickP => [[i j] /= nzAij | //=]; move: (_ - _) => B.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) (S n) (S n)) (@snd (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r)))) (@mem (matrix (GRing.Field.sort F) (S n) (S n)) (predPredType (matrix (GRing.Field.sort F) (S n) (S n))) (@unitmx (GRing.Field.comUnitRingType F) (S n)))) *)
case: GaussE (IHm _ B) => [[L U] r] /= uU.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) (S n) (S n)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U)) (@mem (matrix (GRing.Field.sort F) (S n) (S n)) (predPredType (matrix (GRing.Field.sort F) (S n) (S n))) (@unitmx (GRing.Field.comUnitRingType F) (S n)))) *)
rewrite unitmxE xcolE det_mulmx (@det_ublock _ 1) det_scalar1 !unitrM.
(* Goal: is_true (andb (andb (@in_mem (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@GRing.unit (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))) (@in_mem (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) n U) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@GRing.unit (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))))))) (@in_mem (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S n) (@tperm_mx (GRing.Field.ringType F) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))))) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@GRing.unit (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))))))) *)
by rewrite unitfE nzAij -!unitmxE uU unitmx_perm.
Qed.
Lemma col_ebase_unit m n (A : 'M_(m, n)) : col_ebase A \in unitmx.
Proof.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) m m) (@col_ebase m n A) (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m)) (@unitmx (GRing.Field.comUnitRingType F) m))) *)
rewrite /col_ebase unlock; elim: m n A => [|m IHm] [|n] //= A.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) (S m) (S m)) (@fst (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType F)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))) (@scalar_mx (GRing.Field.ringType F) (S n) (GRing.one (GRing.Field.ringType F)))) O end)) (@mem (matrix (GRing.Field.sort F) (S m) (S m)) (predPredType (matrix (GRing.Field.sort F) (S m) (S m))) (@unitmx (GRing.Field.comUnitRingType F) (S m)))) *)
case: pickP => [[i j] _|] //=; move: (_ - _) => B.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) (S m) (S m)) (@fst (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r)))) (@mem (matrix (GRing.Field.sort F) (S m) (S m)) (predPredType (matrix (GRing.Field.sort F) (S m) (S m))) (@unitmx (GRing.Field.comUnitRingType F) (S m)))) *)
case: GaussE (IHm _ B) => [[L U] r] /= uL.
(* Goal: is_true (@in_mem (matrix (GRing.Field.sort F) (S m) (S m)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@mem (matrix (GRing.Field.sort F) (S m) (S m)) (predPredType (matrix (GRing.Field.sort F) (S m) (S m))) (@unitmx (GRing.Field.comUnitRingType F) (S m)))) *)
rewrite unitmxE xrowE det_mulmx (@det_lblock _ 1) det1 mul1r unitrM.
(* Goal: is_true (andb (@in_mem (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) (S m) (@tperm_mx (GRing.Field.ringType F) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))))) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@GRing.unit (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))))) (@in_mem (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType F))) m L) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F)))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@GRing.unit (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))))))) *)
by rewrite -unitmxE unitmx_perm.
Qed.
Hint Resolve rank_leq_row rank_leq_col row_ebase_unit col_ebase_unit : core.
Lemma mulmx_ebase m n (A : 'M_(m, n)) :
col_ebase A *m pid_mx (\rank A) *m row_ebase A = A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m m n (@col_ebase m n A) (@pid_mx (GRing.Field.ringType F) m n (@mxrank m n A))) (@row_ebase m n A)) A *)
rewrite mxrankE /col_ebase /row_ebase unlock.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m m n (@fst (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n) (@fst (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n A))) (@pid_mx (GRing.Field.ringType F) m n (@snd (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n A)))) (@snd (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n) (@fst (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n A)))) A *)
elim: m n A => [n A | m IHm]; first by rewrite [A]flatmx0 [_ *m _]flatmx0.
(* Goal: forall (n : nat) (A : matrix (GRing.Field.sort F) (S m) n), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S m) n) (@mulmx (GRing.Field.ringType F) (S m) n n (@mulmx (GRing.Field.ringType F) (S m) (S m) n (@fst (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) n n) (@fst (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination (S m) n A))) (@pid_mx (GRing.Field.ringType F) (S m) n (@snd (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination (S m) n A)))) (@snd (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) n n) (@fst (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination (S m) n A)))) A *)
case=> [A | n]; first by rewrite [_ *m _]thinmx0 [A]thinmx0.
(* Goal: forall A : matrix (GRing.Field.sort F) (S m) (S n), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S m) (S n)) (@mulmx (GRing.Field.ringType F) (S m) (S n) (S n) (@mulmx (GRing.Field.ringType F) (S m) (S m) (S n) (@fst (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@Gaussian_elimination (S m) (S n) A))) (@pid_mx (GRing.Field.ringType F) (S m) (S n) (@snd (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@Gaussian_elimination (S m) (S n) A)))) (@snd (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@Gaussian_elimination (S m) (S n) A)))) A *)
rewrite -(add1n m) -?(add1n n) => A /=.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@fst (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType F)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))) (@scalar_mx (GRing.Field.ringType F) (S n) (GRing.one (GRing.Field.ringType F)))) O end)) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (@snd (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType F)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))) (@scalar_mx (GRing.Field.ringType F) (S n) (GRing.one (GRing.Field.ringType F)))) O end))) (@snd (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType F)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))) (@scalar_mx (GRing.Field.ringType F) (S n) (GRing.one (GRing.Field.ringType F)))) O end))) A *)
case: pickP => [[i0 j0] | A0] /=; last first.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0) (GRing.zero (GRing.Field.zmodType F)))), @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@fst (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r)))) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (@snd (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) (@snd (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) A *)
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) O)) (@scalar_mx (GRing.Field.ringType F) (S n) (GRing.one (GRing.Field.ringType F)))) A *)
apply/matrixP=> i j; rewrite pid_mx_0 mulmx0 mul0mx mxE.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0) (GRing.zero (GRing.Field.zmodType F)))), @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@fst (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r)))) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (@snd (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) (@snd (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) A *)
(* Goal: @eq (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i j) *)
by move/eqP: (A0 (i, j)).
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0) (GRing.zero (GRing.Field.zmodType F)))), @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@fst (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r)))) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (@snd (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) (@snd (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) A i0 j0)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) A *)
set a := A i0 j0 => nz_a; set A1 := xrow _ _ _.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@fst (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n A1) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) a) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n A1)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n A1)))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) a) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n A1)) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n A1) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r)))) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (@snd (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n A1) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) a) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n A1)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n A1)))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) a) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n A1)) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n A1) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) (@snd (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n A1) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) a) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n A1)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n A1)))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) a) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n A1)) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n A1) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) A *)
set u := ursubmx _; set v := _ *: _; set B : 'M_(m, n) := _ - _.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@fst (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r)))) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (@snd (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) (@snd (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) A *)
move: (rank_leq_col B) (rank_leq_row B) {IHm}(IHm n B); rewrite mxrankE.
(* Goal: forall (_ : is_true (leq (@snd (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n B)) n)) (_ : is_true (leq (@snd (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n B)) m)) (_ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m m n (@fst (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n) (@fst (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n B))) (@pid_mx (GRing.Field.ringType F) m n (@snd (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n B)))) (@snd (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n) (@fst (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination m n B)))) B), @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@fst (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r)))) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (@snd (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) (@snd (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@fst (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))))) A *)
case: (GaussE B) => [[L U] r] /= r_m r_n defB.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (S r))) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) A *)
have ->: pid_mx (1 + r) = block_mx 1 0 0 (pid_mx r) :> 'M[F]_(1 + m, 1 + n).
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m (S O) n (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (S O))) (@pid_mx (GRing.Field.ringType F) m n r))) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) A *)
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@pid_mx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) r)) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m (S O) n (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (S O))) (@pid_mx (GRing.Field.ringType F) m n r)) *)
rewrite -(subnKC r_m) -(subnKC r_n) pid_mx_block -col_mx0 -row_mx0.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m (S O) n (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (S O))) (@pid_mx (GRing.Field.ringType F) m n r))) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) A *)
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) (addn r (subn m r))) (addn (S O) (addn r (subn n r)))) (@pid_mx (GRing.Field.ringType F) (addn (S O) (addn r (subn m r))) (addn (S O) (addn r (subn n r))) (addn (S O) r)) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (addn r (subn m r)) (S O) (addn r (subn n r)) (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (@row_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) r (subn n r) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) r)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (subn n r)))) (@col_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) r (subn m r) (S O) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) r (S O))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (subn m r) (S O)))) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) r (subn m r) r (subn n r) (@scalar_mx (GRing.Field.ringType F) r (GRing.one (GRing.Field.ringType F))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) r (subn n r))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (subn m r) r)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (subn m r) (subn n r))))) *)
by rewrite block_mxA castmx_id col_mx0 row_mx0 -scalar_mx_block -pid_mx_block.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L)) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m (S O) n (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (S O))) (@pid_mx (GRing.Field.ringType F) m n r))) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) A *)
rewrite xcolE xrowE mulmxA -xcolE -!mulmxA.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@xcol (GRing.Ring.sort (GRing.Field.ringType F)) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@tperm_mx (GRing.Field.ringType F) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m)))) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) v L) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m (S O) n (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (S O))) (@pid_mx (GRing.Field.ringType F) m n r)) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))))) A *)
rewrite !(addr0, add0r, mulmx0, mul0mx, mulmx_block, mul1mx) mulmxA defB.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@xcol (GRing.Ring.sort (GRing.Field.ringType F)) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@tperm_mx (GRing.Field.ringType F) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m)))) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) m (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (@mulmx (GRing.Field.ringType F) m (S O) (S O) v (@scalar_mx (GRing.Field.ringType F) (S O) a)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m (S O) n v u) B)))) A *)
rewrite addrC subrK mul_mx_scalar scalerA divff // scale1r.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@xcol (GRing.Ring.sort (GRing.Field.ringType F)) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@tperm_mx (GRing.Field.ringType F) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m)))) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) m (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) a) u (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n A1) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n A1)))) A *)
have ->: a%:M = ulsubmx A1 by rewrite [_ A1]mx11_scalar !mxE !lshift0 !tpermR.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@xcol (GRing.Ring.sort (GRing.Field.ringType F)) (addn (S O) m) (addn (S O) n) j0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@tperm_mx (GRing.Field.ringType F) (addn (S O) m) i0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m)))) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) m (S O) n (@ulsubmx (GRing.Field.sort F) (S O) m (S O) n A1) u (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n A1) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n A1)))) A *)
rewrite submxK /A1 xrowE !xcolE -!mulmxA mulmxA -!perm_mxM !tperm2 !perm_mx1.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n)) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) m) (addn (S O) n) (@scalar_mx (GRing.Field.ringType F) (addn (S O) m) (GRing.one (GRing.Field.ringType F))) (@mulmx (GRing.Field.ringType F) (addn (S O) m) (addn (S O) n) (addn (S O) n) A (@scalar_mx (GRing.Field.ringType F) (addn (S O) n) (GRing.one (GRing.Field.ringType F))))) A *)
by rewrite mulmx1 mul1mx.
Qed.
Lemma mulmx_base m n (A : 'M_(m, n)) : col_base A *m row_base A = A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m (@mxrank m n A) n (@col_base m n A) (@row_base m n A)) A *)
by rewrite mulmxA -[col_base A *m _]mulmxA pid_mx_id ?mulmx_ebase.
Qed.
Lemma mulmx1_min_rank r m n (A : 'M_(m, n)) M N :
M *m A *m N = 1%:M :> 'M_r -> r <= \rank A.
Proof.
(* Goal: forall _ : @eq (matrix (GRing.Field.sort F) r r) (@mulmx (GRing.Field.ringType F) r n r (@mulmx (GRing.Field.ringType F) r m n M A) N) (@scalar_mx (GRing.Field.ringType F) r (GRing.one (GRing.Field.ringType F))), is_true (leq r (@mxrank m n A)) *)
by rewrite -{1}(mulmx_base A) mulmxA -mulmxA; move/mulmx1_min.
Qed.
Arguments mulmx1_min_rank [r m n A].
Lemma mulmx_max_rank r m n (M : 'M_(m, r)) (N : 'M_(r, n)) :
\rank (M *m N) <= r.
Proof.
(* Goal: is_true (leq (@mxrank m n (@mulmx (GRing.Field.ringType F) m r n M N)) r) *)
set MN := M *m N; set rMN := \rank _.
(* Goal: is_true (leq rMN r) *)
pose L : 'M_(rMN, m) := pid_mx rMN *m invmx (col_ebase MN).
(* Goal: is_true (leq rMN r) *)
pose U : 'M_(n, rMN) := invmx (row_ebase MN) *m pid_mx rMN.
(* Goal: is_true (leq rMN r) *)
suffices: L *m M *m (N *m U) = 1%:M by apply: mulmx1_min.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) rMN rMN) (@mulmx (GRing.Field.ringType F) rMN r rMN (@mulmx (GRing.Field.ringType F) rMN m r L M) (@mulmx (GRing.Field.ringType F) r n rMN N U)) (@scalar_mx (GRing.Field.ringType F) rMN (GRing.one (GRing.Field.ringType F))) *)
rewrite mulmxA -(mulmxA L) -[M *m N]mulmx_ebase -/MN.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) rMN rMN) (@mulmx (GRing.Field.ringType F) rMN n rMN (@mulmx (GRing.Field.ringType F) rMN m n L (@mulmx (GRing.Field.ringType F) m n n (@mulmx (GRing.Field.ringType F) m m n (@col_ebase m n MN) (@pid_mx (GRing.Field.ringType F) m n (@mxrank m n MN))) (@row_ebase m n MN))) U) (@scalar_mx (GRing.Field.ringType F) rMN (GRing.one (GRing.Field.ringType F))) *)
by rewrite !mulmxA mulmxKV // mulmxK // !pid_mx_id /rMN ?pid_mx_1.
Qed.
Arguments mulmx_max_rank [r m n].
Lemma mxrank_tr m n (A : 'M_(m, n)) : \rank A^T = \rank A.
Proof.
(* Goal: @eq nat (@mxrank n m (@trmx (GRing.Field.sort F) m n A)) (@mxrank m n A) *)
apply/eqP; rewrite eqn_leq -{3}[A]trmxK -{1}(mulmx_base A) -{1}(mulmx_base A^T).
(* Goal: is_true (andb (leq (@mxrank n m (@trmx (GRing.Field.sort F) m n (@mulmx (GRing.Field.ringType F) m (@mxrank m n A) n (@col_base m n A) (@row_base m n A)))) (@mxrank m n A)) (leq (@mxrank m n (@trmx (GRing.Field.sort F) n m (@mulmx (GRing.Field.ringType F) n (@mxrank n m (@trmx (GRing.Field.sort F) m n A)) m (@col_base n m (@trmx (GRing.Field.sort F) m n A)) (@row_base n m (@trmx (GRing.Field.sort F) m n A))))) (@mxrank n m (@trmx (GRing.Field.sort F) m n A)))) *)
by rewrite !trmx_mul !mulmx_max_rank.
Qed.
Lemma mxrank_add m n (A B : 'M_(m, n)) : \rank (A + B)%R <= \rank A + \rank B.
Proof.
(* Goal: is_true (leq (@mxrank m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) A B)) (addn (@mxrank m n A) (@mxrank m n B))) *)
by rewrite -{1}(mulmx_base A) -{1}(mulmx_base B) -mul_row_col mulmx_max_rank.
Qed.
Lemma mxrankM_maxl m n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
\rank (A *m B) <= \rank A.
Proof.
(* Goal: is_true (leq (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank m n A)) *)
by rewrite -{1}(mulmx_base A) -mulmxA mulmx_max_rank.
Qed.
Lemma mxrankM_maxr m n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
\rank (A *m B) <= \rank B.
Proof.
(* Goal: is_true (leq (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank n p B)) *)
by rewrite -mxrank_tr -(mxrank_tr B) trmx_mul mxrankM_maxl.
Qed.
Lemma mxrank_scale m n a (A : 'M_(m, n)) : \rank (a *: A) <= \rank A.
Proof.
(* Goal: is_true (leq (@mxrank m n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) a A)) (@mxrank m n A)) *)
by rewrite -mul_scalar_mx mxrankM_maxr.
Qed.
Lemma mxrank_scale_nz m n a (A : 'M_(m, n)) :
a != 0 -> \rank (a *: A) = \rank A.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType F))) a (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))))), @eq nat (@mxrank m n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) a A)) (@mxrank m n A) *)
move=> nza; apply/eqP; rewrite eqn_leq -{3}[A]scale1r -(mulVf nza).
(* Goal: is_true (andb (leq (@mxrank m n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) a A)) (@mxrank m n A)) (leq (@mxrank m n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.inv (GRing.Field.unitRingType F) a) a) A)) (@mxrank m n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) a A)))) *)
by rewrite -scalerA !mxrank_scale.
Qed.
Lemma mxrank_opp m n (A : 'M_(m, n)) : \rank (- A) = \rank A.
Proof.
(* Goal: @eq nat (@mxrank m n (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) A)) (@mxrank m n A) *)
by rewrite -scaleN1r mxrank_scale_nz // oppr_eq0 oner_eq0.
Qed.
Lemma mxrank0 m n : \rank (0 : 'M_(m, n)) = 0%N.
Proof.
(* Goal: @eq nat (@mxrank m n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n) : matrix (GRing.Field.sort F) m n)) O *)
by apply/eqP; rewrite -leqn0 -(@mulmx0 _ m 0 n 0) mulmx_max_rank.
Qed.
Lemma mxrank_eq0 m n (A : 'M_(m, n)) : (\rank A == 0%N) = (A == 0).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (@mxrank m n A) O) (@eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n))) *)
apply/eqP/eqP=> [rA0 | ->{A}]; last exact: mxrank0.
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.Field.eqType F) m n)) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n)) *)
move: (col_base A) (row_base A) (mulmx_base A); rewrite rA0 => Ac Ar <-.
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.Field.eqType F) m n)) (@mulmx (GRing.Field.ringType F) m O n Ac Ar) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n)) *)
by rewrite [Ac]thinmx0 mul0mx.
Qed.
Lemma mulmx_coker m n (A : 'M_(m, n)) : A *m cokermx A = 0.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n A (@cokermx m n A)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) *)
by rewrite -{1}[A]mulmx_ebase -!mulmxA mulKVmx // mul_pid_mx_copid ?mulmx0.
Qed.
Lemma submxE m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A <= B)%MS = (A *m cokermx B == 0).
Proof.
(* Goal: @eq bool (@submx m1 m2 n A B) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m1 n) (@mulmx (GRing.Field.ringType F) m1 n n A (@cokermx m2 n B)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 n))) *)
by rewrite unlock.
Qed.
Lemma mulmxKpV m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A <= B)%MS -> A *m pinvmx B *m B = A.
Proof.
(* Goal: forall _ : is_true (@submx m1 m2 n A B), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m1 n) (@mulmx (GRing.Field.ringType F) m1 m2 n (@mulmx (GRing.Field.ringType F) m1 n m2 A (@pinvmx m2 n B)) B) A *)
rewrite submxE !mulmxA mulmxBr mulmx1 subr_eq0 => /eqP defA.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m1 n) (@mulmx (GRing.Field.ringType F) m1 m2 n (@mulmx (GRing.Field.ringType F) m1 m2 m2 (@mulmx (GRing.Field.ringType F) m1 n m2 (@mulmx (GRing.Field.ringType F) m1 n n A (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase m2 n B))) (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n m2 (@mxrank m2 n B))) (@invmx (GRing.Field.comUnitRingType F) m2 (@col_ebase m2 n B))) B) A *)
rewrite -{4}[B]mulmx_ebase -!mulmxA mulKmx //.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m1 n) (@mulmx (GRing.Field.ringType F) m1 n n A (@mulmx (GRing.Field.ringType F) n n n (@invmx (GRing.Field.comUnitRingType F) n (@row_ebase m2 n B)) (@mulmx (GRing.Field.ringType F) n m2 n (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) n m2 (@mxrank m2 n B)) (@mulmx (GRing.Field.ringType F) m2 n n (@pid_mx (GRing.Field.ringType F) m2 n (@mxrank m2 n B)) (@row_ebase m2 n B))))) A *)
by rewrite (mulmxA (pid_mx _)) pid_mx_id // !mulmxA -{}defA mulmxKV.
Qed.
Lemma submxP m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (exists D, A = D *m B) (A <= B)%MS.
Proof.
(* Goal: Bool.reflect (@ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2) (fun D : matrix (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 => @eq (matrix (GRing.Field.sort F) m1 n) A (@mulmx (GRing.Field.ringType F) m1 m2 n D B))) (@submx m1 m2 n A B) *)
apply: (iffP idP) => [/mulmxKpV | [D ->]]; first by exists (A *m pinvmx B).
(* Goal: is_true (@submx m1 m2 n (@mulmx (GRing.Field.ringType F) m1 m2 n D B) B) *)
by rewrite submxE -mulmxA mulmx_coker mulmx0.
Qed.
Arguments submxP {m1 m2 n A B}.
Lemma submx_refl m n (A : 'M_(m, n)) : (A <= A)%MS.
Proof.
(* Goal: is_true (@submx m m n A A) *)
by rewrite submxE mulmx_coker.
Qed.
Hint Resolve submx_refl : core.
Lemma submxMl m n p (D : 'M_(m, n)) (A : 'M_(n, p)) : (D *m A <= A)%MS.
Proof.
(* Goal: is_true (@submx m n p (@mulmx (GRing.Field.ringType F) m n p D A) A) *)
by rewrite submxE -mulmxA mulmx_coker mulmx0.
Qed.
Lemma submxMr m1 m2 n p (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(n, p)) :
(A <= B)%MS -> (A *m C <= B *m C)%MS.
Proof.
(* Goal: forall _ : is_true (@submx m1 m2 n A B), is_true (@submx m1 m2 p (@mulmx (GRing.Field.ringType F) m1 n p A C) (@mulmx (GRing.Field.ringType F) m2 n p B C)) *)
by case/submxP=> D ->; rewrite -mulmxA submxMl.
Qed.
Lemma mulmx_sub m n1 n2 p (C : 'M_(m, n1)) A (B : 'M_(n2, p)) :
(A <= B -> C *m A <= B)%MS.
Proof.
(* Goal: forall _ : is_true (@submx n1 n2 p A B), is_true (@submx m n2 p (@mulmx (GRing.Field.ringType F) m n1 p C A) B) *)
by case/submxP=> D ->; rewrite mulmxA submxMl.
Qed.
Lemma submx_trans m1 m2 m3 n
(A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A <= B -> B <= C -> A <= C)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx m1 m2 n A B)) (_ : is_true (@submx m2 m3 n B C)), is_true (@submx m1 m3 n A C) *)
by case/submxP=> D ->{A}; apply: mulmx_sub.
Qed.
Lemma ltmx_sub_trans m1 m2 m3 n
(A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A < B)%MS -> (B <= C)%MS -> (A < C)%MS.
Proof.
(* Goal: forall (_ : is_true (@ltmx m1 m2 n A B)) (_ : is_true (@submx m2 m3 n B C)), is_true (@ltmx m1 m3 n A C) *)
case/andP=> sAB ltAB sBC; rewrite ltmxE (submx_trans sAB) //.
(* Goal: is_true (andb true (negb (@submx m3 m1 n C A))) *)
by apply: contra ltAB; apply: submx_trans.
Qed.
Lemma sub_ltmx_trans m1 m2 m3 n
(A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A <= B)%MS -> (B < C)%MS -> (A < C)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx m1 m2 n A B)) (_ : is_true (@ltmx m2 m3 n B C)), is_true (@ltmx m1 m3 n A C) *)
move=> sAB /andP[sBC ltBC]; rewrite ltmxE (submx_trans sAB) //.
(* Goal: is_true (andb true (negb (@submx m3 m1 n C A))) *)
by apply: contra ltBC => sCA; apply: submx_trans sAB.
Qed.
Lemma ltmx_trans m n : transitive (@ltmx m m n).
Proof.
(* Goal: @transitive (matrix (GRing.Field.sort F) m n) (@ltmx m m n) *)
by move=> A B C; move/ltmxW; apply: sub_ltmx_trans.
Qed.
Lemma ltmx_irrefl m n : irreflexive (@ltmx m m n).
Proof.
(* Goal: @irreflexive (matrix (GRing.Field.sort F) m n) (@ltmx m m n) *)
by move=> A; rewrite /ltmx submx_refl andbF.
Qed.
Lemma sub0mx m1 m2 n (A : 'M_(m2, n)) : ((0 : 'M_(m1, n)) <= A)%MS.
Proof.
(* Goal: is_true (@submx m1 m2 n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n) : matrix (GRing.Field.sort F) m1 n) A) *)
by rewrite submxE mul0mx.
Qed.
Lemma submx0null m1 m2 n (A : 'M[F]_(m1, n)) :
(A <= (0 : 'M_(m2, n)))%MS -> A = 0.
Proof.
(* Goal: forall _ : is_true (@submx m1 m2 n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n) : matrix (GRing.Field.sort F) m2 n)), @eq (matrix (GRing.Field.sort F) m1 n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n)) *)
by case/submxP=> D; rewrite mulmx0.
Qed.
Lemma submx0 m n (A : 'M_(m, n)) : (A <= (0 : 'M_n))%MS = (A == 0).
Proof.
(* Goal: @eq bool (@submx m n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n) : matrix (GRing.Field.sort F) n n)) (@eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n))) *)
by apply/idP/eqP=> [|->]; [apply: submx0null | apply: sub0mx].
Qed.
Lemma lt0mx m n (A : 'M_(m, n)) : ((0 : 'M_n) < A)%MS = (A != 0).
Proof.
(* Goal: @eq bool (@ltmx n m n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n) : matrix (GRing.Field.sort F) n n) A) (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n)))) *)
by rewrite /ltmx sub0mx submx0.
Qed.
Lemma ltmx0 m n (A : 'M[F]_(m, n)) : (A < (0 : 'M_n))%MS = false.
Proof.
(* Goal: @eq bool (@ltmx m n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n) : matrix (GRing.Field.sort F) n n)) false *)
by rewrite /ltmx sub0mx andbF.
Qed.
Lemma eqmx0P m n (A : 'M_(m, n)) : reflect (A = 0) (A == (0 : 'M_n))%MS.
Proof.
(* Goal: Bool.reflect (@eq (matrix (GRing.Field.sort F) m n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n))) (andb (@submx m n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n) : matrix (GRing.Field.sort F) n n)) (@submx n m n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n) : matrix (GRing.Field.sort F) n n) A)) *)
by rewrite submx0 sub0mx andbT; apply: eqP.
Qed.
Lemma eqmx_eq0 m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :=: B)%MS -> (A == 0) = (B == 0).
Proof.
(* Goal: forall _ : @eqmx m1 m2 n A B, @eq bool (@eq_op (matrix_eqType (GRing.Field.eqType F) m1 n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n))) (@eq_op (matrix_eqType (GRing.Field.eqType F) m2 n) B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n))) *)
by move=> eqAB; rewrite -!submx0 eqAB.
Qed.
Lemma addmx_sub m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m1, n)) (C : 'M_(m2, n)) :
(A <= C)%MS -> (B <= C)%MS -> ((A + B)%R <= C)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx m1 m2 n A C)) (_ : is_true (@submx m1 m2 n B C)), is_true (@submx m1 m2 n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m1 n) A B) C) *)
by case/submxP=> A' ->; case/submxP=> B' ->; rewrite -mulmxDl submxMl.
Qed.
Lemma summx_sub m1 m2 n (B : 'M_(m2, n))
I (r : seq I) (P : pred I) (A_ : I -> 'M_(m1, n)) :
(forall i, P i -> A_ i <= B)%MS -> ((\sum_(i <- r | P i) A_ i)%R <= B)%MS.
Proof.
(* Goal: forall _ : forall (i : I) (_ : is_true (P i)), is_true (@submx m1 m2 n (A_ i) B), is_true (@submx m1 m2 n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) m1 n)) I (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n)) r (fun i : I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) m1 n)) I i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m1 n)) (P i) (A_ i))) B) *)
by move=> leAB; elim/big_ind: _ => // [|C D]; [apply/sub0mx | apply/addmx_sub].
Qed.
Lemma scalemx_sub m1 m2 n a (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A <= B)%MS -> (a *: A <= B)%MS.
Proof.
(* Goal: forall _ : is_true (@submx m1 m2 n A B), is_true (@submx m1 m2 n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m1 n) a A) B) *)
by case/submxP=> A' ->; rewrite scalemxAl submxMl.
Qed.
Lemma row_sub m n i (A : 'M_(m, n)) : (row i A <= A)%MS.
Proof.
(* Goal: is_true (@submx (S O) m n (@row (GRing.Field.sort F) m n i A) A) *)
by rewrite rowE submxMl.
Qed.
Lemma eq_row_sub m n v (A : 'M_(m, n)) i : row i A = v -> (v <= A)%MS.
Proof.
(* Goal: forall _ : @eq (matrix (GRing.Field.sort F) (S O) n) (@row (GRing.Field.sort F) m n i A) v, is_true (@submx (S O) m n v A) *)
by move <-; rewrite row_sub.
Qed.
Lemma nz_row_sub m n (A : 'M_(m, n)) : (nz_row A <= A)%MS.
Proof.
(* Goal: is_true (@submx (S O) m n (@nz_row (GRing.Field.zmodType F) m n A) A) *)
by rewrite /nz_row; case: pickP => [i|] _; rewrite ?row_sub ?sub0mx.
Qed.
Lemma row_subP m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (forall i, row i A <= B)%MS (A <= B)%MS.
Arguments row_subP {m1 m2 n A B}.
Lemma rV_subP m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (forall v : 'rV_n, v <= A -> v <= B)%MS (A <= B)%MS.
Proof.
(* Goal: Bool.reflect (forall (v : matrix (GRing.Field.sort F) (S O) n) (_ : is_true (@submx (S O) m1 n v A)), is_true (@submx (S O) m2 n v B)) (@submx m1 m2 n A B) *)
apply: (iffP idP) => [sAB v Av | sAB]; first exact: submx_trans sAB.
(* Goal: is_true (@submx m1 m2 n A B) *)
by apply/row_subP=> i; rewrite sAB ?row_sub.
Qed.
Arguments rV_subP {m1 m2 n A B}.
Lemma row_subPn m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (exists i, ~~ (row i A <= B)%MS) (~~ (A <= B)%MS).
Proof.
(* Goal: Bool.reflect (@ex (ordinal m1) (fun i : ordinal m1 => is_true (negb (@submx (S O) m2 n (@row (GRing.Field.sort F) m1 n i A) B)))) (negb (@submx m1 m2 n A B)) *)
by rewrite (sameP row_subP forallP) negb_forall; apply: existsP.
Qed.
Lemma sub_rVP n (u v : 'rV_n) : reflect (exists a, u = a *: v) (u <= v)%MS.
Proof.
(* Goal: Bool.reflect (@ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun a : GRing.Ring.sort (GRing.Field.ringType F) => @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) n) u (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) a v))) (@submx (S O) (S O) n u v) *)
apply: (iffP submxP) => [[w ->] | [a ->]].
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (S O)) (fun D : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (S O) => @eq (matrix (GRing.Field.sort F) (S O) n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) a v) (@mulmx (GRing.Field.ringType F) (S O) (S O) n D v)) *)
(* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun a : GRing.Ring.sort (GRing.Field.ringType F) => @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) (S O) n w v) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) a v)) *)
by exists (w 0 0); rewrite -mul_scalar_mx -mx11_scalar.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (S O)) (fun D : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (S O) => @eq (matrix (GRing.Field.sort F) (S O) n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) a v) (@mulmx (GRing.Field.ringType F) (S O) (S O) n D v)) *)
by exists a%:M; rewrite mul_scalar_mx.
Qed.
Lemma rank_rV n (v : 'rV_n) : \rank v = (v != 0).
Proof.
(* Goal: @eq nat (@mxrank (S O) n v) (nat_of_bool (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) (S O) n) v (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) n))))) *)
case: eqP => [-> | nz_v]; first by rewrite mxrank0.
(* Goal: @eq nat (@mxrank (S O) n v) (nat_of_bool (negb false)) *)
by apply/eqP; rewrite eqn_leq rank_leq_row lt0n mxrank_eq0; apply/eqP.
Qed.
Lemma rowV0Pn m n (A : 'M_(m, n)) :
reflect (exists2 v : 'rV_n, v <= A & v != 0)%MS (A != 0).
Lemma rowV0P m n (A : 'M_(m, n)) :
reflect (forall v : 'rV_n, v <= A -> v = 0)%MS (A == 0).
Proof.
(* Goal: Bool.reflect (forall (v : matrix (GRing.Field.sort F) (S O) n) (_ : is_true (@submx (S O) m n v A)), @eq (matrix (GRing.Field.sort F) (S O) n) v (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) n))) (@eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n))) *)
rewrite -[A == 0]negbK; case: rowV0Pn => IH.
(* Goal: Bool.reflect (forall (v : matrix (GRing.Field.sort F) (S O) n) (_ : is_true (@submx (S O) m n v A)), @eq (matrix (GRing.Field.sort F) (S O) n) v (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) n))) (negb false) *)
(* Goal: Bool.reflect (forall (v : matrix (GRing.Field.sort F) (S O) n) (_ : is_true (@submx (S O) m n v A)), @eq (matrix (GRing.Field.sort F) (S O) n) v (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) n))) (negb true) *)
by right; case: IH => v svA nzv IH; case/eqP: nzv; apply: IH.
(* Goal: Bool.reflect (forall (v : matrix (GRing.Field.sort F) (S O) n) (_ : is_true (@submx (S O) m n v A)), @eq (matrix (GRing.Field.sort F) (S O) n) v (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) n))) (negb false) *)
by left=> v svA; apply/eqP; apply/idPn=> nzv; case: IH; exists v.
Qed.
Lemma submx_full m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
row_full B -> (A <= B)%MS.
Proof.
(* Goal: forall _ : is_true (@row_full m2 n B), is_true (@submx m1 m2 n A B) *)
by rewrite submxE /cokermx => /eqnP->; rewrite /copid_mx pid_mx_1 subrr !mulmx0.
Qed.
Lemma row_fullP m n (A : 'M_(m, n)) :
reflect (exists B, B *m A = 1%:M) (row_full A).
Proof.
(* Goal: Bool.reflect (@ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m) (fun B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n m n B A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_full m n A) *)
apply: (iffP idP) => [Afull | [B kA]].
(* Goal: is_true (@row_full m n A) *)
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m) (fun B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n m n B A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) *)
by exists (1%:M *m pinvmx A); apply: mulmxKpV (submx_full _ Afull).
(* Goal: is_true (@row_full m n A) *)
by rewrite [_ A]eqn_leq rank_leq_col (mulmx1_min_rank B 1%:M) ?mulmx1.
Qed.
Arguments row_fullP {m n A}.
Lemma row_full_inj m n p A : row_full A -> injective (@mulmx _ m n p A).
Proof.
(* Goal: forall _ : is_true (@row_full m n A), @injective (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m p) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n p) (@mulmx (GRing.Field.ringType F) m n p A) *)
case/row_fullP=> A' A'K; apply: can_inj (mulmx A') _ => B.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n p) (@mulmx (GRing.Field.ringType F) n m p A' (@mulmx (GRing.Field.ringType F) m n p A B)) B *)
by rewrite mulmxA A'K mul1mx.
Qed.
Lemma row_freeP m n (A : 'M_(m, n)) :
reflect (exists B, A *m B = 1%:M) (row_free A).
Proof.
(* Goal: Bool.reflect (@ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m) (fun B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m) (@mulmx (GRing.Field.ringType F) m n m A B) (@scalar_mx (GRing.Field.ringType F) m (GRing.one (GRing.Field.ringType F))))) (@row_free m n A) *)
rewrite /row_free -mxrank_tr.
(* Goal: Bool.reflect (@ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m) (fun B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m) (@mulmx (GRing.Field.ringType F) m n m A B) (@scalar_mx (GRing.Field.ringType F) m (GRing.one (GRing.Field.ringType F))))) (@eq_op nat_eqType (@mxrank n m (@trmx (GRing.Field.sort F) m n A)) m) *)
apply: (iffP row_fullP) => [] [B kA]; by exists B^T; rewrite -trmx1 -kA trmx_mul ?trmxK.
Qed.
Lemma row_free_inj m n p A : row_free A -> injective ((@mulmx _ m n p)^~ A).
Proof.
(* Goal: forall _ : is_true (@row_free n p A), @injective (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m p) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (fun x : matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n => @mulmx (GRing.Field.ringType F) m n p x A) *)
case/row_freeP=> A' AK; apply: can_inj (mulmx^~ A') _ => B.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m p n (@mulmx (GRing.Field.ringType F) m n p B A) A') B *)
by rewrite -mulmxA AK mulmx1.
Qed.
Lemma row_free_unit n (A : 'M_n) : row_free A = (A \in unitmx).
Proof.
(* Goal: @eq bool (@row_free n n A) (@in_mem (matrix (GRing.Field.sort F) n n) A (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
apply/row_fullP/idP=> [[A'] | uA]; first by case/mulmx1_unit.
(* Goal: @ex (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (fun B : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n B A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) *)
by exists (invmx A); rewrite mulVmx.
Qed.
Lemma row_full_unit n (A : 'M_n) : row_full A = (A \in unitmx).
Proof.
(* Goal: @eq bool (@row_full n n A) (@in_mem (matrix (GRing.Field.sort F) n n) A (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))) *)
exact: row_free_unit.
Qed.
Lemma mxrank_unit n (A : 'M_n) : A \in unitmx -> \rank A = n.
Proof.
(* Goal: forall _ : is_true (@in_mem (matrix (GRing.Field.sort F) n n) A (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) n n)) (@unitmx (GRing.Field.comUnitRingType F) n))), @eq nat (@mxrank n n A) n *)
by rewrite -row_full_unit => /eqnP.
Qed.
Lemma mxrank1 n : \rank (1%:M : 'M_n) = n.
Proof.
(* Goal: @eq nat (@mxrank n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)) : matrix (GRing.Field.sort F) n n)) n *)
by apply: mxrank_unit; apply: unitmx1.
Qed.
Lemma mxrank_delta m n i j : \rank (delta_mx i j : 'M_(m, n)) = 1%N.
Proof.
(* Goal: @eq nat (@mxrank m n (@delta_mx (GRing.Field.ringType F) m n i j : matrix (GRing.Field.sort F) m n)) (S O) *)
apply/eqP; rewrite eqn_leq lt0n mxrank_eq0.
(* Goal: is_true (andb (leq (@mxrank m n (@delta_mx (GRing.Field.ringType F) m n i j)) (S O)) (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m n) (@delta_mx (GRing.Field.ringType F) m n i j) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n))))) *)
rewrite -{1}(mul_delta_mx (0 : 'I_1)) mulmx_max_rank.
(* Goal: is_true (andb true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m n) (@delta_mx (GRing.Field.ringType F) m n i j) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n))))) *)
by apply/eqP; move/matrixP; move/(_ i j); move/eqP; rewrite !mxE !eqxx oner_eq0.
Qed.
Lemma mxrankS m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A <= B)%MS -> \rank A <= \rank B.
Proof.
(* Goal: forall _ : is_true (@submx m1 m2 n A B), is_true (leq (@mxrank m1 n A) (@mxrank m2 n B)) *)
by case/submxP=> D ->; rewrite mxrankM_maxr.
Qed.
Lemma submx1 m n (A : 'M_(m, n)) : (A <= 1%:M)%MS.
Proof.
(* Goal: is_true (@submx m n n A (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) *)
by rewrite submx_full // row_full_unit unitmx1.
Qed.
Lemma sub1mx m n (A : 'M_(m, n)) : (1%:M <= A)%MS = row_full A.
Lemma ltmx1 m n (A : 'M_(m, n)) : (A < 1%:M)%MS = ~~ row_full A.
Proof.
(* Goal: @eq bool (@ltmx m n n A (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (negb (@row_full m n A)) *)
by rewrite /ltmx sub1mx submx1.
Qed.
Lemma lt1mx m n (A : 'M_(m, n)) : (1%:M < A)%MS = false.
Proof.
(* Goal: @eq bool (@ltmx n m n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) false *)
by rewrite /ltmx submx1 andbF.
Qed.
Lemma eqmxP m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (A :=: B)%MS (A == B)%MS.
Proof.
(* Goal: Bool.reflect (@eqmx m1 m2 n A B) (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)) *)
apply: (iffP andP) => [[sAB sBA] | eqAB]; last by rewrite !eqAB.
(* Goal: @eqmx m1 m2 n A B *)
split=> [|m3 C]; first by apply/eqP; rewrite eqn_leq !mxrankS.
(* Goal: prod (@eq bool (@submx m1 m3 n A C) (@submx m2 m3 n B C)) (@eq bool (@submx m3 m1 n C A) (@submx m3 m2 n C B)) *)
split; first by apply/idP/idP; apply: submx_trans.
(* Goal: @eq bool (@submx m3 m1 n C A) (@submx m3 m2 n C B) *)
by apply/idP/idP=> sC; apply: submx_trans sC _.
Qed.
Arguments eqmxP {m1 m2 n A B}.
Lemma rV_eqP m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (forall u : 'rV_n, (u <= A) = (u <= B))%MS (A == B)%MS.
Proof.
(* Goal: Bool.reflect (forall u : matrix (GRing.Field.sort F) (S O) n, @eq bool (@submx (S O) m1 n u A) (@submx (S O) m2 n u B)) (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)) *)
apply: (iffP idP) => [eqAB u | eqAB]; first by rewrite (eqmxP eqAB).
(* Goal: is_true (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)) *)
by apply/andP; split; apply/rV_subP=> u; rewrite eqAB.
Qed.
Lemma eqmx_refl m1 n (A : 'M_(m1, n)) : (A :=: A)%MS.
Proof.
(* Goal: @eqmx m1 m1 n A A *)
by [].
Qed.
Lemma eqmx_sym m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :=: B)%MS -> (B :=: A)%MS.
Proof.
(* Goal: forall _ : @eqmx m1 m2 n A B, @eqmx m2 m1 n B A *)
by move=> eqAB; split=> [|m3 C]; rewrite !eqAB.
Qed.
Lemma eqmx_trans m1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A :=: B)%MS -> (B :=: C)%MS -> (A :=: C)%MS.
Proof.
(* Goal: forall (_ : @eqmx m1 m2 n A B) (_ : @eqmx m2 m3 n B C), @eqmx m1 m3 n A C *)
by move=> eqAB eqBC; split=> [|m4 D]; rewrite !eqAB !eqBC.
Qed.
Lemma eqmx_rank m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A == B)%MS -> \rank A = \rank B.
Proof.
(* Goal: forall _ : is_true (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)), @eq nat (@mxrank m1 n A) (@mxrank m2 n B) *)
by move/eqmxP->.
Qed.
Lemma lt_eqmx m1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :=: B)%MS ->
forall C : 'M_(m3, n), (((A < C) = (B < C))%MS * ((C < A) = (C < B))%MS)%type.
Proof.
(* Goal: forall (_ : @eqmx m1 m2 n A B) (C : matrix (GRing.Field.sort F) m3 n), prod (@eq bool (@ltmx m1 m3 n A C) (@ltmx m2 m3 n B C)) (@eq bool (@ltmx m3 m1 n C A) (@ltmx m3 m2 n C B)) *)
by move=> eqAB C; rewrite /ltmx !eqAB.
Qed.
Lemma eqmxMr m1 m2 n p (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(n, p)) :
(A :=: B)%MS -> (A *m C :=: B *m C)%MS.
Proof.
(* Goal: forall _ : @eqmx m1 m2 n A B, @eqmx m1 m2 p (@mulmx (GRing.Field.ringType F) m1 n p A C) (@mulmx (GRing.Field.ringType F) m2 n p B C) *)
by move=> eqAB; apply/eqmxP; rewrite !submxMr ?eqAB.
Qed.
Lemma eqmxMfull m n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
row_full A -> (A *m B :=: B)%MS.
Proof.
(* Goal: forall _ : is_true (@row_full m n A), @eqmx m n p (@mulmx (GRing.Field.ringType F) m n p A B) B *)
case/row_fullP=> A' A'A; apply/eqmxP; rewrite submxMl /=.
(* Goal: is_true (@submx n m p B (@mulmx (GRing.Field.ringType F) m n p A B)) *)
by apply/submxP; exists A'; rewrite mulmxA A'A mul1mx.
Qed.
Lemma eqmx0 m n : ((0 : 'M[F]_(m, n)) :=: (0 : 'M_n))%MS.
Proof.
(* Goal: @eqmx m n n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n) : matrix (GRing.Field.sort F) m n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n) : matrix (GRing.Field.sort F) n n) *)
by apply/eqmxP; rewrite !sub0mx.
Qed.
Lemma eqmx_scale m n a (A : 'M_(m, n)) : a != 0 -> (a *: A :=: A)%MS.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType F))) a (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))))), @eqmx m m n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) a A) A *)
move=> nz_a; apply/eqmxP; rewrite scalemx_sub //.
(* Goal: is_true (andb true (@submx m m n A (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) a A))) *)
by rewrite -{1}[A]scale1r -(mulVf nz_a) -scalerA scalemx_sub.
Qed.
Lemma eqmx_opp m n (A : 'M_(m, n)) : (- A :=: A)%MS.
Proof.
(* Goal: @eqmx m m n (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) A) A *)
by rewrite -scaleN1r; apply: eqmx_scale => //; rewrite oppr_eq0 oner_eq0.
Qed.
Lemma submxMfree m1 m2 n p (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(n, p)) :
row_free C -> (A *m C <= B *m C)%MS = (A <= B)%MS.
Proof.
(* Goal: forall _ : is_true (@row_free n p C), @eq bool (@submx m1 m2 p (@mulmx (GRing.Field.ringType F) m1 n p A C) (@mulmx (GRing.Field.ringType F) m2 n p B C)) (@submx m1 m2 n A B) *)
case/row_freeP=> C' C_C'_1; apply/idP/idP=> sAB; last exact: submxMr.
(* Goal: is_true (@submx m1 m2 n A B) *)
by rewrite -[A]mulmx1 -[B]mulmx1 -C_C'_1 !mulmxA submxMr.
Qed.
Lemma eqmxMfree m1 m2 n p (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(n, p)) :
row_free C -> (A *m C :=: B *m C)%MS -> (A :=: B)%MS.
Proof.
(* Goal: forall (_ : is_true (@row_free n p C)) (_ : @eqmx m1 m2 p (@mulmx (GRing.Field.ringType F) m1 n p A C) (@mulmx (GRing.Field.ringType F) m2 n p B C)), @eqmx m1 m2 n A B *)
by move=> Cfree eqAB; apply/eqmxP; move/eqmxP: eqAB; rewrite !submxMfree.
Qed.
Lemma mxrankMfree m n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
row_free B -> \rank (A *m B) = \rank A.
Proof.
(* Goal: forall _ : is_true (@row_free n p B), @eq nat (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank m n A) *)
by move=> Bfree; rewrite -mxrank_tr trmx_mul eqmxMfull /row_full mxrank_tr.
Qed.
Lemma eq_row_base m n (A : 'M_(m, n)) : (row_base A :=: A)%MS.
Let qidmx_eq1 n (A : 'M_n) : qidmx A = (A == 1%:M).
Proof.
(* Goal: @eq bool (@qidmx n n A) (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) A (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) *)
by rewrite /qidmx eqxx pid_mx_1.
Qed.
Let genmx_witnessP m n (A : 'M_(m, n)) :
equivmx A (row_full A) (genmx_witness A).
Lemma genmxE m n (A : 'M_(m, n)) : (<<A>> :=: A)%MS.
Proof.
(* Goal: @eqmx n m n (@genmx m n A) A *)
by rewrite unlock; apply/eqmxP; case/andP: (chooseP (genmx_witnessP A)).
Qed.
Lemma eq_genmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :=: B -> <<A>> = <<B>>)%MS.
Proof.
(* Goal: forall _ : @eqmx m1 m2 n A B, @eq (matrix (GRing.Field.sort F) n n) (@genmx m1 n A) (@genmx m2 n B) *)
move=> eqAB; rewrite unlock.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx m1 n A (@row_full m1 n A)) (@genmx_witness m1 n A)) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx m2 n B (@row_full m2 n B)) (@genmx_witness m2 n B)) *)
have{eqAB} eqAB: equivmx A (row_full A) =1 equivmx B (row_full B).
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx m1 n A (@row_full m1 n A)) (@genmx_witness m1 n A)) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx m2 n B (@row_full m2 n B)) (@genmx_witness m2 n B)) *)
(* Goal: @eqfun bool (matrix (GRing.Field.sort F) n n) (@equivmx m1 n A (@row_full m1 n A)) (@equivmx m2 n B (@row_full m2 n B)) *)
by move=> C; rewrite /row_full /equivmx !eqAB.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx m1 n A (@row_full m1 n A)) (@genmx_witness m1 n A)) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx m2 n B (@row_full m2 n B)) (@genmx_witness m2 n B)) *)
rewrite (eq_choose eqAB) (choose_id _ (genmx_witnessP B)) //.
(* Goal: is_true (@equivmx m2 n B (@row_full m2 n B) (@genmx_witness m1 n A)) *)
by rewrite -eqAB genmx_witnessP.
Qed.
Lemma genmxP m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (<<A>> = <<B>>)%MS (A == B)%MS.
Proof.
(* Goal: Bool.reflect (@eq (matrix (GRing.Field.sort F) n n) (@genmx m1 n A) (@genmx m2 n B)) (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)) *)
apply: (iffP idP) => eqAB; first exact: eq_genmx (eqmxP _).
(* Goal: is_true (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)) *)
by rewrite -!(genmxE A) eqAB !genmxE andbb.
Qed.
Arguments genmxP {m1 m2 n A B}.
Lemma genmx0 m n : <<0 : 'M_(m, n)>>%MS = 0.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx m n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n) : matrix (GRing.Field.sort F) m n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
by apply/eqP; rewrite -submx0 genmxE sub0mx.
Qed.
Lemma genmx1 n : <<1%:M : 'M_n>>%MS = 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)) : matrix (GRing.Field.sort F) n n)) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) *)
rewrite unlock; case/andP: (chooseP (@genmx_witnessP n n 1%:M)) => _ /eqP.
(* Goal: forall _ : @eq (Equality.sort bool_eqType) (@qidmx n n (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (@row_full n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@genmx_witness n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@row_full n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))), @eq (matrix (GRing.Field.sort F) n n) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (@row_full n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@genmx_witness n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) *)
by rewrite qidmx_eq1 row_full_unit unitmx1 => /eqP.
Qed.
Lemma genmx_id m n (A : 'M_(m, n)) : (<<<<A>>>> = <<A>>)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@genmx m n A)) (@genmx m n A) *)
by apply: eq_genmx; apply: genmxE.
Qed.
Lemma row_base_free m n (A : 'M_(m, n)) : row_free (row_base A).
Proof.
(* Goal: is_true (@row_free (@mxrank m n A) n (@row_base m n A)) *)
by apply/eqnP; rewrite eq_row_base.
Qed.
Lemma mxrank_gen m n (A : 'M_(m, n)) : \rank <<A>> = \rank A.
Proof.
(* Goal: @eq nat (@mxrank n n (@genmx m n A)) (@mxrank m n A) *)
by rewrite genmxE.
Qed.
Lemma col_base_full m n (A : 'M_(m, n)) : row_full (col_base A).
Proof.
(* Goal: is_true (@row_full m (@mxrank m n A) (@col_base m n A)) *)
apply/row_fullP; exists (pid_mx (\rank A) *m invmx (col_ebase A)).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (@mxrank m n A) (@mxrank m n A)) (@mulmx (GRing.Field.ringType F) (@mxrank m n A) m (@mxrank m n A) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@mxrank m n A) m m (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType F))) (@mxrank m n A) m (@mxrank m n A)) (@invmx (GRing.Field.comUnitRingType F) m (@col_ebase m n A))) (@col_base m n A)) (@scalar_mx (GRing.Field.ringType F) (@mxrank m n A) (GRing.one (GRing.Field.ringType F))) *)
by rewrite !mulmxA mulmxKV // pid_mx_id // pid_mx_1.
Qed.
Hint Resolve row_base_free col_base_full : core.
Lemma mxrank_leqif_sup m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A <= B)%MS -> \rank A <= \rank B ?= iff (B <= A)%MS.
Lemma mxrank_leqif_eq m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A <= B)%MS -> \rank A <= \rank B ?= iff (A == B)%MS.
Proof.
(* Goal: forall _ : is_true (@submx m1 m2 n A B), leqif (@mxrank m1 n A) (@mxrank m2 n B) (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A)) *)
by move=> sAB; rewrite sAB; apply: mxrank_leqif_sup.
Qed.
Lemma ltmxErank m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A < B)%MS = (A <= B)%MS && (\rank A < \rank B).
Proof.
(* Goal: @eq bool (@ltmx m1 m2 n A B) (andb (@submx m1 m2 n A B) (leq (S (@mxrank m1 n A)) (@mxrank m2 n B))) *)
by apply: andb_id2l => sAB; rewrite (ltn_leqif (mxrank_leqif_sup sAB)).
Qed.
Lemma rank_ltmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A < B)%MS -> \rank A < \rank B.
Proof.
(* Goal: forall _ : is_true (@ltmx m1 m2 n A B), is_true (leq (S (@mxrank m1 n A)) (@mxrank m2 n B)) *)
by rewrite ltmxErank => /andP[].
Qed.
Lemma eqmx_cast m1 m2 n (A : 'M_(m1, n)) e :
((castmx e A : 'M_(m2, n)) :=: A)%MS.
Proof.
(* Goal: @eqmx m2 m1 n (@castmx (GRing.Field.sort F) m1 n m2 n e A : matrix (GRing.Field.sort F) m2 n) A *)
by case: e A; case: m2 / => A e; rewrite castmx_id.
Qed.
Lemma eqmx_conform m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(conform_mx A B :=: A \/ conform_mx A B :=: B)%MS.
Proof.
(* Goal: or (@eqmx m1 m1 n (@conform_mx (GRing.Field.sort F) m2 n m1 n A B) A) (@eqmx m1 m2 n (@conform_mx (GRing.Field.sort F) m2 n m1 n A B) B) *)
case: (eqVneq m2 m1) => [-> | neqm12] in B *.
by right; rewrite conform_mx_id.
by left; rewrite nonconform_mx ?neqm12.
Qed.
Qed.
Let eqmx_sum_nop m n (A : 'M_(m, n)) : (addsmx_nop A :=: A)%MS.
Proof.
(* Goal: @eqmx n m n (@addsmx_nop m n A) A *)
case: (eqmx_conform <<A>>%MS A) => // eq_id_gen.
(* Goal: @eqmx n m n (@addsmx_nop m n A) A *)
exact: eqmx_trans (genmxE A).
Qed.
Section AddsmxSub.
Variable (m1 m2 n : nat) (A : 'M[F]_(m1, n)) (B : 'M[F]_(m2, n)).
Lemma col_mx_sub m3 (C : 'M_(m3, n)) :
(col_mx A B <= C)%MS = (A <= C)%MS && (B <= C)%MS.
Proof.
(* Goal: @eq bool (@submx (addn m1 m2) m3 n (@col_mx (GRing.Field.sort F) m1 m2 n A B) C) (andb (@submx m1 m3 n A C) (@submx m2 m3 n B C)) *)
rewrite !submxE mul_col_mx -col_mx0.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) (addn m1 m2) n) (@col_mx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 n (@mulmx (GRing.Field.ringType F) m1 n n A (@cokermx m3 n C)) (@mulmx (GRing.Field.ringType F) m2 n n B (@cokermx m3 n C))) (@col_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) m1 m2 n (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 n)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 n)))) (andb (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m1 n) (@mulmx (GRing.Field.ringType F) m1 n n A (@cokermx m3 n C)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 n))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m2 n) (@mulmx (GRing.Field.ringType F) m2 n n B (@cokermx m3 n C)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 n)))) *)
by apply/eqP/andP; [case/eq_col_mx=> -> -> | case; do 2!move/eqP->].
Qed.
Lemma addsmxE : (A + B :=: col_mx A B)%MS.
Proof.
(* Goal: @eqmx n (addn m1 m2) n (@addsmx m1 m2 n A B) (@col_mx (GRing.Field.sort F) m1 m2 n A B) *)
have:= submx_refl (col_mx A B); rewrite col_mx_sub; case/andP=> sAS sBS.
(* Goal: @eqmx n (addn m1 m2) n (@addsmx m1 m2 n A B) (@col_mx (GRing.Field.sort F) m1 m2 n A B) *)
rewrite unlock; do 2?case: eqP => [AB0 | _]; last exact: genmxE.
(* Goal: @eqmx n (addn m1 m2) n (@addsmx_nop m1 n A) (@col_mx (GRing.Field.sort F) m1 m2 n A B) *)
(* Goal: @eqmx n (addn m1 m2) n (@addsmx_nop m2 n B) (@col_mx (GRing.Field.sort F) m1 m2 n A B) *)
by apply/eqmxP; rewrite !eqmx_sum_nop sBS col_mx_sub AB0 sub0mx /=.
(* Goal: @eqmx n (addn m1 m2) n (@addsmx_nop m1 n A) (@col_mx (GRing.Field.sort F) m1 m2 n A B) *)
by apply/eqmxP; rewrite !eqmx_sum_nop sAS col_mx_sub AB0 sub0mx andbT /=.
Qed.
Lemma addsmx_sub m3 (C : 'M_(m3, n)) :
(A + B <= C)%MS = (A <= C)%MS && (B <= C)%MS.
Proof.
(* Goal: @eq bool (@submx n m3 n (@addsmx m1 m2 n A B) C) (andb (@submx m1 m3 n A C) (@submx m2 m3 n B C)) *)
by rewrite addsmxE col_mx_sub.
Qed.
Lemma addsmxSl : (A <= A + B)%MS.
Proof.
(* Goal: is_true (@submx m1 n n A (@addsmx m1 m2 n A B)) *)
by have:= submx_refl (A + B)%MS; rewrite addsmx_sub; case/andP.
Qed.
Lemma addsmxSr : (B <= A + B)%MS.
Proof.
(* Goal: is_true (@submx m2 n n B (@addsmx m1 m2 n A B)) *)
by have:= submx_refl (A + B)%MS; rewrite addsmx_sub; case/andP.
Qed.
Lemma addsmx_idPr : reflect (A + B :=: B)%MS (A <= B)%MS.
Proof.
(* Goal: Bool.reflect (@eqmx n m2 n (@addsmx m1 m2 n A B) B) (@submx m1 m2 n A B) *)
have:= @eqmxP _ _ _ (A + B)%MS B.
(* Goal: forall _ : Bool.reflect (@eqmx n m2 n (@addsmx m1 m2 n A B) B) (andb (@submx n m2 n (@addsmx m1 m2 n A B) B) (@submx m2 n n B (@addsmx m1 m2 n A B))), Bool.reflect (@eqmx n m2 n (@addsmx m1 m2 n A B) B) (@submx m1 m2 n A B) *)
by rewrite addsmxSr addsmx_sub submx_refl !andbT.
Qed.
Lemma addsmx_idPl : reflect (A + B :=: A)%MS (B <= A)%MS.
Proof.
(* Goal: Bool.reflect (@eqmx n m1 n (@addsmx m1 m2 n A B) A) (@submx m2 m1 n B A) *)
have:= @eqmxP _ _ _ (A + B)%MS A.
(* Goal: forall _ : Bool.reflect (@eqmx n m1 n (@addsmx m1 m2 n A B) A) (andb (@submx n m1 n (@addsmx m1 m2 n A B) A) (@submx m1 n n A (@addsmx m1 m2 n A B))), Bool.reflect (@eqmx n m1 n (@addsmx m1 m2 n A B) A) (@submx m2 m1 n B A) *)
by rewrite addsmxSl addsmx_sub submx_refl !andbT.
Qed.
End AddsmxSub.
Lemma adds0mx m1 m2 n (B : 'M_(m2, n)) : ((0 : 'M_(m1, n)) + B :=: B)%MS.
Proof.
(* Goal: @eqmx n m2 n (@addsmx m1 m2 n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n) : matrix (GRing.Field.sort F) m1 n) B) B *)
by apply/eqmxP; rewrite addsmx_sub sub0mx addsmxSr /= andbT.
Qed.
Lemma addsmx0 m1 m2 n (A : 'M_(m1, n)) : (A + (0 : 'M_(m2, n)) :=: A)%MS.
Proof.
(* Goal: @eqmx n m1 n (@addsmx m1 m2 n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n) : matrix (GRing.Field.sort F) m2 n)) A *)
by apply/eqmxP; rewrite addsmx_sub sub0mx addsmxSl /= !andbT.
Qed.
Let addsmx_nop_eq0 m n (A : 'M_(m, n)) : (addsmx_nop A == 0) = (A == 0).
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@addsmx_nop m n A) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (@eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n))) *)
by rewrite -!submx0 eqmx_sum_nop.
Qed.
Let addsmx_nop0 m n : addsmx_nop (0 : 'M_(m, n)) = 0.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@addsmx_nop m n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n) : matrix (GRing.Field.sort F) m n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
by apply/eqP; rewrite addsmx_nop_eq0.
Qed.
Let addsmx_nop_id n (A : 'M_n) : addsmx_nop A = A.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@addsmx_nop n n A) A *)
exact: conform_mx_id.
Qed.
Lemma addsmxC m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A + B = B + A)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@addsmx m1 m2 n A B) (@addsmx m2 m1 n B A) *)
have: (A + B == B + A)%MS.
(* Goal: forall _ : is_true (andb (@submx n n n (@addsmx m1 m2 n A B) (@addsmx m2 m1 n B A)) (@submx n n n (@addsmx m2 m1 n B A) (@addsmx m1 m2 n A B))), @eq (matrix (GRing.Field.sort F) n n) (@addsmx m1 m2 n A B) (@addsmx m2 m1 n B A) *)
(* Goal: is_true (andb (@submx n n n (@addsmx m1 m2 n A B) (@addsmx m2 m1 n B A)) (@submx n n n (@addsmx m2 m1 n B A) (@addsmx m1 m2 n A B))) *)
by apply/andP; rewrite !addsmx_sub andbC -addsmx_sub andbC -addsmx_sub.
(* Goal: forall _ : is_true (andb (@submx n n n (@addsmx m1 m2 n A B) (@addsmx m2 m1 n B A)) (@submx n n n (@addsmx m2 m1 n B A) (@addsmx m1 m2 n A B))), @eq (matrix (GRing.Field.sort F) n n) (@addsmx m1 m2 n A B) (@addsmx m2 m1 n B A) *)
move/genmxP; rewrite [@addsmx]unlock -!submx0 !submx0.
(* Goal: forall _ : @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (if @eq_op (matrix_eqType (GRing.Field.eqType F) m1 n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n)) then @addsmx_nop m2 n B else if @eq_op (matrix_eqType (GRing.Field.eqType F) m2 n) B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n)) then @addsmx_nop m1 n A else @genmx (addn m1 m2) n (@col_mx (GRing.Field.sort F) m1 m2 n A B))) (@genmx n n (if @eq_op (matrix_eqType (GRing.Field.eqType F) m2 n) B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n)) then @addsmx_nop m1 n A else if @eq_op (matrix_eqType (GRing.Field.eqType F) m1 n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n)) then @addsmx_nop m2 n B else @genmx (addn m2 m1) n (@col_mx (GRing.Field.sort F) m2 m1 n B A))), @eq (matrix (GRing.Field.sort F) n n) (if @eq_op (matrix_eqType (GRing.Field.eqType F) m1 n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n)) then @addsmx_nop m2 n B else if @eq_op (matrix_eqType (GRing.Field.eqType F) m2 n) B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n)) then @addsmx_nop m1 n A else @genmx (addn m1 m2) n (@col_mx (GRing.Field.sort F) m1 m2 n A B)) (if @eq_op (matrix_eqType (GRing.Field.eqType F) m2 n) B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n)) then @addsmx_nop m1 n A else if @eq_op (matrix_eqType (GRing.Field.eqType F) m1 n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n)) then @addsmx_nop m2 n B else @genmx (addn m2 m1) n (@col_mx (GRing.Field.sort F) m2 m1 n B A)) *)
by do 2!case: eqP => [// -> | _]; rewrite ?genmx_id ?addsmx_nop0.
Qed.
Lemma adds0mx_id m1 n (B : 'M_n) : ((0 : 'M_(m1, n)) + B)%MS = B.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@addsmx m1 n n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n) : matrix (GRing.Field.sort F) m1 n) B) B *)
by rewrite unlock eqxx addsmx_nop_id.
Qed.
Lemma addsmx0_id m2 n (A : 'M_n) : (A + (0 : 'M_(m2, n)))%MS = A.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@addsmx n m2 n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n) : matrix (GRing.Field.sort F) m2 n)) A *)
by rewrite addsmxC adds0mx_id.
Qed.
Lemma addsmxA m1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A + (B + C) = A + B + C)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@addsmx m1 n n A (@addsmx m2 m3 n B C)) (@addsmx n m3 n (@addsmx m1 m2 n A B) C) *)
have: (A + (B + C) :=: A + B + C)%MS.
(* Goal: forall _ : @eqmx n n n (@addsmx m1 n n A (@addsmx m2 m3 n B C)) (@addsmx n m3 n (@addsmx m1 m2 n A B) C), @eq (matrix (GRing.Field.sort F) n n) (@addsmx m1 n n A (@addsmx m2 m3 n B C)) (@addsmx n m3 n (@addsmx m1 m2 n A B) C) *)
(* Goal: @eqmx n n n (@addsmx m1 n n A (@addsmx m2 m3 n B C)) (@addsmx n m3 n (@addsmx m1 m2 n A B) C) *)
by apply/eqmxP/andP; rewrite !addsmx_sub -andbA andbA -!addsmx_sub.
(* Goal: forall _ : @eqmx n n n (@addsmx m1 n n A (@addsmx m2 m3 n B C)) (@addsmx n m3 n (@addsmx m1 m2 n A B) C), @eq (matrix (GRing.Field.sort F) n n) (@addsmx m1 n n A (@addsmx m2 m3 n B C)) (@addsmx n m3 n (@addsmx m1 m2 n A B) C) *)
rewrite {1 3}[in @addsmx m1]unlock [in @addsmx n]unlock !addsmx_nop_id -!submx0.
(* Goal: forall _ : @eqmx n n n (if @submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx m2 m3 n B C else if @submx n n n (@addsmx m2 m3 n B C) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m1 n A else @genmx (addn m1 n) n (@col_mx (GRing.Field.sort F) m1 n n A (@addsmx m2 m3 n B C))) (if @submx n n n (@addsmx m1 m2 n A B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m3 n C else if @submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx m1 m2 n A B else @genmx (addn n m3) n (@col_mx (GRing.Field.sort F) n m3 n (@addsmx m1 m2 n A B) C)), @eq (matrix (GRing.Field.sort F) n n) (if @submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx m2 m3 n B C else if @submx n n n (@addsmx m2 m3 n B C) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m1 n A else @genmx (addn m1 n) n (@col_mx (GRing.Field.sort F) m1 n n A (@addsmx m2 m3 n B C))) (if @submx n n n (@addsmx m1 m2 n A B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m3 n C else if @submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx m1 m2 n A B else @genmx (addn n m3) n (@col_mx (GRing.Field.sort F) n m3 n (@addsmx m1 m2 n A B) C)) *)
rewrite !addsmx_sub ![@addsmx]unlock -!submx0; move/eq_genmx.
(* Goal: forall _ : @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (if @submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then if @submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m3 n C else if @submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m2 n B else @genmx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C) else if andb (@submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (@submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) then @addsmx_nop m1 n A else @genmx (addn m1 n) n (@col_mx (GRing.Field.sort F) m1 n n A (if @submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m3 n C else if @submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m2 n B else @genmx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C))))) (@genmx n n (if andb (@submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (@submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) then @addsmx_nop m3 n C else if @submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then if @submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m2 n B else if @submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m1 n A else @genmx (addn m1 m2) n (@col_mx (GRing.Field.sort F) m1 m2 n A B) else @genmx (addn n m3) n (@col_mx (GRing.Field.sort F) n m3 n (if @submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m2 n B else if @submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m1 n A else @genmx (addn m1 m2) n (@col_mx (GRing.Field.sort F) m1 m2 n A B)) C))), @eq (matrix (GRing.Field.sort F) n n) (if @submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then if @submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m3 n C else if @submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m2 n B else @genmx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C) else if andb (@submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (@submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) then @addsmx_nop m1 n A else @genmx (addn m1 n) n (@col_mx (GRing.Field.sort F) m1 n n A (if @submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m3 n C else if @submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m2 n B else @genmx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C)))) (if andb (@submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (@submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) then @addsmx_nop m3 n C else if @submx m3 n n C (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then if @submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m2 n B else if @submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m1 n A else @genmx (addn m1 m2) n (@col_mx (GRing.Field.sort F) m1 m2 n A B) else @genmx (addn n m3) n (@col_mx (GRing.Field.sort F) n m3 n (if @submx m1 n n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m2 n B else if @submx m2 n n B (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) then @addsmx_nop m1 n A else @genmx (addn m1 m2) n (@col_mx (GRing.Field.sort F) m1 m2 n A B)) C)) *)
by do 3!case: (_ <= 0)%MS; rewrite //= !genmx_id.
Qed.
Canonical addsmx_monoid n :=
Monoid.Law (@addsmxA n n n n) (@adds0mx_id n n) (@addsmx0_id n n).
Canonical addsmx_comoid n := Monoid.ComLaw (@addsmxC n n n).
Lemma addsmxMr m1 m2 n p (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(n, p)) :
((A + B)%MS *m C :=: A *m C + B *m C)%MS.
Proof.
(* Goal: @eqmx n p p (@mulmx (GRing.Field.ringType F) n n p (@addsmx m1 m2 n A B) C) (@addsmx m1 m2 p (@mulmx (GRing.Field.ringType F) m1 n p A C) (@mulmx (GRing.Field.ringType F) m2 n p B C)) *)
by apply/eqmxP; rewrite !addsmxE -!mul_col_mx !submxMr ?addsmxE.
Qed.
Lemma addsmxS m1 m2 m3 m4 n (A : 'M_(m1, n)) (B : 'M_(m2, n))
(C : 'M_(m3, n)) (D : 'M_(m4, n)) :
(A <= C -> B <= D -> A + B <= C + D)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx m1 m3 n A C)) (_ : is_true (@submx m2 m4 n B D)), is_true (@submx n n n (@addsmx m1 m2 n A B) (@addsmx m3 m4 n C D)) *)
move=> sAC sBD.
(* Goal: is_true (@submx n n n (@addsmx m1 m2 n A B) (@addsmx m3 m4 n C D)) *)
by rewrite addsmx_sub {1}addsmxC !(submx_trans _ (addsmxSr _ _)).
Qed.
Lemma addmx_sub_adds m m1 m2 n (A : 'M_(m, n)) (B : 'M_(m, n))
(C : 'M_(m1, n)) (D : 'M_(m2, n)) :
(A <= C -> B <= D -> (A + B)%R <= C + D)%MS.
Lemma addsmx_addKl n m1 m2 (A : 'M_(m1, n)) (B C : 'M_(m2, n)) :
(B <= A)%MS -> (A + (B + C)%R :=: A + C)%MS.
Proof.
(* Goal: forall _ : is_true (@submx m2 m1 n B A), @eqmx n n n (@addsmx m1 m2 n A (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m2 n) B C)) (@addsmx m1 m2 n A C) *)
move=> sBA; apply/eqmxP; rewrite !addsmx_sub !addsmxSl.
(* Goal: is_true (andb (andb true (@submx m2 n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m2 n) B C) (@addsmx m1 m2 n A C))) (andb true (@submx m2 n n C (@addsmx m1 m2 n A (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m2 n) B C))))) *)
by rewrite -{3}[C](addKr B) !addmx_sub_adds ?eqmx_opp.
Qed.
Lemma addsmx_addKr n m1 m2 (A B : 'M_(m1, n)) (C : 'M_(m2, n)) :
(B <= C)%MS -> ((A + B)%R + C :=: A + C)%MS.
Proof.
(* Goal: forall _ : is_true (@submx m1 m2 n B C), @eqmx n n n (@addsmx m1 m2 n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m1 n) A B) C) (@addsmx m1 m2 n A C) *)
by rewrite -!(addsmxC C) addrC; apply: addsmx_addKl.
Qed.
Lemma adds_eqmx m1 m2 m3 m4 n (A : 'M_(m1, n)) (B : 'M_(m2, n))
(C : 'M_(m3, n)) (D : 'M_(m4, n)) :
(A :=: C -> B :=: D -> A + B :=: C + D)%MS.
Proof.
(* Goal: forall (_ : @eqmx m1 m3 n A C) (_ : @eqmx m2 m4 n B D), @eqmx n n n (@addsmx m1 m2 n A B) (@addsmx m3 m4 n C D) *)
by move=> eqAC eqBD; apply/eqmxP; rewrite !addsmxS ?eqAC ?eqBD.
Qed.
Lemma genmx_adds m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(<<(A + B)%MS>> = <<A>> + <<B>>)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@addsmx m1 m2 n A B)) (@addsmx n n n (@genmx m1 n A) (@genmx m2 n B)) *)
rewrite -(eq_genmx (adds_eqmx (genmxE A) (genmxE B))).
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@addsmx n n n (@genmx m1 n A) (@genmx m2 n B))) (@addsmx n n n (@genmx m1 n A) (@genmx m2 n B)) *)
by rewrite [@addsmx]unlock !addsmx_nop_id !(fun_if (@genmx _ _)) !genmx_id.
Qed.
Lemma sub_addsmxP m1 m2 m3 n
(A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
reflect (exists u, A = u.1 *m B + u.2 *m C) (A <= B + C)%MS.
Arguments sub_addsmxP {m1 m2 m3 n A B C}.
Variable I : finType.
Implicit Type P : pred I.
Lemma genmx_sums P n (B_ : I -> 'M_n) :
<<(\sum_(i | P i) B_ i)%MS>>%MS = (\sum_(i | P i) <<B_ i>>)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (B_ i)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@genmx n n (B_ i)))) *)
exact: (big_morph _ (@genmx_adds n n n) (@genmx0 n n)).
Qed.
Lemma sumsmx_sup i0 P m n (A : 'M_(m, n)) (B_ : I -> 'M_n) :
P i0 -> (A <= B_ i0)%MS -> (A <= \sum_(i | P i) B_ i)%MS.
Proof.
(* Goal: forall (_ : is_true (P i0)) (_ : is_true (@submx m n n A (B_ i0))), is_true (@submx m n n A (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (B_ i)))) *)
by move=> Pi0 sAB; apply: submx_trans sAB _; rewrite (bigD1 i0) // addsmxSl.
Qed.
Arguments sumsmx_sup i0 [P m n A B_].
Lemma sumsmx_subP P m n (A_ : I -> 'M_n) (B : 'M_(m, n)) :
reflect (forall i, P i -> A_ i <= B)%MS (\sum_(i | P i) A_ i <= B)%MS.
Proof.
(* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@submx n m n (A_ i) B)) (@submx n m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (A_ i))) B) *)
apply: (iffP idP) => [sAB i Pi | sAB].
(* Goal: is_true (@submx n m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (A_ i))) B) *)
(* Goal: is_true (@submx n m n (A_ i) B) *)
by apply: submx_trans sAB; apply: sumsmx_sup Pi _.
(* Goal: is_true (@submx n m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (A_ i))) B) *)
by elim/big_rec: _ => [|i Ai Pi sAiB]; rewrite ?sub0mx // addsmx_sub sAB.
Qed.
Lemma summx_sub_sums P m n (A : I -> 'M[F]_(m, n)) B :
(forall i, P i -> A i <= B i)%MS ->
((\sum_(i | P i) A i)%R <= \sum_(i | P i) B i)%MS.
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@submx m n n (A i) (B i)), is_true (@submx m n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) m n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) m n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n)) (P i) (A i))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (B i)))) *)
by move=> sAB; apply: summx_sub => i Pi; rewrite (sumsmx_sup i) ?sAB.
Qed.
Lemma sumsmxS P n (A B : I -> 'M[F]_n) :
(forall i, P i -> A i <= B i)%MS ->
(\sum_(i | P i) A i <= \sum_(i | P i) B i)%MS.
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@submx n n n (A i) (B i)), is_true (@submx n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (A i))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (B i)))) *)
by move=> sAB; apply/sumsmx_subP=> i Pi; rewrite (sumsmx_sup i) ?sAB.
Qed.
Lemma eqmx_sums P n (A B : I -> 'M[F]_n) :
(forall i, P i -> A i :=: B i)%MS ->
(\sum_(i | P i) A i :=: \sum_(i | P i) B i)%MS.
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), @eqmx n n n (A i) (B i), @eqmx n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (A i))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (B i))) *)
by move=> eqAB; apply/eqmxP; rewrite !sumsmxS // => i; move/eqAB->.
Qed.
Lemma sub_sumsmxP P m n (A : 'M_(m, n)) (B_ : I -> 'M_n) :
reflect (exists u_, A = \sum_(i | P i) u_ i *m B_ i)
(A <= \sum_(i | P i) B_ i)%MS.
Lemma sumsmxMr_gen P m n A (B : 'M[F]_(m, n)) :
((\sum_(i | P i) A i)%MS *m B :=: \sum_(i | P i) <<A i *m B>>)%MS.
Proof.
(* Goal: @eqmx m n n (@mulmx (GRing.Field.ringType F) m m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) m m)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m m)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) m m) (Finite.sort I) i (@addsmx m m m) (P i) (A i))) B) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@genmx m n (@mulmx (GRing.Field.ringType F) m m n (A i) B)))) *)
apply/eqmxP/andP; split; last first.
(* Goal: is_true (@submx m n n (@mulmx (GRing.Field.ringType F) m m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) m m)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m m)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) m m) (Finite.sort I) i (@addsmx m m m) (P i) (A i))) B) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@genmx m n (@mulmx (GRing.Field.ringType F) m m n (A i) B))))) *)
(* Goal: is_true (@submx n m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@genmx m n (@mulmx (GRing.Field.ringType F) m m n (A i) B)))) (@mulmx (GRing.Field.ringType F) m m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) m m)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m m)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) m m) (Finite.sort I) i (@addsmx m m m) (P i) (A i))) B)) *)
by apply/sumsmx_subP=> i Pi; rewrite genmxE submxMr ?(sumsmx_sup i).
(* Goal: is_true (@submx m n n (@mulmx (GRing.Field.ringType F) m m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) m m)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m m)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) m m) (Finite.sort I) i (@addsmx m m m) (P i) (A i))) B) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@genmx m n (@mulmx (GRing.Field.ringType F) m m n (A i) B))))) *)
have [u ->] := sub_sumsmxP _ _ _ (submx_refl (\sum_(i | P i) A i)%MS).
(* Goal: is_true (@submx m n n (@mulmx (GRing.Field.ringType F) m m n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m m)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m m)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m m)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m m)) (P i) (@mulmx (GRing.Field.ringType F) m m m (u i) (A i)))) B) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@genmx m n (@mulmx (GRing.Field.ringType F) m m n (A i) B))))) *)
by rewrite mulmx_suml summx_sub_sums // => i _; rewrite genmxE -mulmxA submxMl.
Qed.
Lemma sumsmxMr P n (A_ : I -> 'M[F]_n) (B : 'M_n) :
((\sum_(i | P i) A_ i)%MS *m B :=: \sum_(i | P i) (A_ i *m B))%MS.
Proof.
(* Goal: @eqmx n n n (@mulmx (GRing.Field.ringType F) n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (A_ i))) B) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@mulmx (GRing.Field.ringType F) n n n (A_ i) B))) *)
by apply: eqmx_trans (sumsmxMr_gen _ _ _) (eqmx_sums _) => i _; apply: genmxE.
Qed.
Lemma rank_pid_mx m n r : r <= m -> r <= n -> \rank (pid_mx r : 'M_(m, n)) = r.
Proof.
(* Goal: forall (_ : is_true (leq r m)) (_ : is_true (leq r n)), @eq nat (@mxrank m n (@pid_mx (GRing.Field.ringType F) m n r : matrix (GRing.Field.sort F) m n)) r *)
do 2!move/subnKC <-; rewrite pid_mx_block block_mxEv row_mx0 -addsmxE addsmx0.
(* Goal: @eq nat (@mxrank r (addn r (subn n r)) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) r r (subn n r) (@scalar_mx (GRing.Field.ringType F) r (GRing.one (GRing.Field.ringType F))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) r (subn n r))))) r *)
by rewrite -mxrank_tr tr_row_mx trmx0 trmx1 -addsmxE addsmx0 mxrank1.
Qed.
Lemma rank_copid_mx n r : r <= n -> \rank (copid_mx r : 'M_n) = (n - r)%N.
Proof.
(* Goal: forall _ : is_true (leq r n), @eq nat (@mxrank n n (@copid_mx (GRing.Field.ringType F) n r : matrix (GRing.Field.sort F) n n)) (subn n r) *)
move/subnKC <-; rewrite /copid_mx pid_mx_block scalar_mx_block.
(* Goal: @eq nat (@mxrank (addn r (subn n r)) (addn r (subn n r)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn r (subn n r)) (addn r (subn n r))) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) r (subn n r) r (subn n r) (@scalar_mx (GRing.Field.ringType F) r (GRing.one (GRing.Field.ringType F))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) r (subn n r))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (subn n r) r)) (@scalar_mx (GRing.Field.ringType F) (subn n r) (GRing.one (GRing.Field.ringType F)))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn r (subn n r)) (addn r (subn n r))) (@block_mx (GRing.Ring.sort (GRing.Field.ringType F)) r (subn n r) r (subn n r) (@scalar_mx (GRing.Field.ringType F) r (GRing.one (GRing.Field.ringType F))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) r (subn n r))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (subn n r) r)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (subn n r) (subn n r))))))) (subn (addn r (subn n r)) r) *)
rewrite opp_block_mx !oppr0 add_block_mx !addr0 subrr block_mxEv row_mx0.
(* Goal: @eq nat (@mxrank (addn r (subn n r)) (addn r (subn n r)) (@col_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) r (subn n r) (addn r (subn n r)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) r (addn r (subn n r)))) (@row_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (subn n r) r (subn n r) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (subn n r) r)) (@scalar_mx (GRing.Field.ringType F) (subn n r) (GRing.one (GRing.Field.ringType F)))))) (subn (addn r (subn n r)) r) *)
rewrite -addsmxE adds0mx -mxrank_tr tr_row_mx trmx0 trmx1.
(* Goal: @eq nat (@mxrank (addn r (subn n r)) (subn n r) (@col_mx (GRing.Field.sort F) r (subn n r) (subn n r) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) r (subn n r))) (@scalar_mx (GRing.Field.ringType F) (subn n r) (GRing.one (GRing.Field.ringType F))))) (subn (addn r (subn n r)) r) *)
by rewrite -addsmxE adds0mx mxrank1 addKn.
Qed.
Lemma mxrank_compl m n (A : 'M_(m, n)) : \rank A^C = (n - \rank A)%N.
Proof.
(* Goal: @eq nat (@mxrank n n (@complmx m n A)) (subn n (@mxrank m n A)) *)
by rewrite mxrankMfree ?row_free_unit ?rank_copid_mx.
Qed.
Lemma mxrank_ker m n (A : 'M_(m, n)) : \rank (kermx A) = (m - \rank A)%N.
Proof.
(* Goal: @eq nat (@mxrank m m (@kermx m n A)) (subn m (@mxrank m n A)) *)
by rewrite mxrankMfree ?row_free_unit ?unitmx_inv ?rank_copid_mx.
Qed.
Lemma kermx_eq0 n m (A : 'M_(m, n)) : (kermx A == 0) = row_free A.
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Field.eqType F) m m) (@kermx m n A) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m m))) (@row_free m n A) *)
by rewrite -mxrank_eq0 mxrank_ker subn_eq0 row_leq_rank.
Qed.
Lemma mxrank_coker m n (A : 'M_(m, n)) : \rank (cokermx A) = (n - \rank A)%N.
Proof.
(* Goal: @eq nat (@mxrank n n (@cokermx m n A)) (subn n (@mxrank m n A)) *)
by rewrite eqmxMfull ?row_full_unit ?unitmx_inv ?rank_copid_mx.
Qed.
Lemma cokermx_eq0 n m (A : 'M_(m, n)) : (cokermx A == 0) = row_full A.
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@cokermx m n A) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (@row_full m n A) *)
by rewrite -mxrank_eq0 mxrank_coker subn_eq0 col_leq_rank.
Qed.
Lemma mulmx_ker m n (A : 'M_(m, n)) : kermx A *m A = 0.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m m n (@kermx m n A) A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) *)
by rewrite -{2}[A]mulmx_ebase !mulmxA mulmxKV // mul_copid_mx_pid ?mul0mx.
Qed.
Lemma mulmxKV_ker m n p (A : 'M_(n, p)) (B : 'M_(m, n)) :
B *m A = 0 -> B *m col_ebase A *m kermx A = B.
Lemma sub_kermxP p m n (A : 'M_(m, n)) (B : 'M_(p, m)) :
reflect (B *m A = 0) (B <= kermx A)%MS.
Lemma mulmx0_rank_max m n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
A *m B = 0 -> \rank A + \rank B <= n.
Proof.
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m p) (@mulmx (GRing.Field.ringType F) m n p A B) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m p)), is_true (leq (addn (@mxrank m n A) (@mxrank n p B)) n) *)
move=> AB0; rewrite -{3}(subnK (rank_leq_row B)) leq_add2r.
(* Goal: is_true (leq (@mxrank m n A) (subn n (@mxrank n p B))) *)
by rewrite -mxrank_ker mxrankS //; apply/sub_kermxP.
Qed.
Lemma mxrank_Frobenius m n p q (A : 'M_(m, n)) B (C : 'M_(p, q)) :
\rank (A *m B) + \rank (B *m C) <= \rank B + \rank (A *m B *m C).
Proof.
(* Goal: is_true (leq (addn (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank n q (@mulmx (GRing.Field.ringType F) n p q B C))) (addn (@mxrank n p B) (@mxrank m q (@mulmx (GRing.Field.ringType F) m p q (@mulmx (GRing.Field.ringType F) m n p A B) C)))) *)
rewrite -{2}(mulmx_base (A *m B)) -mulmxA (eqmxMfull _ (col_base_full _)).
(* Goal: is_true (leq (addn (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank n q (@mulmx (GRing.Field.ringType F) n p q B C))) (addn (@mxrank n p B) (@mxrank (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) q (@mulmx (GRing.Field.ringType F) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) p q (@row_base m p (@mulmx (GRing.Field.ringType F) m n p A B)) C)))) *)
set C2 := row_base _ *m C.
(* Goal: is_true (leq (addn (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank n q (@mulmx (GRing.Field.ringType F) n p q B C))) (addn (@mxrank n p B) (@mxrank (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) q C2))) *)
rewrite -{1}(subnK (rank_leq_row C2)) -(mxrank_ker C2) addnAC leq_add2r.
(* Goal: is_true (leq (addn (@mxrank (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@kermx (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) q C2)) (@mxrank n q (@mulmx (GRing.Field.ringType F) n p q B C))) (@mxrank n p B)) *)
rewrite addnC -{1}(mulmx_base B) -mulmxA eqmxMfull //.
(* Goal: is_true (leq (addn (@mxrank (@mxrank n p B) q (@mulmx (GRing.Field.ringType F) (@mxrank n p B) p q (@row_base n p B) C)) (@mxrank (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@kermx (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) q C2))) (@mxrank n p B)) *)
set C1 := _ *m C; rewrite -{2}(subnKC (rank_leq_row C1)) leq_add2l -mxrank_ker.
(* Goal: is_true (leq (@mxrank (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@kermx (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) q C2)) (@mxrank (@mxrank n p B) (@mxrank n p B) (@kermx (@mxrank n p B) q C1))) *)
rewrite -(mxrankMfree _ (row_base_free (A *m B))).
(* Goal: is_true (leq (@mxrank (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) p (@mulmx (GRing.Field.ringType F) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) p (@kermx (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) q C2) (@row_base m p (@mulmx (GRing.Field.ringType F) m n p A B)))) (@mxrank (@mxrank n p B) (@mxrank n p B) (@kermx (@mxrank n p B) q C1))) *)
have: (row_base (A *m B) <= row_base B)%MS by rewrite !eq_row_base submxMl.
(* Goal: forall _ : is_true (@submx (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank n p B) p (@row_base m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@row_base n p B)), is_true (leq (@mxrank (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) p (@mulmx (GRing.Field.ringType F) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) p (@kermx (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) q C2) (@row_base m p (@mulmx (GRing.Field.ringType F) m n p A B)))) (@mxrank (@mxrank n p B) (@mxrank n p B) (@kermx (@mxrank n p B) q C1))) *)
case/submxP=> D defD; rewrite defD mulmxA mxrankMfree ?mxrankS //.
(* Goal: is_true (@submx (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank n p B) (@mxrank n p B) (@mulmx (GRing.Field.ringType F) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) (@mxrank n p B) (@kermx (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B)) q C2) D) (@kermx (@mxrank n p B) q C1)) *)
by apply/sub_kermxP; rewrite -mulmxA (mulmxA D) -defD -/C2 mulmx_ker.
Qed.
Lemma mxrank_mul_min m n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
\rank A + \rank B - n <= \rank (A *m B).
Proof.
(* Goal: is_true (leq (subn (addn (@mxrank m n A) (@mxrank n p B)) n) (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A B))) *)
by have:= mxrank_Frobenius A 1%:M B; rewrite mulmx1 mul1mx mxrank1 leq_subLR.
Qed.
Lemma addsmx_compl_full m n (A : 'M_(m, n)) : row_full (A + A^C)%MS.
Lemma sub_capmx_gen m1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A <= capmx_gen B C)%MS = (A <= B)%MS && (A <= C)%MS.
Proof.
(* Goal: @eq bool (@submx m1 (addn m2 m3) n A (@capmx_gen m2 m3 n B C)) (andb (@submx m1 m2 n A B) (@submx m1 m3 n A C)) *)
apply/idP/andP=> [sAI | [/submxP[B' ->{A}] /submxP[C' eqBC']]].
(* Goal: is_true (@submx m1 (addn m2 m3) n (@mulmx (GRing.Field.ringType F) m1 m2 n B' B) (@capmx_gen m2 m3 n B C)) *)
(* Goal: and (is_true (@submx m1 m2 n A B)) (is_true (@submx m1 m3 n A C)) *)
rewrite !(submx_trans sAI) ?submxMl // /capmx_gen.
(* Goal: is_true (@submx m1 (addn m2 m3) n (@mulmx (GRing.Field.ringType F) m1 m2 n B' B) (@capmx_gen m2 m3 n B C)) *)
(* Goal: is_true (@submx (addn m2 m3) m3 n (@mulmx (GRing.Field.ringType F) (addn m2 m3) m2 n (@lsubmx (GRing.Field.sort F) (addn m2 m3) m2 m3 (@kermx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C))) B) C) *)
have:= mulmx_ker (col_mx B C); set K := kermx _.
(* Goal: is_true (@submx m1 (addn m2 m3) n (@mulmx (GRing.Field.ringType F) m1 m2 n B' B) (@capmx_gen m2 m3 n B C)) *)
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (addn m2 m3) n) (@mulmx (GRing.Field.ringType F) (addn m2 m3) (addn m2 m3) n K (@col_mx (GRing.Field.sort F) m2 m3 n B C)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn m2 m3) n)), is_true (@submx (addn m2 m3) m3 n (@mulmx (GRing.Field.ringType F) (addn m2 m3) m2 n (@lsubmx (GRing.Field.sort F) (addn m2 m3) m2 m3 K) B) C) *)
rewrite -{1}[K]hsubmxK mul_row_col; move/(canRL (addrK _))->.
(* Goal: is_true (@submx m1 (addn m2 m3) n (@mulmx (GRing.Field.ringType F) m1 m2 n B' B) (@capmx_gen m2 m3 n B C)) *)
(* Goal: is_true (@submx (addn m2 m3) m3 n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn m2 m3) n) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn m2 m3) n)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn m2 m3) n) (@mulmx (GRing.Field.ringType F) (addn m2 m3) m3 n (@rsubmx (GRing.Field.sort F) (addn m2 m3) m2 m3 K) C))) C) *)
by rewrite add0r -mulNmx submxMl.
(* Goal: is_true (@submx m1 (addn m2 m3) n (@mulmx (GRing.Field.ringType F) m1 m2 n B' B) (@capmx_gen m2 m3 n B C)) *)
have: (row_mx B' (- C') <= kermx (col_mx B C))%MS.
(* Goal: forall _ : is_true (@submx m1 (addn m2 m3) (addn m2 m3) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 m3 B' (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 m3) C')) (@kermx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C))), is_true (@submx m1 (addn m2 m3) n (@mulmx (GRing.Field.ringType F) m1 m2 n B' B) (@capmx_gen m2 m3 n B C)) *)
(* Goal: is_true (@submx m1 (addn m2 m3) (addn m2 m3) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 m3 B' (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 m3) C')) (@kermx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C))) *)
by apply/sub_kermxP; rewrite mul_row_col eqBC' mulNmx subrr.
(* Goal: forall _ : is_true (@submx m1 (addn m2 m3) (addn m2 m3) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 m3 B' (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 m3) C')) (@kermx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C))), is_true (@submx m1 (addn m2 m3) n (@mulmx (GRing.Field.ringType F) m1 m2 n B' B) (@capmx_gen m2 m3 n B C)) *)
case/submxP=> D; rewrite -[kermx _]hsubmxK mul_mx_row.
(* Goal: forall _ : @eq (matrix (GRing.Field.sort F) m1 (addn m2 m3)) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 m3 B' (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 m3) C')) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 m3 (@mulmx (GRing.Field.ringType F) m1 (addn m2 m3) m2 D (@lsubmx (GRing.Field.sort F) (addn m2 m3) m2 m3 (@kermx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C)))) (@mulmx (GRing.Field.ringType F) m1 (addn m2 m3) m3 D (@rsubmx (GRing.Field.sort F) (addn m2 m3) m2 m3 (@kermx (addn m2 m3) n (@col_mx (GRing.Field.sort F) m2 m3 n B C))))), is_true (@submx m1 (addn m2 m3) n (@mulmx (GRing.Field.ringType F) m1 m2 n B' B) (@capmx_gen m2 m3 n B C)) *)
by case/eq_row_mx=> -> _; rewrite -mulmxA submxMl.
Qed.
Let capmx_witnessP m n (A : 'M_(m, n)) : equivmx A (qidmx A) (capmx_witness A).
Proof.
(* Goal: is_true (@equivmx m n A (@qidmx m n A) (@capmx_witness m n A)) *)
rewrite /equivmx qidmx_eq1 /qidmx /capmx_witness.
(* Goal: is_true (andb (andb (@submx n m n (if @row_full m n A then @conform_mx (GRing.Ring.sort (GRing.Field.ringType F)) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A else @genmx m n A) A) (@submx m n n A (if @row_full m n A then @conform_mx (GRing.Ring.sort (GRing.Field.ringType F)) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A else @genmx m n A))) (@eq_op bool_eqType (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (if @row_full m n A then @conform_mx (GRing.Ring.sort (GRing.Field.ringType F)) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A else @genmx m n A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (if @eq_op nat_eqType m n then @eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (@pid_mx (GRing.Field.ringType F) m n n) else @row_full m n A))) *)
rewrite -sub1mx; case s1A: (1%:M <= A)%MS => /=; last first.
(* Goal: is_true (andb (andb (@submx n m n (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) A) (@submx m n n A (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A))) (@eq_op bool_eqType (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (if @eq_op nat_eqType m n then @eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (@pid_mx (GRing.Field.ringType F) m n n) else true))) *)
(* Goal: is_true (andb (andb (@submx n m n (@genmx m n A) A) (@submx m n n A (@genmx m n A))) (@eq_op bool_eqType (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@genmx m n A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (if @eq_op nat_eqType m n then @eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (@pid_mx (GRing.Field.ringType F) m n n) else false))) *)
rewrite !genmxE submx_refl /= -negb_add; apply: contra {s1A}(negbT s1A).
(* Goal: is_true (andb (andb (@submx n m n (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) A) (@submx m n n A (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A))) (@eq_op bool_eqType (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (if @eq_op nat_eqType m n then @eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (@pid_mx (GRing.Field.ringType F) m n n) else true))) *)
(* Goal: forall _ : is_true (addb (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@genmx m n A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (if @eq_op nat_eqType m n then @eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (@pid_mx (GRing.Field.ringType F) m n n) else false)), is_true (@submx n m n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) *)
case: eqP => [<- _| _]; first by rewrite genmxE.
(* Goal: is_true (andb (andb (@submx n m n (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) A) (@submx m n n A (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A))) (@eq_op bool_eqType (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (if @eq_op nat_eqType m n then @eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (@pid_mx (GRing.Field.ringType F) m n n) else true))) *)
(* Goal: forall _ : is_true (addb false (if @eq_op nat_eqType m n then @eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (@pid_mx (GRing.Field.ringType F) m n n) else false)), is_true (@submx n m n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) *)
by case: eqP A => //= -> A; move/eqP->; rewrite pid_mx_1.
(* Goal: is_true (andb (andb (@submx n m n (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) A) (@submx m n n A (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A))) (@eq_op bool_eqType (@eq_op (matrix_eqType (GRing.Field.eqType F) n n) (@conform_mx (GRing.Field.sort F) m n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (if @eq_op nat_eqType m n then @eq_op (matrix_eqType (GRing.Field.eqType F) m n) A (@pid_mx (GRing.Field.ringType F) m n n) else true))) *)
case: (m =P n) => [-> | ne_mn] in A s1A *.
by rewrite conform_mx_id submx_refl pid_mx_1 eqxx.
by rewrite nonconform_mx ?submx1 ?s1A ?eqxx //; case: eqP.
Qed.
Qed.
Let capmx_normP m n (A : 'M_(m, n)) : equivmx_spec A (qidmx A) (capmx_norm A).
Proof.
(* Goal: @equivmx_spec m n A (@qidmx m n A) (@capmx_norm m n A) *)
by case/andP: (chooseP (capmx_witnessP A)) => /eqmxP defN /eqP.
Qed.
Let capmx_norm_eq m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
qidmx A = qidmx B -> (A == B)%MS -> capmx_norm A = capmx_norm B.
Proof.
(* Goal: forall (_ : @eq bool (@qidmx m1 n A) (@qidmx m2 n B)) (_ : is_true (andb (@submx m1 m2 n A B) (@submx m2 m1 n B A))), @eq (Choice.sort (matrix_choiceType (GRing.Field.choiceType F) n n)) (@capmx_norm m1 n A) (@capmx_norm m2 n B) *)
move=> eqABid /eqmxP eqAB.
(* Goal: @eq (Choice.sort (matrix_choiceType (GRing.Field.choiceType F) n n)) (@capmx_norm m1 n A) (@capmx_norm m2 n B) *)
have{eqABid eqAB} eqAB: equivmx A (qidmx A) =1 equivmx B (qidmx B).
(* Goal: @eq (Choice.sort (matrix_choiceType (GRing.Field.choiceType F) n n)) (@capmx_norm m1 n A) (@capmx_norm m2 n B) *)
(* Goal: @eqfun bool (matrix (GRing.Field.sort F) n n) (@equivmx m1 n A (@qidmx m1 n A)) (@equivmx m2 n B (@qidmx m2 n B)) *)
by move=> C; rewrite /equivmx eqABid !eqAB.
(* Goal: @eq (Choice.sort (matrix_choiceType (GRing.Field.choiceType F) n n)) (@capmx_norm m1 n A) (@capmx_norm m2 n B) *)
rewrite {1}/capmx_norm (eq_choose eqAB).
(* Goal: @eq (Choice.sort (matrix_choiceType (GRing.Field.choiceType F) n n)) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx m2 n B (@qidmx m2 n B)) (@capmx_witness m1 n A)) (@capmx_norm m2 n B) *)
by apply: choose_id; first rewrite -eqAB; apply: capmx_witnessP.
Qed.
Let capmx_nopP m n (A : 'M_(m, n)) : equivmx_spec A (qidmx A) (capmx_nop A).
Proof.
(* Goal: @equivmx_spec m n A (@qidmx m n A) (@capmx_nop m n A) *)
rewrite /capmx_nop; case: (eqVneq m n) => [-> | ne_mn] in A *.
by rewrite conform_mx_id.
by rewrite nonconform_mx ?ne_mn //; apply: capmx_normP.
Qed.
Qed.
Let sub_qidmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
qidmx B -> (A <= B)%MS.
Proof.
(* Goal: forall _ : is_true (@qidmx m2 n B), is_true (@submx m1 m2 n A B) *)
rewrite /qidmx => idB; apply: {A}submx_trans (submx1 A) _.
(* Goal: is_true (@submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B) *)
by case: eqP B idB => [-> _ /eqP-> | _ B]; rewrite (=^~ sub1mx, pid_mx_1).
Qed.
Let qidmx_cap m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
qidmx (A :&: B)%MS = qidmx A && qidmx B.
Proof.
(* Goal: @eq bool (@qidmx n n (@capmx m1 m2 n A B)) (andb (@qidmx m1 n A) (@qidmx m2 n B)) *)
rewrite unlock -sub1mx.
(* Goal: @eq bool (@qidmx n n (if @qidmx m1 n A then @capmx_nop m2 n B else if @qidmx m2 n B then @capmx_nop m1 n A else if @submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B then @capmx_norm m1 n A else @capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B))) (andb (@qidmx m1 n A) (@qidmx m2 n B)) *)
case idA: (qidmx A); case idB: (qidmx B); try by rewrite capmx_nopP.
(* Goal: @eq bool (@qidmx n n (if @submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B then @capmx_norm m1 n A else @capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B))) (andb false false) *)
case s1B: (_ <= B)%MS; first by rewrite capmx_normP.
(* Goal: @eq bool (@qidmx n n (@capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B))) (andb false false) *)
apply/idP=> /(sub_qidmx 1%:M).
(* Goal: forall _ : is_true (@submx n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (@capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B))), False *)
by rewrite capmx_normP sub_capmx_gen s1B andbF.
Qed.
Let capmx_eq_norm m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
qidmx A = qidmx B -> (A :&: B)%MS = capmx_norm (A :&: B)%MS.
Proof.
(* Goal: forall _ : @eq bool (@qidmx m1 n A) (@qidmx m2 n B), @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n A B) (@capmx_norm n n (@capmx m1 m2 n A B)) *)
move=> eqABid; rewrite unlock -sub1mx {}eqABid.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (if @qidmx m2 n B then @capmx_nop m2 n B else if @qidmx m2 n B then @capmx_nop m1 n A else if @submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B then @capmx_norm m1 n A else @capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B)) (@capmx_norm n n (if @qidmx m2 n B then @capmx_nop m2 n B else if @qidmx m2 n B then @capmx_nop m1 n A else if @submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B then @capmx_norm m1 n A else @capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B))) *)
have norm_id m (C : 'M_(m, n)) (N := capmx_norm C) : capmx_norm N = N.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (if @qidmx m2 n B then @capmx_nop m2 n B else if @qidmx m2 n B then @capmx_nop m1 n A else if @submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B then @capmx_norm m1 n A else @capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B)) (@capmx_norm n n (if @qidmx m2 n B then @capmx_nop m2 n B else if @qidmx m2 n B then @capmx_nop m1 n A else if @submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B then @capmx_norm m1 n A else @capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B))) *)
(* Goal: @eq (Choice.sort (matrix_choiceType (GRing.Field.choiceType F) n n)) (@capmx_norm n n N) N *)
by apply: capmx_norm_eq; rewrite ?capmx_normP ?andbb.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (if @qidmx m2 n B then @capmx_nop m2 n B else if @qidmx m2 n B then @capmx_nop m1 n A else if @submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B then @capmx_norm m1 n A else @capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B)) (@capmx_norm n n (if @qidmx m2 n B then @capmx_nop m2 n B else if @qidmx m2 n B then @capmx_nop m1 n A else if @submx n m2 n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) B then @capmx_norm m1 n A else @capmx_norm (addn m1 m2) n (@capmx_gen m1 m2 n A B))) *)
case idB: (qidmx B); last by case: ifP; rewrite norm_id.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx_nop m2 n B) (@capmx_norm n n (@capmx_nop m2 n B)) *)
rewrite /capmx_nop; case: (eqVneq m2 n) => [-> | neqm2n] in B idB *.
have idN := idB; rewrite -{1}capmx_normP !qidmx_eq1 in idN idB.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx_nop m2 n B) (@capmx_norm n n (@capmx_nop m2 n B)) *)
by rewrite conform_mx_id (eqP idN) (eqP idB).
by rewrite nonconform_mx ?neqm2n ?norm_id.
Qed.
Qed.
Lemma capmxE m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :&: B :=: capmx_gen A B)%MS.
Lemma capmxSl m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A :&: B <= A)%MS.
Proof.
(* Goal: is_true (@submx n m1 n (@capmx m1 m2 n A B) A) *)
by rewrite capmxE submxMl.
Qed.
Lemma sub_capmx m m1 m2 n (A : 'M_(m, n)) (B : 'M_(m1, n)) (C : 'M_(m2, n)) :
(A <= B :&: C)%MS = (A <= B)%MS && (A <= C)%MS.
Proof.
(* Goal: @eq bool (@submx m n n A (@capmx m1 m2 n B C)) (andb (@submx m m1 n A B) (@submx m m2 n A C)) *)
by rewrite capmxE sub_capmx_gen.
Qed.
Lemma capmxC m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A :&: B = B :&: A)%MS.
Lemma capmxSr m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A :&: B <= B)%MS.
Proof.
(* Goal: is_true (@submx n m2 n (@capmx m1 m2 n A B) B) *)
by rewrite capmxC capmxSl.
Qed.
Lemma capmx_idPr n m1 m2 (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (A :&: B :=: B)%MS (B <= A)%MS.
Proof.
(* Goal: Bool.reflect (@eqmx n m2 n (@capmx m1 m2 n A B) B) (@submx m2 m1 n B A) *)
have:= @eqmxP _ _ _ (A :&: B)%MS B.
(* Goal: forall _ : Bool.reflect (@eqmx n m2 n (@capmx m1 m2 n A B) B) (andb (@submx n m2 n (@capmx m1 m2 n A B) B) (@submx m2 n n B (@capmx m1 m2 n A B))), Bool.reflect (@eqmx n m2 n (@capmx m1 m2 n A B) B) (@submx m2 m1 n B A) *)
by rewrite capmxSr sub_capmx submx_refl !andbT.
Qed.
Lemma capmx_idPl n m1 m2 (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (A :&: B :=: A)%MS (A <= B)%MS.
Proof.
(* Goal: Bool.reflect (@eqmx n m1 n (@capmx m1 m2 n A B) A) (@submx m1 m2 n A B) *)
by rewrite capmxC; apply: capmx_idPr.
Qed.
Lemma capmxS m1 m2 m3 m4 n (A : 'M_(m1, n)) (B : 'M_(m2, n))
(C : 'M_(m3, n)) (D : 'M_(m4, n)) :
(A <= C -> B <= D -> A :&: B <= C :&: D)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx m1 m3 n A C)) (_ : is_true (@submx m2 m4 n B D)), is_true (@submx n n n (@capmx m1 m2 n A B) (@capmx m3 m4 n C D)) *)
by move=> sAC sBD; rewrite sub_capmx {1}capmxC !(submx_trans (capmxSr _ _)).
Qed.
Lemma cap_eqmx m1 m2 m3 m4 n (A : 'M_(m1, n)) (B : 'M_(m2, n))
(C : 'M_(m3, n)) (D : 'M_(m4, n)) :
(A :=: C -> B :=: D -> A :&: B :=: C :&: D)%MS.
Proof.
(* Goal: forall (_ : @eqmx m1 m3 n A C) (_ : @eqmx m2 m4 n B D), @eqmx n n n (@capmx m1 m2 n A B) (@capmx m3 m4 n C D) *)
by move=> eqAC eqBD; apply/eqmxP; rewrite !capmxS ?eqAC ?eqBD.
Qed.
Lemma capmxMr m1 m2 n p (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(n, p)) :
((A :&: B) *m C <= A *m C :&: B *m C)%MS.
Proof.
(* Goal: is_true (@submx n p p (@mulmx (GRing.Field.ringType F) n n p (@capmx m1 m2 n A B) C) (@capmx m1 m2 p (@mulmx (GRing.Field.ringType F) m1 n p A C) (@mulmx (GRing.Field.ringType F) m2 n p B C))) *)
by rewrite sub_capmx !submxMr ?capmxSl ?capmxSr.
Qed.
Lemma cap0mx m1 m2 n (A : 'M_(m2, n)) : ((0 : 'M_(m1, n)) :&: A)%MS = 0.
Proof.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 n) : matrix (GRing.Field.sort F) m1 n) A) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
exact: submx0null (capmxSl _ _).
Qed.
Lemma capmx0 m1 m2 n (A : 'M_(m1, n)) : (A :&: (0 : 'M_(m2, n)))%MS = 0.
Proof.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 n) : matrix (GRing.Field.sort F) m2 n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
exact: submx0null (capmxSr _ _).
Qed.
Lemma capmxT m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
row_full B -> (A :&: B :=: A)%MS.
Lemma capTmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
row_full A -> (A :&: B :=: B)%MS.
Proof.
(* Goal: forall _ : is_true (@row_full m1 n A), @eqmx n m2 n (@capmx m1 m2 n A B) B *)
by move=> Afull; apply/eqmxP; rewrite capmxC !capmxT ?andbb.
Qed.
Let capmx_nop_id n (A : 'M_n) : capmx_nop A = A.
Proof.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx_nop n n A) A *)
by rewrite /capmx_nop conform_mx_id.
Qed.
Lemma cap1mx n (A : 'M_n) : (1%:M :&: A = A)%MS.
Proof.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) A) A *)
by rewrite unlock qidmx_eq1 eqxx capmx_nop_id.
Qed.
Lemma capmx1 n (A : 'M_n) : (A :&: 1%:M = A)%MS.
Proof.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n A (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) A *)
by rewrite capmxC cap1mx.
Qed.
Lemma genmx_cap m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
<<A :&: B>>%MS = (<<A>> :&: <<B>>)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@capmx m1 m2 n A B)) (@capmx n n n (@genmx m1 n A) (@genmx m2 n B)) *)
rewrite -(eq_genmx (cap_eqmx (genmxE A) (genmxE B))).
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@capmx n n n (@genmx m1 n A) (@genmx m2 n B))) (@capmx n n n (@genmx m1 n A) (@genmx m2 n B)) *)
case idAB: (qidmx <<A>> || qidmx <<B>>)%MS.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@capmx n n n (@genmx m1 n A) (@genmx m2 n B))) (@capmx n n n (@genmx m1 n A) (@genmx m2 n B)) *)
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@capmx n n n (@genmx m1 n A) (@genmx m2 n B))) (@capmx n n n (@genmx m1 n A) (@genmx m2 n B)) *)
rewrite [@capmx]unlock !capmx_nop_id !(fun_if (@genmx _ _)) !genmx_id.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@capmx n n n (@genmx m1 n A) (@genmx m2 n B))) (@capmx n n n (@genmx m1 n A) (@genmx m2 n B)) *)
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (if @qidmx n n (@genmx m1 n A) then @genmx m2 n B else if @qidmx n n (@genmx m2 n B) then @genmx m1 n A else if @row_full n n (@genmx m2 n B) then @genmx n n (@capmx_norm n n (@genmx m1 n A)) else @genmx n n (@capmx_norm (addn n n) n (@capmx_gen n n n (@genmx m1 n A) (@genmx m2 n B)))) (if @qidmx n n (@genmx m1 n A) then @genmx m2 n B else if @qidmx n n (@genmx m2 n B) then @genmx m1 n A else if @row_full n n (@genmx m2 n B) then @capmx_norm n n (@genmx m1 n A) else @capmx_norm (addn n n) n (@capmx_gen n n n (@genmx m1 n A) (@genmx m2 n B))) *)
by case: (qidmx _) idAB => //= ->.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@capmx n n n (@genmx m1 n A) (@genmx m2 n B))) (@capmx n n n (@genmx m1 n A) (@genmx m2 n B)) *)
case idA: (qidmx _) idAB => //= idB; rewrite {2}capmx_eq_norm ?idA //.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@capmx n n n (@genmx m1 n A) (@genmx m2 n B))) (@capmx_norm n n (@capmx n n n (@genmx m1 n A) (@genmx m2 n B))) *)
set C := (_ :&: _)%MS; have eq_idC: row_full C = qidmx C.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n C) (@capmx_norm n n C) *)
(* Goal: @eq bool (@row_full n n C) (@qidmx n n C) *)
rewrite qidmx_cap idA -sub1mx sub_capmx genmxE; apply/andP=> [[s1A]].
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n C) (@capmx_norm n n C) *)
(* Goal: forall _ : is_true (@submx n n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (@genmx m2 n B)), False *)
by case/idP: idA; rewrite qidmx_eq1 -genmx1 (sameP eqP genmxP) submx1.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n C) (@capmx_norm n n C) *)
rewrite unlock /capmx_norm eq_idC.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx n n C (@qidmx n n C)) (@genmx_witness n n C)) (@choose (matrix_choiceType (GRing.Field.choiceType F) n n) (@equivmx n n C (@qidmx n n C)) (@capmx_witness n n C)) *)
by apply: choose_id (capmx_witnessP _); rewrite -eq_idC genmx_witnessP.
Qed.
Lemma capmxA m1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A :&: (B :&: C) = A :&: B :&: C)%MS.
Canonical capmx_monoid n :=
Monoid.Law (@capmxA n n n n) (@cap1mx n) (@capmx1 n).
Canonical capmx_comoid n := Monoid.ComLaw (@capmxC n n n).
Lemma bigcapmx_inf i0 P m n (A_ : I -> 'M_n) (B : 'M_(m, n)) :
P i0 -> (A_ i0 <= B -> \bigcap_(i | P i) A_ i <= B)%MS.
Proof.
(* Goal: forall (_ : is_true (P i0)) (_ : is_true (@submx n m n (A_ i0) B)), is_true (@submx n m n (@BigOp.bigop (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (Finite.sort I) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@capmx n n n) (P i) (A_ i))) B) *)
by move=> Pi0; apply: submx_trans; rewrite (bigD1 i0) // capmxSl.
Qed.
Lemma sub_bigcapmxP P m n (A : 'M_(m, n)) (B_ : I -> 'M_n) :
reflect (forall i, P i -> A <= B_ i)%MS (A <= \bigcap_(i | P i) B_ i)%MS.
Proof.
(* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@submx m n n A (B_ i))) (@submx m n n A (@BigOp.bigop (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (Finite.sort I) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@capmx n n n) (P i) (B_ i)))) *)
apply: (iffP idP) => [sAB i Pi | sAB].
(* Goal: is_true (@submx m n n A (@BigOp.bigop (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (Finite.sort I) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@capmx n n n) (P i) (B_ i)))) *)
(* Goal: is_true (@submx m n n A (B_ i)) *)
by apply: (submx_trans sAB); rewrite (bigcapmx_inf Pi).
(* Goal: is_true (@submx m n n A (@BigOp.bigop (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (Finite.sort I) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@capmx n n n) (P i) (B_ i)))) *)
by elim/big_rec: _ => [|i Pi C sAC]; rewrite ?submx1 // sub_capmx sAB.
Qed.
Lemma genmx_bigcap P n (A_ : I -> 'M_n) :
(<<\bigcap_(i | P i) A_ i>> = \bigcap_(i | P i) <<A_ i>>)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@BigOp.bigop (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (Finite.sort I) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@capmx n n n) (P i) (A_ i)))) (@BigOp.bigop (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (Finite.sort I) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@capmx n n n) (P i) (@genmx n n (A_ i)))) *)
exact: (big_morph _ (@genmx_cap n n n) (@genmx1 n)).
Qed.
Lemma matrix_modl m1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(A <= C -> A + (B :&: C) :=: (A + B) :&: C)%MS.
Lemma matrix_modr m1 m2 m3 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) (C : 'M_(m3, n)) :
(C <= A -> (A :&: B) + C :=: A :&: (B + C))%MS.
Proof.
(* Goal: forall _ : is_true (@submx m3 m1 n C A), @eqmx n n n (@addsmx n m3 n (@capmx m1 m2 n A B) C) (@capmx m1 n n A (@addsmx m2 m3 n B C)) *)
by rewrite !(capmxC A) -!(addsmxC C); apply: matrix_modl.
Qed.
Lemma capmx_compl m n (A : 'M_(m, n)) : (A :&: A^C)%MS = 0.
Proof.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx m n n A (@complmx m n A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
set D := (A :&: A^C)%MS; have: (D <= D)%MS by [].
(* Goal: forall _ : is_true (@submx n n n D D), @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) D (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
rewrite sub_capmx andbC => /andP[/submxP[B defB]].
(* Goal: forall _ : is_true (@submx n m n D A), @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) D (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
rewrite submxE => /eqP; rewrite defB -!mulmxA mulKVmx ?copid_mx_id //.
(* Goal: forall _ : @eq (Equality.sort (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) n n)) (@mulmx (GRing.Field.ringType F) n n n B (@copid_mx (GRing.Field.ringType F) n (@mxrank m n A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)), @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@mulmx (GRing.Field.ringType F) n n n B (@complmx m n A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
by rewrite mulmxA => ->; rewrite mul0mx.
Qed.
Lemma mxrank_mul_ker m n p (A : 'M_(m, n)) (B : 'M_(n, p)) :
(\rank (A *m B) + \rank (A :&: kermx B))%N = \rank A.
Lemma mxrank_injP m n p (A : 'M_(m, n)) (f : 'M_(n, p)) :
reflect (\rank (A *m f) = \rank A) ((A :&: kermx f)%MS == 0).
Proof.
(* Goal: Bool.reflect (@eq nat (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A f)) (@mxrank m n A)) (@eq_op (matrix_eqType (Choice.eqType (GRing.Field.choiceType F)) n n) (@capmx m n n A (@kermx n p f)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) *)
rewrite -mxrank_eq0 -(eqn_add2l (\rank (A *m f))).
(* Goal: Bool.reflect (@eq nat (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A f)) (@mxrank m n A)) (@eq_op nat_eqType (addn (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A f)) (@mxrank n n (@capmx m n n A (@kermx n p f)))) (addn (@mxrank m p (@mulmx (GRing.Field.ringType F) m n p A f)) O)) *)
by rewrite mxrank_mul_ker addn0 eq_sym; apply: eqP.
Qed.
Lemma mxrank_disjoint_sum m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :&: B)%MS = 0 -> \rank (A + B)%MS = (\rank A + \rank B)%N.
Proof.
(* Goal: forall _ : @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n A B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)), @eq nat (@mxrank n n (@addsmx m1 m2 n A B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
move=> AB0; pose Ar := row_base A; pose Br := row_base B.
(* Goal: @eq nat (@mxrank n n (@addsmx m1 m2 n A B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
have [Afree Bfree]: row_free Ar /\ row_free Br by rewrite !row_base_free.
(* Goal: @eq nat (@mxrank n n (@addsmx m1 m2 n A B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
have: (Ar :&: Br <= A :&: B)%MS by rewrite capmxS ?eq_row_base.
(* Goal: forall _ : is_true (@submx n n n (@capmx (@mxrank m1 n A) (@mxrank m2 n B) n Ar Br) (@capmx m1 m2 n A B)), @eq nat (@mxrank n n (@addsmx m1 m2 n A B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
rewrite {}AB0 submx0 -mxrank_eq0 capmxE mxrankMfree //.
(* Goal: forall _ : is_true (@eq_op nat_eqType (@mxrank (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A) (@lsubmx (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A) (@mxrank m2 n B) (@kermx (addn (@mxrank m1 n A) (@mxrank m2 n B)) n (@col_mx (GRing.Field.sort F) (@mxrank m1 n A) (@mxrank m2 n B) n Ar Br)))) O), @eq nat (@mxrank n n (@addsmx m1 m2 n A B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
set Cr := col_mx Ar Br; set Crl := lsubmx _; rewrite mxrank_eq0 => /eqP Crl0.
(* Goal: @eq nat (@mxrank n n (@addsmx m1 m2 n A B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
rewrite -(adds_eqmx (eq_row_base _) (eq_row_base _)) addsmxE -/Cr.
(* Goal: @eq nat (@mxrank (addn (@mxrank m1 n A) (@mxrank m2 n B)) n Cr) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
suffices K0: kermx Cr = 0.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (addn (@mxrank m1 n A) (@mxrank m2 n B))) (@kermx (addn (@mxrank m1 n A) (@mxrank m2 n B)) n Cr) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)))) *)
(* Goal: @eq nat (@mxrank (addn (@mxrank m1 n A) (@mxrank m2 n B)) n Cr) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
by apply/eqP; rewrite eqn_leq rank_leq_row -subn_eq0 -mxrank_ker K0 mxrank0.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (addn (@mxrank m1 n A) (@mxrank m2 n B))) (@kermx (addn (@mxrank m1 n A) (@mxrank m2 n B)) n Cr) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)))) *)
move/eqP: (mulmx_ker Cr); rewrite -[kermx Cr]hsubmxK mul_row_col -/Crl Crl0.
(* Goal: forall _ : is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) n) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) n) (@mulmx (GRing.Field.ringType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A) n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A))) Ar) (@mulmx (GRing.Field.ringType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m2 n B) n (@rsubmx (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A) (@mxrank m2 n B) (@kermx (addn (@mxrank m1 n A) (@mxrank m2 n B)) n Cr)) Br)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) n))), @eq (matrix (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (addn (@mxrank m1 n A) (@mxrank m2 n B))) (@row_mx (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A) (@mxrank m2 n B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A))) (@rsubmx (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A) (@mxrank m2 n B) (@kermx (addn (@mxrank m1 n A) (@mxrank m2 n B)) n Cr))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)))) *)
rewrite mul0mx add0r -mxrank_eq0 mxrankMfree // mxrank_eq0 => /eqP->.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (addn (@mxrank m1 n A) (@mxrank m2 n B))) (@row_mx (GRing.Field.sort F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A) (@mxrank m2 n B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m1 n A))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@mxrank m2 n B)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)))) *)
exact: row_mx0.
Qed.
Lemma diffmxE m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :\: B :=: A :&: (capmx_gen A B)^C)%MS.
Proof.
(* Goal: @eqmx n n n (@diffmx m1 m2 n A B) (@capmx m1 n n A (@complmx (addn m1 m2) n (@capmx_gen m1 m2 n A B))) *)
by rewrite unlock; apply/eqmxP; rewrite !genmxE !capmxE andbb.
Qed.
Lemma genmx_diff m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(<<A :\: B>> = A :\: B)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@genmx n n (@diffmx m1 m2 n A B)) (@diffmx m1 m2 n A B) *)
by rewrite [@diffmx]unlock genmx_id.
Qed.
Lemma diffmxSl m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) : (A :\: B <= A)%MS.
Proof.
(* Goal: is_true (@submx n m1 n (@diffmx m1 m2 n A B) A) *)
by rewrite diffmxE capmxSl.
Qed.
Lemma capmx_diff m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
((A :\: B) :&: B)%MS = 0.
Proof.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n m2 n (@diffmx m1 m2 n A B) B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
apply/eqP; pose C := capmx_gen A B; rewrite -submx0 -(capmx_compl C).
(* Goal: is_true (@submx n n n (@capmx n m2 n (@diffmx m1 m2 n A B) B) (@capmx (addn m1 m2) n n C (@complmx (addn m1 m2) n C))) *)
by rewrite sub_capmx -capmxE sub_capmx andbAC -sub_capmx -diffmxE -sub_capmx.
Qed.
Lemma addsmx_diff_cap_eq m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A :\: B + A :&: B :=: A)%MS.
Proof.
(* Goal: @eqmx n m1 n (@addsmx n n n (@diffmx m1 m2 n A B) (@capmx m1 m2 n A B)) A *)
apply/eqmxP; rewrite addsmx_sub capmxSl diffmxSl /=.
(* Goal: is_true (@submx m1 n n A (@addsmx n n n (@diffmx m1 m2 n A B) (@capmx m1 m2 n A B))) *)
set C := (A :\: B)%MS; set D := capmx_gen A B.
(* Goal: is_true (@submx m1 n n A (@addsmx n n n C (@capmx m1 m2 n A B))) *)
suffices sACD: (A <= C + D)%MS.
(* Goal: is_true (@submx m1 n n A (@addsmx n (addn m1 m2) n C D)) *)
(* Goal: is_true (@submx m1 n n A (@addsmx n n n C (@capmx m1 m2 n A B))) *)
by rewrite (submx_trans sACD) ?addsmxS ?capmxE.
(* Goal: is_true (@submx m1 n n A (@addsmx n (addn m1 m2) n C D)) *)
have:= addsmx_compl_full D; rewrite /row_full addsmxE.
(* Goal: forall _ : is_true (@eq_op nat_eqType (@mxrank (addn (addn m1 m2) n) n (@col_mx (GRing.Field.sort F) (addn m1 m2) n n D (@complmx (addn m1 m2) n D))) n), is_true (@submx m1 n n A (@addsmx n (addn m1 m2) n C D)) *)
case/row_fullP=> U /(congr1 (mulmx A)); rewrite mulmx1.
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m1 n) (@mulmx (GRing.Field.ringType F) m1 n n A (@mulmx (GRing.Field.ringType F) n (addn (addn m1 m2) n) n U (@col_mx (GRing.Field.sort F) (addn m1 m2) n n D (@complmx (addn m1 m2) n D)))) A, is_true (@submx m1 n n A (@addsmx n (addn m1 m2) n C D)) *)
rewrite -[U]hsubmxK mul_row_col mulmxDr addrC 2!mulmxA.
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m1 n) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 n) (@mulmx (GRing.Field.ringType F) m1 n n (@mulmx (GRing.Field.ringType F) m1 n n A (@rsubmx (GRing.Ring.sort (GRing.Field.ringType F)) n (addn m1 m2) n U)) (@complmx (addn m1 m2) n D)) (@mulmx (GRing.Field.ringType F) m1 (addn m1 m2) n (@mulmx (GRing.Field.ringType F) m1 n (addn m1 m2) A (@lsubmx (GRing.Ring.sort (GRing.Field.ringType F)) n (addn m1 m2) n U)) D)) A, is_true (@submx m1 n n A (@addsmx n (addn m1 m2) n C D)) *)
set V := _ *m _ => defA; rewrite -defA; move/(canRL (addrK _)): defA => defV.
(* Goal: is_true (@submx m1 n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m1 n) V (@mulmx (GRing.Field.ringType F) m1 (addn m1 m2) n (@mulmx (GRing.Field.ringType F) m1 n (addn m1 m2) A (@lsubmx (GRing.Ring.sort (GRing.Field.ringType F)) n (addn m1 m2) n U)) D)) (@addsmx n (addn m1 m2) n C D)) *)
suffices /submxP[W ->]: (V <= C)%MS by rewrite -mul_row_col addsmxE submxMl.
(* Goal: is_true (@submx m1 n n V C) *)
rewrite diffmxE sub_capmx {1}defV -mulNmx addmx_sub 1?mulmx_sub //.
(* Goal: is_true (@submx (addn m1 m2) m1 n D A) *)
by rewrite -capmxE capmxSl.
Qed.
Lemma mxrank_cap_compl m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(\rank (A :&: B) + \rank (A :\: B))%N = \rank A.
Proof.
(* Goal: @eq nat (addn (@mxrank n n (@capmx m1 m2 n A B)) (@mxrank n n (@diffmx m1 m2 n A B))) (@mxrank m1 n A) *)
rewrite addnC -mxrank_disjoint_sum ?addsmx_diff_cap_eq //.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n (@diffmx m1 m2 n A B) (@capmx m1 m2 n A B)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
by rewrite (capmxC A) capmxA capmx_diff cap0mx.
Qed.
Lemma mxrank_sum_cap m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(\rank (A + B) + \rank (A :&: B) = \rank A + \rank B)%N.
Proof.
(* Goal: @eq nat (addn (@mxrank n n (@addsmx m1 m2 n A B)) (@mxrank n n (@capmx m1 m2 n A B))) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
set C := (A :&: B)%MS; set D := (A :\: B)%MS.
(* Goal: @eq nat (addn (@mxrank n n (@addsmx m1 m2 n A B)) (@mxrank n n C)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
have rDB: \rank (A + B)%MS = \rank (D + B)%MS.
(* Goal: @eq nat (addn (@mxrank n n (@addsmx m1 m2 n A B)) (@mxrank n n C)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
(* Goal: @eq nat (@mxrank n n (@addsmx m1 m2 n A B)) (@mxrank n n (@addsmx n m2 n D B)) *)
apply/eqP; rewrite mxrank_leqif_sup; first by rewrite addsmxS ?diffmxSl.
(* Goal: @eq nat (addn (@mxrank n n (@addsmx m1 m2 n A B)) (@mxrank n n C)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
(* Goal: is_true (@submx n n n (@addsmx m1 m2 n A B) (@addsmx n m2 n D B)) *)
by rewrite addsmx_sub addsmxSr -(addsmx_diff_cap_eq A B) addsmxS ?capmxSr.
(* Goal: @eq nat (addn (@mxrank n n (@addsmx m1 m2 n A B)) (@mxrank n n C)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
rewrite {1}rDB mxrank_disjoint_sum ?capmx_diff //.
(* Goal: @eq nat (addn (addn (@mxrank n n D) (@mxrank m2 n B)) (@mxrank n n C)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) *)
by rewrite addnC addnA mxrank_cap_compl.
Qed.
Lemma mxrank_adds_leqif m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
\rank (A + B) <= \rank A + \rank B ?= iff (A :&: B <= (0 : 'M_n))%MS.
Proof.
(* Goal: leqif (@mxrank n n (@addsmx m1 m2 n A B)) (addn (@mxrank m1 n A) (@mxrank m2 n B)) (@submx n n n (@capmx m1 m2 n A B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n) : matrix (GRing.Field.sort F) n n)) *)
rewrite -mxrank_sum_cap; split; first exact: leq_addr.
(* Goal: @eq bool (@eq_op nat_eqType (@mxrank n n (@addsmx m1 m2 n A B)) (addn (@mxrank n n (@addsmx m1 m2 n A B)) (@mxrank n n (@capmx m1 m2 n A B)))) (@submx n n n (@capmx m1 m2 n A B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) *)
by rewrite addnC (@eqn_add2r _ 0) eq_sym mxrank_eq0 -submx0.
Qed.
Lemma proj_mx_sub m n U V (W : 'M_(m, n)) : (W *m proj_mx U V <= U)%MS.
Proof.
(* Goal: is_true (@submx m n n (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) U) *)
by rewrite !mulmx_sub // -addsmxE addsmx0.
Qed.
Lemma proj_mx_compl_sub m n U V (W : 'M_(m, n)) :
(W <= U + V -> W - W *m proj_mx U V <= V)%MS.
Proof.
(* Goal: forall _ : is_true (@submx m n n W (@addsmx n n n U V)), is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) W (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)))) V) *)
rewrite addsmxE => sWUV; rewrite mulmxA -{1}(mulmxKpV sWUV) -mulmxBr.
(* Goal: is_true (@submx m n n (@mulmx (GRing.Field.ringType F) m (addn n n) n (@mulmx (GRing.Field.ringType F) m n (addn n n) W (@pinvmx (addn n n) n (@col_mx (GRing.Field.sort F) n n n U V))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn n n) n) (@col_mx (GRing.Field.sort F) n n n U V) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (addn n n) n) (@col_mx (GRing.Field.sort F) n n n U (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))))) V) *)
by rewrite mulmx_sub // opp_col_mx add_col_mx subrr subr0 -addsmxE adds0mx.
Qed.
Lemma proj_mx_id m n U V (W : 'M_(m, n)) :
(U :&: V = 0)%MS -> (W <= U)%MS -> W *m proj_mx U V = W.
Proof.
(* Goal: forall (_ : @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n U V) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (_ : is_true (@submx m n n W U)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) W *)
move=> dxUV sWU; apply/eqP; rewrite -subr_eq0 -submx0 -dxUV.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) W)) (@capmx n n n U V)) *)
rewrite sub_capmx addmx_sub ?eqmx_opp ?proj_mx_sub //= -eqmx_opp opprB.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) W (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)))) V) *)
by rewrite proj_mx_compl_sub // (submx_trans sWU) ?addsmxSl.
Qed.
Lemma proj_mx_0 m n U V (W : 'M_(m, n)) :
(U :&: V = 0)%MS -> (W <= V)%MS -> W *m proj_mx U V = 0.
Proof.
(* Goal: forall (_ : @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n U V) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (_ : is_true (@submx m n n W V)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) *)
move=> dxUV sWV; apply/eqP; rewrite -submx0 -dxUV.
(* Goal: is_true (@submx m n n (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) (@capmx n n n U V)) *)
rewrite sub_capmx proj_mx_sub /= -[_ *m _](subrK W) addmx_sub // -eqmx_opp.
(* Goal: is_true (@submx m n n (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) W))) V) *)
by rewrite opprB proj_mx_compl_sub // (submx_trans sWV) ?addsmxSr.
Qed.
Lemma add_proj_mx m n U V (W : 'M_(m, n)) :
(U :&: V = 0)%MS -> (W <= U + V)%MS ->
W *m proj_mx U V + W *m proj_mx V U = W.
Proof.
(* Goal: forall (_ : @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n U V) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (_ : is_true (@submx m n n W (@addsmx n n n U V))), @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n V U))) W *)
move=> dxUV sWUV; apply/eqP; rewrite -subr_eq0 -submx0 -dxUV.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n V U))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) W)) (@capmx n n n U V)) *)
rewrite -addrA sub_capmx {2}addrCA -!(opprB W).
(* Goal: is_true (andb (@submx m n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) W (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n V U)))))) U) (@submx m n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n V U)) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) W (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@mulmx (GRing.Field.ringType F) m n n W (@proj_mx n U V)))))) V)) *)
by rewrite !{1}addmx_sub ?proj_mx_sub ?eqmx_opp ?proj_mx_compl_sub // addsmxC.
Qed.
Lemma proj_mx_proj n (U V : 'M_n) :
let P := proj_mx U V in (U :&: V = 0)%MS -> P *m P = P.
Proof.
(* Goal: let P := @proj_mx n U V in forall _ : @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n U V) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n P P) P *)
by move=> P dxUV; rewrite -{-2}[P]mul1mx proj_mx_id ?proj_mx_sub.
Qed.
Lemma complete_unitmx m n (U : 'M_(m, n)) (f : 'M_n) :
\rank (U *m f) = \rank U -> {g : 'M_n | g \in unitmx & U *m f = U *m g}.
Lemma eqmxMunitP m n (U V : 'M_(m, n)) :
reflect (exists2 P, P \in unitmx & U = P *m V) (U == V)%MS.
Proof.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) P (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m)) (@unitmx (GRing.Field.comUnitRingType F) m)))) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => @eq (matrix (GRing.Field.sort F) m n) U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m m n P V))) (andb (@submx m m n U V) (@submx m m n V U)) *)
apply: (iffP eqmxP) => [eqUV | [P Punit ->]]; last first.
(* Goal: @ex2 (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) P (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m)) (@unitmx (GRing.Field.comUnitRingType F) m)))) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => @eq (matrix (GRing.Field.sort F) m n) U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m m n P V)) *)
(* Goal: @eqmx m m n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m m n P V) V *)
by apply/eqmxMfull; rewrite row_full_unit.
(* Goal: @ex2 (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) P (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m)) (@unitmx (GRing.Field.comUnitRingType F) m)))) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => @eq (matrix (GRing.Field.sort F) m n) U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m m n P V)) *)
have [D defU]: exists D, U = D *m V by apply/submxP; rewrite eqUV.
(* Goal: @ex2 (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) P (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m)) (@unitmx (GRing.Field.comUnitRingType F) m)))) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => @eq (matrix (GRing.Field.sort F) m n) U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m m n P V)) *)
have{eqUV} [Pt Pt_unit defUt]: {Pt | Pt \in unitmx & V^T *m D^T = V^T *m Pt}.
(* Goal: @ex2 (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) P (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m)) (@unitmx (GRing.Field.comUnitRingType F) m)))) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => @eq (matrix (GRing.Field.sort F) m n) U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m m n P V)) *)
(* Goal: @sig2 (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (fun Pt : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) Pt (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m)) (@unitmx (GRing.Field.comUnitRingType F) m)))) (fun Pt : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n m) (@mulmx (GRing.Field.ringType F) n m m (@trmx (GRing.Field.sort F) m n V) (@trmx (GRing.Ring.sort (GRing.Field.ringType F)) m m D)) (@mulmx (GRing.Field.ringType F) n m m (@trmx (GRing.Field.sort F) m n V) Pt)) *)
by apply/complete_unitmx; rewrite -trmx_mul -defU !mxrank_tr eqUV.
(* Goal: @ex2 (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => is_true (@in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) P (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m)) (@unitmx (GRing.Field.comUnitRingType F) m)))) (fun P : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType F)) m m => @eq (matrix (GRing.Field.sort F) m n) U (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType F)) m m n P V)) *)
by exists Pt^T; last apply/trmx_inj; rewrite ?unitmx_tr // defU !trmx_mul trmxK.
Qed.
Lemma eq_rank_unitmx m1 m2 n (U : 'M_(m1, n)) (V : 'M_(m2, n)) :
\rank U = \rank V -> {f : 'M_n | f \in unitmx & V :=: U *m f}%MS.
Section SumExpr.
Inductive mxsum_spec n : forall m, 'M[F]_(m, n) -> nat -> Prop :=
| TrivialMxsum m A
: @mxsum_spec n m A (\rank A)
| ProperMxsum m1 m2 T1 T2 r1 r2 of
@mxsum_spec n m1 T1 r1 & @mxsum_spec n m2 T2 r2
: mxsum_spec (T1 + T2)%MS (r1 + r2)%N.
Arguments mxsum_spec {n%N m%N} T%MS r%N.
Structure mxsum_expr m n := Mxsum {
mxsum_val :> wrapped 'M_(m, n);
mxsum_rank : wrapped nat;
_ : mxsum_spec (unwrap mxsum_val) (unwrap mxsum_rank)
}.
Canonical trivial_mxsum m n A :=
@Mxsum m n (Wrap A) (Wrap (\rank A)) (TrivialMxsum A).
Structure proper_mxsum_expr n := ProperMxsumExpr {
proper_mxsum_val :> 'M_n;
proper_mxsum_rank : nat;
_ : mxsum_spec proper_mxsum_val proper_mxsum_rank
}.
Definition proper_mxsumP n (S : proper_mxsum_expr n) :=
let: ProperMxsumExpr _ _ termS := S return mxsum_spec S (proper_mxsum_rank S)
in termS.
Canonical sum_mxsum n (S : proper_mxsum_expr n) :=
@Mxsum n n (wrap (S : 'M_n)) (wrap (proper_mxsum_rank S)) (proper_mxsumP S).
Section Binary.
Variable (m1 m2 n : nat) (S1 : mxsum_expr m1 n) (S2 : mxsum_expr m2 n).
Fact binary_mxsum_proof :
mxsum_spec (unwrap S1 + unwrap S2)
(unwrap (mxsum_rank S1) + unwrap (mxsum_rank S2)).
Proof.
(* Goal: @mxsum_spec n n (@addsmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2))) (addn (@unwrap nat (@mxsum_rank m1 n S1)) (@unwrap nat (@mxsum_rank m2 n S2))) *)
by case: S1 S2 => [A1 r1 A1P] [A2 r2 A2P]; right.
Qed.
Canonical binary_mxsum_expr := ProperMxsumExpr binary_mxsum_proof.
End Binary.
Section Nary.
Context J (r : seq J) (P : pred J) n (S_ : J -> mxsum_expr n n).
Fact nary_mxsum_proof :
mxsum_spec (\sum_(j <- r | P j) unwrap (S_ j))
(\sum_(j <- r | P j) unwrap (mxsum_rank (S_ j))).
Proof.
(* Goal: @mxsum_spec n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) J (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) r (fun j : J => @BigBody (matrix (GRing.Field.sort F) n n) J j (@addsmx n n n) (P j) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j))))) (@BigOp.bigop nat J O r (fun j : J => @BigBody nat J j addn (P j) (@unwrap nat (@mxsum_rank n n (S_ j))))) *)
elim/big_rec2: _ => [|j]; first by rewrite -(mxrank0 n n); left.
(* Goal: forall (y1 : GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (y2 : nat) (_ : is_true (P j)) (_ : @mxsum_spec n n y1 y2), @mxsum_spec n n (@addsmx n n n (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j))) y1) (addn (@unwrap nat (@mxsum_rank n n (S_ j))) y2) *)
by case: (S_ j); right.
Qed.
Canonical nary_mxsum_expr := ProperMxsumExpr nary_mxsum_proof.
End Nary.
Definition mxdirect_def m n T of phantom 'M_(m, n) (unwrap (mxsum_val T)) :=
\rank (unwrap T) == unwrap (mxsum_rank T).
End SumExpr.
Notation mxdirect A := (mxdirect_def (Phantom 'M_(_,_) A%MS)).
Lemma mxdirectP n (S : proper_mxsum_expr n) :
reflect (\rank S = proper_mxsum_rank S) (mxdirect S).
Proof.
(* Goal: Bool.reflect (@eq nat (@mxrank n n (@proper_mxsum_val n S)) (@proper_mxsum_rank n S)) (@mxdirect_def n n (@sum_mxsum n S) (Phantom (matrix (GRing.Field.sort F) n n) (@proper_mxsum_val n S))) *)
exact: eqnP.
Qed.
Arguments mxdirectP {n S}.
Lemma mxdirect_trivial m n A : mxdirect (unwrap (@trivial_mxsum m n A)).
Proof.
(* Goal: is_true (@mxdirect_def m n (@trivial_mxsum m n A) (Phantom (matrix (GRing.Field.sort F) m n) (@unwrap (matrix (GRing.Field.sort F) m n) (@mxsum_val m n (@trivial_mxsum m n A))))) *)
exact: eqxx.
Qed.
Lemma mxrank_sum_leqif m n (S : mxsum_expr m n) :
\rank (unwrap S) <= unwrap (mxsum_rank S) ?= iff mxdirect (unwrap S).
Proof.
(* Goal: leqif (@mxrank m n (@unwrap (matrix (GRing.Field.sort F) m n) (@mxsum_val m n S))) (@unwrap nat (@mxsum_rank m n S)) (@mxdirect_def m n S (Phantom (matrix (GRing.Field.sort F) m n) (@unwrap (matrix (GRing.Field.sort F) m n) (@mxsum_val m n S)))) *)
rewrite /mxdirect_def; case: S => [[A] [r] /= defAr]; split=> //=.
(* Goal: is_true (leq (@mxrank m n A) r) *)
elim: m A r / defAr => // m1 m2 A1 A2 r1 r2 _ leAr1 _ leAr2.
(* Goal: is_true (leq (@mxrank n n (@addsmx m1 m2 n A1 A2)) (addn r1 r2)) *)
by apply: leq_trans (leq_add leAr1 leAr2); rewrite mxrank_adds_leqif.
Qed.
Lemma mxdirectE m n (S : mxsum_expr m n) :
mxdirect (unwrap S) = (\rank (unwrap S) == unwrap (mxsum_rank S)).
Proof.
(* Goal: @eq bool (@mxdirect_def m n S (Phantom (matrix (GRing.Field.sort F) m n) (@unwrap (matrix (GRing.Field.sort F) m n) (@mxsum_val m n S)))) (@eq_op nat_eqType (@mxrank m n (@unwrap (matrix (GRing.Field.sort F) m n) (@mxsum_val m n S))) (@unwrap nat (@mxsum_rank m n S))) *)
by [].
Qed.
Lemma mxdirectEgeq m n (S : mxsum_expr m n) :
mxdirect (unwrap S) = (\rank (unwrap S) >= unwrap (mxsum_rank S)).
Proof.
(* Goal: @eq bool (@mxdirect_def m n S (Phantom (matrix (GRing.Field.sort F) m n) (@unwrap (matrix (GRing.Field.sort F) m n) (@mxsum_val m n S)))) (leq (@unwrap nat (@mxsum_rank m n S)) (@mxrank m n (@unwrap (matrix (GRing.Field.sort F) m n) (@mxsum_val m n S)))) *)
by rewrite (geq_leqif (mxrank_sum_leqif S)).
Qed.
Section BinaryDirect.
Variables m1 m2 n : nat.
Lemma mxdirect_addsE (S1 : mxsum_expr m1 n) (S2 : mxsum_expr m2 n) :
mxdirect (unwrap S1 + unwrap S2)
= [&& mxdirect (unwrap S1), mxdirect (unwrap S2)
& unwrap S1 :&: unwrap S2 == 0]%MS.
Proof.
(* Goal: @eq bool (@mxdirect_def n n (@sum_mxsum n (@binary_mxsum_expr m1 m2 n S1 S2)) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2))))) (andb (@mxdirect_def m1 n S1 (Phantom (matrix (GRing.Field.sort F) m1 n) (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)))) (andb (@mxdirect_def m2 n S2 (Phantom (matrix (GRing.Field.sort F) m2 n) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2)))) (@eq_op (matrix_eqType (Choice.eqType (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) *)
rewrite (@mxdirectE n) /=.
(* Goal: @eq bool (@eq_op nat_eqType (@mxrank n n (@addsmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2)))) (addn (@unwrap nat (@mxsum_rank m1 n S1)) (@unwrap nat (@mxsum_rank m2 n S2)))) (andb (@mxdirect_def m1 n S1 (Phantom (matrix (GRing.Field.sort F) m1 n) (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)))) (andb (@mxdirect_def m2 n S2 (Phantom (matrix (GRing.Field.sort F) m2 n) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2)))) (@eq_op (matrix_eqType (Choice.eqType (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) *)
have:= leqif_add (mxrank_sum_leqif S1) (mxrank_sum_leqif S2).
(* Goal: forall _ : leqif (addn (@mxrank m1 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1))) (@mxrank m2 n (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2)))) (addn (@unwrap nat (@mxsum_rank m1 n S1)) (@unwrap nat (@mxsum_rank m2 n S2))) (andb (@mxdirect_def m1 n S1 (Phantom (matrix (GRing.Field.sort F) m1 n) (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)))) (@mxdirect_def m2 n S2 (Phantom (matrix (GRing.Field.sort F) m2 n) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2))))), @eq bool (@eq_op nat_eqType (@mxrank n n (@addsmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2)))) (addn (@unwrap nat (@mxsum_rank m1 n S1)) (@unwrap nat (@mxsum_rank m2 n S2)))) (andb (@mxdirect_def m1 n S1 (Phantom (matrix (GRing.Field.sort F) m1 n) (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)))) (andb (@mxdirect_def m2 n S2 (Phantom (matrix (GRing.Field.sort F) m2 n) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2)))) (@eq_op (matrix_eqType (Choice.eqType (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) *)
move/(leqif_trans (mxrank_adds_leqif (unwrap S1) (unwrap S2)))=> ->.
(* Goal: @eq bool (andb (@submx n n n (@capmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (andb (@mxdirect_def m1 n S1 (Phantom (matrix (GRing.Field.sort F) m1 n) (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)))) (@mxdirect_def m2 n S2 (Phantom (matrix (GRing.Field.sort F) m2 n) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2)))))) (andb (@mxdirect_def m1 n S1 (Phantom (matrix (GRing.Field.sort F) m1 n) (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)))) (andb (@mxdirect_def m2 n S2 (Phantom (matrix (GRing.Field.sort F) m2 n) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2)))) (@eq_op (matrix_eqType (Choice.eqType (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n (@unwrap (matrix (GRing.Field.sort F) m1 n) (@mxsum_val m1 n S1)) (@unwrap (matrix (GRing.Field.sort F) m2 n) (@mxsum_val m2 n S2))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) *)
by rewrite andbC -andbA submx0.
Qed.
Lemma mxdirect_addsP (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
reflect (A :&: B = 0)%MS (mxdirect (A + B)).
Proof.
(* Goal: Bool.reflect (@eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n A B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (@mxdirect_def n n (@sum_mxsum n (@binary_mxsum_expr m1 m2 n (@trivial_mxsum m1 n A) (@trivial_mxsum m2 n B))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx m1 m2 n A B))) *)
by rewrite mxdirect_addsE !mxdirect_trivial; apply: eqP.
Qed.
End BinaryDirect.
Section NaryDirect.
Variables (P : pred I) (n : nat).
Let TIsum A_ i := (A_ i :&: (\sum_(j | P j && (j != i)) A_ j) = 0 :> 'M_n)%MS.
Let mxdirect_sums_recP (S_ : I -> mxsum_expr n n) :
reflect (forall i, P i -> mxdirect (unwrap (S_ i)) /\ TIsum (unwrap \o S_) i)
(mxdirect (\sum_(i | P i) (unwrap (S_ i)))).
Proof.
(* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), and (is_true (@mxdirect_def n n (S_ i) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i)))))) (TIsum (@funcomp (matrix (GRing.Field.sort F) n n) (wrapped (matrix (GRing.Field.sort F) n n)) (Finite.sort I) tt (@unwrap (matrix (GRing.Field.sort F) n n)) (fun x : Finite.sort I => @mxsum_val n n (S_ x))) i)) (@mxdirect_def n n (@sum_mxsum n (@nary_mxsum_expr (Finite.sort I) (index_enum I) P n S_)) (Phantom (matrix (GRing.Field.sort F) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))))))) *)
rewrite /TIsum; apply: (iffP eqnP) => /= [dxS i Pi | dxS].
(* Goal: @eq nat (@mxrank n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (P j) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j)))))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun j : Finite.sort I => @BigBody nat (Finite.sort I) j addn (P j) (@unwrap nat (@mxsum_rank n n (S_ j))))) *)
(* Goal: and (is_true (@mxdirect_def n n (S_ i) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i)))))) (@eq (matrix (GRing.Field.sort F) n n) (@capmx n n n (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) *)
set Si' := (\sum_(j | _) unwrap (S_ j))%MS.
(* Goal: @eq nat (@mxrank n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (P j) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j)))))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun j : Finite.sort I => @BigBody nat (Finite.sort I) j addn (P j) (@unwrap nat (@mxsum_rank n n (S_ j))))) *)
(* Goal: and (is_true (@mxdirect_def n n (S_ i) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i)))))) (@eq (matrix (GRing.Field.sort F) n n) (@capmx n n n (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))) Si') (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) *)
have: mxdirect (unwrap (S_ i) + Si') by apply/eqnP; rewrite /= -!(bigD1 i).
(* Goal: @eq nat (@mxrank n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (P j) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j)))))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun j : Finite.sort I => @BigBody nat (Finite.sort I) j addn (P j) (@unwrap nat (@mxsum_rank n n (S_ j))))) *)
(* Goal: forall _ : is_true (@mxdirect_def n n (@sum_mxsum n (@binary_mxsum_expr n n n (S_ i) (@sum_mxsum n (@nary_mxsum_expr (Finite.sort I) (index_enum I) (fun j : Finite.sort I => andb (P j) (negb (@eq_op (Finite.eqType I) j i))) n S_)))) (Phantom (matrix (GRing.Field.sort F) n n) (@addsmx n n n (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))) Si'))), and (is_true (@mxdirect_def n n (S_ i) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i)))))) (@eq (matrix (GRing.Field.sort F) n n) (@capmx n n n (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))) Si') (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) *)
by rewrite mxdirect_addsE => /and3P[-> _ /eqP].
(* Goal: @eq nat (@mxrank n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (P j) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j)))))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun j : Finite.sort I => @BigBody nat (Finite.sort I) j addn (P j) (@unwrap nat (@mxsum_rank n n (S_ j))))) *)
elim: _.+1 {-2 4}P (subxx P) (ltnSn #|P|) => // m IHm Q; move/subsetP=> sQP.
(* Goal: forall _ : is_true (leq (S (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) Q))) (S m)), @eq nat (@mxrank n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (Q j) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j)))))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun j : Finite.sort I => @BigBody nat (Finite.sort I) j addn (Q j) (@unwrap nat (@mxsum_rank n n (S_ j))))) *)
case: (pickP Q) => [i Qi | Q0]; last by rewrite !big_pred0 ?mxrank0.
(* Goal: forall _ : is_true (leq (S (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) Q))) (S m)), @eq nat (@mxrank n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (Q j) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j)))))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun j : Finite.sort I => @BigBody nat (Finite.sort I) j addn (Q j) (@unwrap nat (@mxsum_rank n n (S_ j))))) *)
rewrite (cardD1x Qi) !((bigD1 i) Q) //=.
(* Goal: forall _ : is_true (leq (S (addn (S O) (@card I (@mem (Finite.sort I) (simplPredType (Finite.sort I)) (@SimplPred (Finite.sort I) (fun i0 : Finite.sort I => andb (Q i0) (negb (@eq_op (Finite.eqType I) i0 i)))))))) (S m)), @eq nat (@mxrank n n (@addsmx n n n (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i0 : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i0 (@addsmx n n n) (andb (Q i0) (negb (@eq_op (Finite.eqType I) i0 i))) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i0))))))) (addn (@unwrap nat (@mxsum_rank n n (S_ i))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i0 : Finite.sort I => @BigBody nat (Finite.sort I) i0 addn (andb (Q i0) (negb (@eq_op (Finite.eqType I) i0 i))) (@unwrap nat (@mxsum_rank n n (S_ i0)))))) *)
move/IHm=> <- {IHm}/=; last by apply/subsetP=> j /andP[/sQP].
(* Goal: @eq nat (@mxrank n n (@addsmx n n n (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i0 : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i0 (@addsmx n n n) (andb (Q i0) (negb (@eq_op (Finite.eqType I) i0 i))) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i0))))))) (addn (@unwrap nat (@mxsum_rank n n (S_ i))) (@mxrank n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (Q j) (negb (@eq_op (Finite.eqType I) j i))) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j))))))) *)
case: (dxS i (sQP i Qi)) => /eqnP=> <- TiQ_0; rewrite mxrank_disjoint_sum //.
(* Goal: @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i0 : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i0 (@addsmx n n n) (andb (Q i0) (negb (@eq_op (Finite.eqType I) i0 i))) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i0)))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
apply/eqP; rewrite -submx0 -{2}TiQ_0 capmxS //=.
(* Goal: is_true (@submx n n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i0 : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i0 (@addsmx n n n) (andb (Q i0) (negb (@eq_op (Finite.eqType I) i0 i))) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i0))))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ j)))))) *)
by apply/sumsmx_subP=> j /= /andP[Qj i'j]; rewrite (sumsmx_sup j) ?[P j]sQP.
Qed.
Lemma mxdirect_sumsP (A_ : I -> 'M_n) :
reflect (forall i, P i -> A_ i :&: (\sum_(j | P j && (j != i)) A_ j) = 0)%MS
(mxdirect (\sum_(i | P i) A_ i)).
Proof.
(* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n (A_ i) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (A_ j)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (@mxdirect_def n n (@sum_mxsum n (@nary_mxsum_expr (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum n n (A_ i)))) (Phantom (matrix (GRing.Field.sort F) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (A_ i))))) *)
apply: (iffP (mxdirect_sums_recP _)) => dxA i /dxA; first by case.
(* Goal: forall _ : @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx n n n (A_ i) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (A_ j)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)), and (is_true (@mxdirect_def n n (@trivial_mxsum n n (A_ i)) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (@trivial_mxsum n n (A_ i))))))) (TIsum (@funcomp (matrix (GRing.Field.sort F) n n) (wrapped (matrix (GRing.Field.sort F) n n)) (Finite.sort I) tt (@unwrap (matrix (GRing.Field.sort F) n n)) (fun x : Finite.sort I => @mxsum_val n n (@trivial_mxsum n n (A_ x)))) i) *)
by rewrite mxdirect_trivial.
Qed.
Lemma mxdirect_sumsE (S_ : I -> mxsum_expr n n) (xunwrap := unwrap) :
reflect (and (forall i, P i -> mxdirect (unwrap (S_ i)))
(mxdirect (\sum_(i | P i) (xunwrap (S_ i)))))
(mxdirect (\sum_(i | P i) (unwrap (S_ i)))).
Proof.
(* Goal: Bool.reflect (and (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@mxdirect_def n n (S_ i) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i)))))) (is_true (@mxdirect_def n n (@sum_mxsum n (@nary_mxsum_expr (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum n n (xunwrap (@mxsum_val n n (S_ i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (xunwrap (@mxsum_val n n (S_ i))))))))) (@mxdirect_def n n (@sum_mxsum n (@nary_mxsum_expr (Finite.sort I) (index_enum I) P n S_)) (Phantom (matrix (GRing.Field.sort F) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i))))))) *)
apply: (iffP (mxdirect_sums_recP _)) => [dxS | [dxS_ dxS] i Pi].
(* Goal: and (is_true (@mxdirect_def n n (S_ i) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i)))))) (TIsum (@funcomp (matrix (GRing.Field.sort F) n n) (wrapped (matrix (GRing.Field.sort F) n n)) (Finite.sort I) tt (@unwrap (matrix (GRing.Field.sort F) n n)) (fun x : Finite.sort I => @mxsum_val n n (S_ x))) i) *)
(* Goal: and (forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@mxdirect_def n n (S_ i) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i)))))) (is_true (@mxdirect_def n n (@sum_mxsum n (@nary_mxsum_expr (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum n n (xunwrap (@mxsum_val n n (S_ i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (xunwrap (@mxsum_val n n (S_ i)))))))) *)
by do [split; last apply/mxdirect_sumsP] => i; case/dxS.
(* Goal: and (is_true (@mxdirect_def n n (S_ i) (Phantom (matrix (GRing.Field.sort F) n n) (@unwrap (matrix (GRing.Field.sort F) n n) (@mxsum_val n n (S_ i)))))) (TIsum (@funcomp (matrix (GRing.Field.sort F) n n) (wrapped (matrix (GRing.Field.sort F) n n)) (Finite.sort I) tt (@unwrap (matrix (GRing.Field.sort F) n n)) (fun x : Finite.sort I => @mxsum_val n n (S_ x))) i) *)
by split; [apply: dxS_ | apply: mxdirect_sumsP Pi].
Qed.
End NaryDirect.
Section SubDaddsmx.
Variables m m1 m2 n : nat.
Variables (A : 'M[F]_(m, n)) (B1 : 'M[F]_(m1, n)) (B2 : 'M[F]_(m2, n)).
Variant sub_daddsmx_spec : Prop :=
SubDaddsmxSpec A1 A2 of (A1 <= B1)%MS & (A2 <= B2)%MS & A = A1 + A2
& forall C1 C2, (C1 <= B1)%MS -> (C2 <= B2)%MS ->
A = C1 + C2 -> C1 = A1 /\ C2 = A2.
Lemma sub_daddsmx : (B1 :&: B2 = 0)%MS -> (A <= B1 + B2)%MS -> sub_daddsmx_spec.
Proof.
(* Goal: forall (_ : @eq (matrix (Choice.sort (GRing.Field.choiceType F)) n n) (@capmx m1 m2 n B1 B2) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) (_ : is_true (@submx m n n A (@addsmx m1 m2 n B1 B2))), sub_daddsmx_spec *)
move=> dxB /sub_addsmxP[u defA].
(* Goal: sub_daddsmx_spec *)
exists (u.1 *m B1) (u.2 *m B2); rewrite ?submxMl // => C1 C2 sCB1 sCB2.
(* Goal: forall _ : @eq (matrix (GRing.Field.sort F) m n) A (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) C1 C2), and (@eq (matrix (GRing.Field.sort F) m n) C1 (@mulmx (GRing.Field.ringType F) m m1 n (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B1)) (@eq (matrix (GRing.Field.sort F) m n) C2 (@mulmx (GRing.Field.ringType F) m m2 n (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B2)) *)
move/(canLR (addrK _)) => defC1.
(* Goal: and (@eq (matrix (GRing.Field.sort F) m n) C1 (@mulmx (GRing.Field.ringType F) m m1 n (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B1)) (@eq (matrix (GRing.Field.sort F) m n) C2 (@mulmx (GRing.Field.ringType F) m m2 n (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B2)) *)
suffices: (C2 - u.2 *m B2 <= B1 :&: B2)%MS.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) C2 (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m m2 n (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B2))) (@capmx m1 m2 n B1 B2)) *)
(* Goal: forall _ : is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) C2 (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m m2 n (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B2))) (@capmx m1 m2 n B1 B2)), and (@eq (matrix (GRing.Field.sort F) m n) C1 (@mulmx (GRing.Field.ringType F) m m1 n (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B1)) (@eq (matrix (GRing.Field.sort F) m n) C2 (@mulmx (GRing.Field.ringType F) m m2 n (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B2)) *)
by rewrite dxB submx0 subr_eq0 -defC1 defA; move/eqP->; rewrite addrK.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) C2 (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m m2 n (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B2))) (@capmx m1 m2 n B1 B2)) *)
rewrite sub_capmx -opprB -{1}(canLR (addKr _) defA) -addrA defC1.
(* Goal: is_true (andb (@submx m m1 n (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@mulmx (GRing.Field.ringType F) m m1 n (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B1)) C1)) B1) (@submx m m2 n (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@mulmx (GRing.Field.ringType F) m m2 n (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m m2) u) B2) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) C2))) B2)) *)
by rewrite !(eqmx_opp, addmx_sub) ?submxMl.
Qed.
End SubDaddsmx.
Section SubDsumsmx.
Variables (P : pred I) (m n : nat) (A : 'M[F]_(m, n)) (B : I -> 'M[F]_n).
Variant sub_dsumsmx_spec : Prop :=
SubDsumsmxSpec A_ of forall i, P i -> (A_ i <= B i)%MS
& A = \sum_(i | P i) A_ i
& forall C, (forall i, P i -> C i <= B i)%MS ->
A = \sum_(i | P i) C i -> {in SimplPred P, C =1 A_}.
Lemma sub_dsumsmx :
mxdirect (\sum_(i | P i) B i) -> (A <= \sum_(i | P i) B i)%MS ->
sub_dsumsmx_spec.
Proof.
(* Goal: forall (_ : is_true (@mxdirect_def n n (@sum_mxsum n (@nary_mxsum_expr (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum n n (B i)))) (Phantom (matrix (GRing.Field.sort F) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (B i)))))) (_ : is_true (@submx m n n A (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx n n n) (P i) (B i))))), sub_dsumsmx_spec *)
move/mxdirect_sumsP=> dxB /sub_sumsmxP[u defA].
(* Goal: sub_dsumsmx_spec *)
pose A_ i := u i *m B i.
(* Goal: sub_dsumsmx_spec *)
exists A_ => //= [i _ | C sCB defAC i Pi]; first exact: submxMl.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (C i) (A_ i) *)
apply/eqP; rewrite -subr_eq0 -submx0 -{dxB}(dxB i Pi) /=.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (C i) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (A_ i))) (@capmx n n n (B i) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (B j))))) *)
rewrite sub_capmx addmx_sub ?eqmx_opp ?submxMl ?sCB //=.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (C i) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (A_ i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (B j)))) *)
rewrite -(subrK A (C i)) -addrA -opprB addmx_sub ?eqmx_opp //.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) A (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (A_ i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (B j)))) *)
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) A (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (C i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (B j)))) *)
rewrite addrC defAC (bigD1 i) // addKr /= summx_sub // => j Pi'j.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) A (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (A_ i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (B j)))) *)
(* Goal: is_true (@submx m n n (C j) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (B j)))) *)
by rewrite (sumsmx_sup j) ?sCB //; case/andP: Pi'j.
(* Goal: is_true (@submx m n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) A (@GRing.opp (matrix_zmodType (GRing.Field.zmodType F) m n) (A_ i))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (B j)))) *)
rewrite addrC defA (bigD1 i) // addKr /= summx_sub // => j Pi'j.
(* Goal: is_true (@submx m n n (@mulmx (GRing.Field.ringType F) m n n (u j) (B j)) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun j : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) j (@addsmx n n n) (andb (P j) (negb (@eq_op (Finite.eqType I) j i))) (B j)))) *)
by rewrite (sumsmx_sup j) ?submxMl.
Qed.
End SubDsumsmx.
Section Eigenspace.
Variables (n : nat) (g : 'M_n).
Definition eigenspace a := kermx (g - a%:M).
Definition eigenvalue : pred F := fun a => eigenspace a != 0.
Lemma eigenspaceP a m (W : 'M_(m, n)) :
reflect (W *m g = a *: W) (W <= eigenspace a)%MS.
Proof.
(* Goal: Bool.reflect (@eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W g) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) a W)) (@submx m n n W (eigenspace a)) *)
rewrite (sameP (sub_kermxP _ _) eqP).
(* Goal: Bool.reflect (@eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W g) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m n) a W)) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) m n) (@mulmx (GRing.Field.ringType F) m n n W (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) g (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@scalar_mx (GRing.Field.ringType F) n a)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m n))) *)
by rewrite mulmxBr subr_eq0 mul_mx_scalar; apply: eqP.
Qed.
Lemma eigenvalueP a :
reflect (exists2 v : 'rV_n, v *m g = a *: v & v != 0) (eigenvalue a).
Proof.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (fun v : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n) (@mulmx (GRing.Field.ringType F) (S O) n n v g) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n) a v)) (fun v : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) n => is_true (negb (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType F)) (S O) n) v (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n)))))) (eigenvalue a) *)
by apply: (iffP (rowV0Pn _)) => [] [v]; move/eigenspaceP; exists v.
Qed.
Lemma mxdirect_sum_eigenspace (P : pred I) a_ :
{in P &, injective a_} -> mxdirect (\sum_(i | P i) eigenspace (a_ i)).
End Eigenspace.
End RowSpaceTheory.
Hint Resolve submx_refl : core.
Arguments submxP {F m1 m2 n A B}.
Arguments eq_row_sub [F m n v A].
Arguments row_subP {F m1 m2 n A B}.
Arguments rV_subP {F m1 m2 n A B}.
Arguments row_subPn {F m1 m2 n A B}.
Arguments sub_rVP {F n u v}.
Arguments rV_eqP {F m1 m2 n A B}.
Arguments rowV0Pn {F m n A}.
Arguments rowV0P {F m n A}.
Arguments eqmx0P {F m n A}.
Arguments row_fullP {F m n A}.
Arguments row_freeP {F m n A}.
Arguments eqmxP {F m1 m2 n A B}.
Arguments genmxP {F m1 m2 n A B}.
Arguments addsmx_idPr {F m1 m2 n A B}.
Arguments addsmx_idPl {F m1 m2 n A B}.
Arguments sub_addsmxP {F m1 m2 m3 n A B C}.
Arguments sumsmx_sup [F I] i0 [P m n A B_].
Arguments sumsmx_subP {F I P m n A_ B}.
Arguments sub_sumsmxP {F I P m n A B_}.
Arguments sub_kermxP {F p m n A B}.
Arguments capmx_idPr {F n m1 m2 A B}.
Arguments capmx_idPl {F n m1 m2 A B}.
Arguments bigcapmx_inf [F I] i0 [P m n A_ B].
Arguments sub_bigcapmxP {F I P m n A B_}.
Arguments mxrank_injP {F m n} p [A f].
Arguments mxdirectP {F n S}.
Arguments mxdirect_addsP {F m1 m2 n A B}.
Arguments mxdirect_sumsP {F I P n A_}.
Arguments mxdirect_sumsE {F I P n S_}.
Arguments eigenspaceP {F n g a m W}.
Arguments eigenvalueP {F n g a}.
Arguments mxrank {F m%N n%N} A%MS.
Arguments complmx {F m%N n%N} A%MS.
Arguments row_full {F m%N n%N} A%MS.
Arguments submx {F m1%N m2%N n%N} A%MS B%MS : rename.
Arguments ltmx {F m1%N m2%N n%N} A%MS B%MS.
Arguments eqmx {F m1%N m2%N n%N} A%MS B%MS.
Arguments addsmx {F m1%N m2%N n%N} A%MS B%MS : rename.
Arguments capmx {F m1%N m2%N n%N} A%MS B%MS : rename.
Arguments diffmx {F m1%N m2%N n%N} A%MS B%MS : rename.
Arguments genmx {F m%N n%N} A%R : rename.
Notation "\rank A" := (mxrank A) : nat_scope.
Notation "<< A >>" := (genmx A) : matrix_set_scope.
Notation "A ^C" := (complmx A) : matrix_set_scope.
Notation "A <= B" := (submx A B) : matrix_set_scope.
Notation "A < B" := (ltmx A B) : matrix_set_scope.
Notation "A <= B <= C" := ((submx A B) && (submx B C)) : matrix_set_scope.
Notation "A < B <= C" := (ltmx A B && submx B C) : matrix_set_scope.
Notation "A <= B < C" := (submx A B && ltmx B C) : matrix_set_scope.
Notation "A < B < C" := (ltmx A B && ltmx B C) : matrix_set_scope.
Notation "A == B" := ((submx A B) && (submx B A)) : matrix_set_scope.
Notation "A :=: B" := (eqmx A B) : matrix_set_scope.
Notation "A + B" := (addsmx A B) : matrix_set_scope.
Notation "A :&: B" := (capmx A B) : matrix_set_scope.
Notation "A :\: B" := (diffmx A B) : matrix_set_scope.
Notation mxdirect S := (mxdirect_def (Phantom 'M_(_,_) S%MS)).
Notation "\sum_ ( i <- r | P ) B" :=
(\big[addsmx/0%R]_(i <- r | P%B) B%MS) : matrix_set_scope.
Notation "\sum_ ( i <- r ) B" :=
(\big[addsmx/0%R]_(i <- r) B%MS) : matrix_set_scope.
Notation "\sum_ ( m <= i < n | P ) B" :=
(\big[addsmx/0%R]_(m <= i < n | P%B) B%MS) : matrix_set_scope.
Notation "\sum_ ( m <= i < n ) B" :=
(\big[addsmx/0%R]_(m <= i < n) B%MS) : matrix_set_scope.
Notation "\sum_ ( i | P ) B" :=
(\big[addsmx/0%R]_(i | P%B) B%MS) : matrix_set_scope.
Notation "\sum_ i B" :=
(\big[addsmx/0%R]_i B%MS) : matrix_set_scope.
Notation "\sum_ ( i : t | P ) B" :=
(\big[addsmx/0%R]_(i : t | P%B) B%MS) (only parsing) : matrix_set_scope.
Notation "\sum_ ( i : t ) B" :=
(\big[addsmx/0%R]_(i : t) B%MS) (only parsing) : matrix_set_scope.
Notation "\sum_ ( i < n | P ) B" :=
(\big[addsmx/0%R]_(i < n | P%B) B%MS) : matrix_set_scope.
Notation "\sum_ ( i < n ) B" :=
(\big[addsmx/0%R]_(i < n) B%MS) : matrix_set_scope.
Notation "\sum_ ( i 'in' A | P ) B" :=
(\big[addsmx/0%R]_(i in A | P%B) B%MS) : matrix_set_scope.
Notation "\sum_ ( i 'in' A ) B" :=
(\big[addsmx/0%R]_(i in A) B%MS) : matrix_set_scope.
Notation "\bigcap_ ( i <- r | P ) B" :=
(\big[capmx/1%:M]_(i <- r | P%B) B%MS) : matrix_set_scope.
Notation "\bigcap_ ( i <- r ) B" :=
(\big[capmx/1%:M]_(i <- r) B%MS) : matrix_set_scope.
Notation "\bigcap_ ( m <= i < n | P ) B" :=
(\big[capmx/1%:M]_(m <= i < n | P%B) B%MS) : matrix_set_scope.
Notation "\bigcap_ ( m <= i < n ) B" :=
(\big[capmx/1%:M]_(m <= i < n) B%MS) : matrix_set_scope.
Notation "\bigcap_ ( i | P ) B" :=
(\big[capmx/1%:M]_(i | P%B) B%MS) : matrix_set_scope.
Notation "\bigcap_ i B" :=
(\big[capmx/1%:M]_i B%MS) : matrix_set_scope.
Notation "\bigcap_ ( i : t | P ) B" :=
(\big[capmx/1%:M]_(i : t | P%B) B%MS) (only parsing) : matrix_set_scope.
Notation "\bigcap_ ( i : t ) B" :=
(\big[capmx/1%:M]_(i : t) B%MS) (only parsing) : matrix_set_scope.
Notation "\bigcap_ ( i < n | P ) B" :=
(\big[capmx/1%:M]_(i < n | P%B) B%MS) : matrix_set_scope.
Notation "\bigcap_ ( i < n ) B" :=
(\big[capmx/1%:M]_(i < n) B%MS) : matrix_set_scope.
Notation "\bigcap_ ( i 'in' A | P ) B" :=
(\big[capmx/1%:M]_(i in A | P%B) B%MS) : matrix_set_scope.
Notation "\bigcap_ ( i 'in' A ) B" :=
(\big[capmx/1%:M]_(i in A) B%MS) : matrix_set_scope.
Section DirectSums.
Variables (F : fieldType) (I : finType) (P : pred I).
Lemma mxdirect_delta n f : {in P &, injective f} ->
mxdirect (\sum_(i | P i) <<delta_mx 0 (f i) : 'rV[F]_n>>).
Proof.
(* Goal: forall _ : @prop_in2 (Finite.sort I) (@mem (Finite.sort I) (predPredType (Finite.sort I)) P) (fun x1 x2 : Finite.sort I => forall _ : @eq (Equality.sort (Finite.eqType (ordinal_finType n))) (f x1) (f x2), @eq (Finite.sort I) x1 x2) (inPhantom (@injective (Equality.sort (Finite.eqType (ordinal_finType n))) (Finite.sort I) f)), is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i) : matrix (GRing.Field.sort F) (S O) n))))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (P i) (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i) : matrix (GRing.Field.sort F) (S O) n)))))) *)
pose fP := image f P => Uf; have UfP: uniq fP by apply/dinjectiveP.
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i)))))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (P i) (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i))))))) *)
suffices /mxdirectP : mxdirect (\sum_i <<delta_mx 0 i : 'rV[F]_n>>).
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort (ordinal_finType n)) (index_enum (ordinal_finType n)) (fun _ : Finite.sort (ordinal_finType n) => true) n (fun i : Finite.sort (ordinal_finType n) => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i))))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (ordinal_finType n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort (ordinal_finType n)) i (@addsmx F n n n) true (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))))) *)
(* Goal: forall _ : @eq nat (@mxrank F n n (@proper_mxsum_val F n (@nary_mxsum_expr F (Finite.sort (ordinal_finType n)) (index_enum (ordinal_finType n)) (fun _ : Finite.sort (ordinal_finType n) => true) n (fun i : Finite.sort (ordinal_finType n) => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))))) (@proper_mxsum_rank F n (@nary_mxsum_expr F (Finite.sort (ordinal_finType n)) (index_enum (ordinal_finType n)) (fun _ : Finite.sort (ordinal_finType n) => true) n (fun i : Finite.sort (ordinal_finType n) => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i))))), is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i)))))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (P i) (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i))))))) *)
rewrite /= !(bigID [mem fP] predT) -!big_uniq //= !big_map !big_filter.
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort (ordinal_finType n)) (index_enum (ordinal_finType n)) (fun _ : Finite.sort (ordinal_finType n) => true) n (fun i : Finite.sort (ordinal_finType n) => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i))))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (ordinal_finType n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort (ordinal_finType n)) i (@addsmx F n n n) true (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))))) *)
(* Goal: forall _ : @eq nat (@mxrank F n n (@addsmx F n n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.EnumDef.enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (@pred_of_simpl (Finite.sort I) (@pred_of_mem_pred (Finite.sort I) (@mem (Finite.sort I) (predPredType (Finite.sort I)) P)) i) (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i))))) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (ordinal n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (matrix (GRing.Field.sort F) n n) (ordinal n) i (@addsmx F n n n) (negb (@in_mem (ordinal n) i (@mem (ordinal n) (seq_predType (Finite.eqType (ordinal_finType n))) fP))) (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))))) (addn (@BigOp.bigop nat (Finite.sort I) O (Finite.EnumDef.enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (@pred_of_simpl (Finite.sort I) (@pred_of_mem_pred (Finite.sort I) (@mem (Finite.sort I) (predPredType (Finite.sort I)) P)) i) (@mxrank F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i)))))) (@BigOp.bigop nat (ordinal n) O (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody nat (ordinal n) i addn (negb (@in_mem (ordinal n) i (@mem (ordinal n) (seq_predType (Finite.eqType (ordinal_finType n))) fP))) (@mxrank F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))))), is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i)))))) (Phantom (matrix (GRing.Field.sort F) n n) (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort I) i (@addsmx F n n n) (P i) (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (f i))))))) *)
by move/mxdirectP; rewrite mxdirect_addsE => /andP[].
(* Goal: is_true (@mxdirect_def F n n (@sum_mxsum F n (@nary_mxsum_expr F (Finite.sort (ordinal_finType n)) (index_enum (ordinal_finType n)) (fun _ : Finite.sort (ordinal_finType n) => true) n (fun i : Finite.sort (ordinal_finType n) => @trivial_mxsum F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i))))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort (ordinal_finType n)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (matrix (GRing.Field.sort F) n n) (Finite.sort (ordinal_finType n)) i (@addsmx F n n n) true (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))))) *)
apply/mxdirectP=> /=; transitivity (mxrank (1%:M : 'M[F]_n)).
(* Goal: @eq nat (@mxrank F n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@BigOp.bigop nat (ordinal n) O (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody nat (ordinal n) j addn true (@mxrank F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) j))))) *)
(* Goal: @eq nat (@mxrank F n n (@BigOp.bigop (matrix (GRing.Field.sort F) n n) (ordinal n) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (matrix (GRing.Field.sort F) n n) (ordinal n) j (@addsmx F n n n) true (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) j))))) (@mxrank F n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) *)
apply/eqmx_rank; rewrite submx1 mx1_sum_delta summx_sub_sums // => i _.
(* Goal: @eq nat (@mxrank F n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@BigOp.bigop nat (ordinal n) O (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody nat (ordinal n) j addn true (@mxrank F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) j))))) *)
(* Goal: is_true (@submx F n n n (@delta_mx (GRing.Field.ringType F) n n i i) (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i))) *)
by rewrite -(mul_delta_mx (0 : 'I_1)) genmxE submxMl.
(* Goal: @eq nat (@mxrank F n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@BigOp.bigop nat (ordinal n) O (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody nat (ordinal n) j addn true (@mxrank F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) j))))) *)
rewrite mxrank1 -[LHS]card_ord -sum1_card.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (ordinal_finType n)) O (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody nat (Finite.sort (ordinal_finType n)) i addn (@in_mem (Finite.sort (ordinal_finType n)) i (@mem (Finite.sort (ordinal_finType n)) (predPredType (Finite.sort (ordinal_finType n))) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n))))) (S O))) (@BigOp.bigop nat (ordinal n) O (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody nat (ordinal n) j addn true (@mxrank F n n (@genmx F (S O) n (@delta_mx (GRing.Field.ringType F) (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) j))))) *)
by apply/eq_bigr=> i _; rewrite /= mxrank_gen mxrank_delta.
Qed.
End DirectSums.
Section CardGL.
Variable F : finFieldType.
Lemma card_GL n : n > 0 ->
#|'GL_n[F]| = (#|F| ^ 'C(n, 2) * \prod_(1 <= i < n.+1) (#|F| ^ i - 1))%N.
Proof.
(* Goal: forall _ : is_true (leq (S O) n), @eq nat (@card (GL_finType n (FinRing.Field.finComUnitRingType F)) (@mem (Finite.sort (GL_finType n (FinRing.Field.finComUnitRingType F))) (predPredType (Finite.sort (GL_finType n (FinRing.Field.finComUnitRingType F)))) (@SetDef.pred_of_set (GL_finType n (FinRing.Field.finComUnitRingType F)) (@GLgroup n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (muln (expn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (binomial n (S (S O)))) (@BigOp.bigop nat nat (S O) (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i muln true (subn (expn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) i) (S O))))) *)
case: n => // n' _; set n := n'.+1; set p := #|F|.
(* Goal: @eq nat (@card (GL_finType n (FinRing.Field.finComUnitRingType F)) (@mem (Finite.sort (GL_finType n (FinRing.Field.finComUnitRingType F))) (predPredType (Finite.sort (GL_finType n (FinRing.Field.finComUnitRingType F)))) (@SetDef.pred_of_set (GL_finType n (FinRing.Field.finComUnitRingType F)) (@GLgroup n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (muln (expn p (binomial n (S (S O)))) (@BigOp.bigop nat nat (S O) (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i muln true (subn (expn p i) (S O))))) *)
rewrite big_nat_rev big_add1 -triangular_sum expn_sum -big_split /=.
(* Goal: @eq nat (@card (GL_finType n (FinRing.Field.finComUnitRingType F)) (@mem (@GLtype n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F))) (predPredType (@GLtype n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))) (@SetDef.pred_of_set (GL_finType n (FinRing.Field.finComUnitRingType F)) (@GLgroup n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (@BigOp.bigop nat nat (S O) (index_iota O n) (fun i : nat => @BigBody nat nat i muln true (muln (expn p i) (subn (expn p (subn (addn (S O) (S n)) (S (S i)))) (S O))))) *)
pose fr m := [pred A : 'M[F]_(m, n) | \rank A == m].
(* Goal: @eq nat (@card (GL_finType n (FinRing.Field.finComUnitRingType F)) (@mem (@GLtype n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F))) (predPredType (@GLtype n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))) (@SetDef.pred_of_set (GL_finType n (FinRing.Field.finComUnitRingType F)) (@GLgroup n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (@BigOp.bigop nat nat (S O) (index_iota O n) (fun i : nat => @BigBody nat nat i muln true (muln (expn p i) (subn (expn p (subn (addn (S O) (S n)) (S (S i)))) (S O))))) *)
set m := {-7}n; transitivity #|fr m|.
(* Goal: @eq nat (@card (matrix_finType (FinRing.Field.finType F) m n) (@mem (matrix (FinRing.Field.sort F) m n) (simplPredType (matrix (FinRing.Field.sort F) m n)) (fr m))) (@BigOp.bigop nat nat (S O) (index_iota O m) (fun i : nat => @BigBody nat nat i muln true (muln (expn p i) (subn (expn p (subn (addn (S O) (S n)) (S (S i)))) (S O))))) *)
(* Goal: @eq nat (@card (GL_finType m (FinRing.Field.finComUnitRingType F)) (@mem (@GLtype m (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F))) (predPredType (@GLtype m (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))) (@SetDef.pred_of_set (GL_finType m (FinRing.Field.finComUnitRingType F)) (@GLgroup m (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (@card (matrix_finType (FinRing.Field.finType F) m n) (@mem (matrix (FinRing.Field.sort F) m n) (simplPredType (matrix (FinRing.Field.sort F) m n)) (fr m))) *)
by rewrite cardsT /= card_sub; apply: eq_card => A; rewrite -row_free_unit.
(* Goal: @eq nat (@card (matrix_finType (FinRing.Field.finType F) m n) (@mem (matrix (FinRing.Field.sort F) m n) (simplPredType (matrix (FinRing.Field.sort F) m n)) (fr m))) (@BigOp.bigop nat nat (S O) (index_iota O m) (fun i : nat => @BigBody nat nat i muln true (muln (expn p i) (subn (expn p (subn (addn (S O) (S n)) (S (S i)))) (S O))))) *)
elim: m (leqnn m : m <= n) => [_|m IHm]; last move/ltnW=> le_mn.
(* Goal: @eq nat (@card (matrix_finType (FinRing.Field.finType F) (S m) n) (@mem (matrix (FinRing.Field.sort F) (S m) n) (simplPredType (matrix (FinRing.Field.sort F) (S m) n)) (fr (S m)))) (@BigOp.bigop nat nat (S O) (index_iota O (S m)) (fun i : nat => @BigBody nat nat i muln true (muln (expn p i) (subn (expn p (subn (addn (S O) (S n)) (S (S i)))) (S O))))) *)
(* Goal: @eq nat (@card (matrix_finType (FinRing.Field.finType F) O n) (@mem (matrix (FinRing.Field.sort F) O n) (simplPredType (matrix (FinRing.Field.sort F) O n)) (fr O))) (@BigOp.bigop nat nat (S O) (index_iota O O) (fun i : nat => @BigBody nat nat i muln true (muln (expn p i) (subn (expn p (subn (addn (S O) (S n)) (S (S i)))) (S O))))) *)
rewrite (@eq_card1 _ (0 : 'M_(0, n))) ?big_geq //= => A.
(* Goal: @eq nat (@card (matrix_finType (FinRing.Field.finType F) (S m) n) (@mem (matrix (FinRing.Field.sort F) (S m) n) (simplPredType (matrix (FinRing.Field.sort F) (S m) n)) (fr (S m)))) (@BigOp.bigop nat nat (S O) (index_iota O (S m)) (fun i : nat => @BigBody nat nat i muln true (muln (expn p i) (subn (expn p (subn (addn (S O) (S n)) (S (S i)))) (S O))))) *)
(* Goal: @eq bool (@in_mem (matrix (FinRing.Field.sort F) O n) A (@mem (matrix (FinRing.Field.sort F) O n) (predPredType (matrix (FinRing.Field.sort F) O n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) O n) (fr O)))) (@in_mem (matrix (FinRing.Field.sort F) O n) A (@mem (matrix (FinRing.Field.sort F) O n) (simplPredType (matrix (FinRing.Field.sort F) O n)) (@pred1 (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) O n)) (GRing.zero (matrix_zmodType (FinRing.Zmodule.zmodType (FinRing.Field.finZmodType F)) O n))))) *)
by rewrite flatmx0 !inE !eqxx.
(* Goal: @eq nat (@card (matrix_finType (FinRing.Field.finType F) (S m) n) (@mem (matrix (FinRing.Field.sort F) (S m) n) (simplPredType (matrix (FinRing.Field.sort F) (S m) n)) (fr (S m)))) (@BigOp.bigop nat nat (S O) (index_iota O (S m)) (fun i : nat => @BigBody nat nat i muln true (muln (expn p i) (subn (expn p (subn (addn (S O) (S n)) (S (S i)))) (S O))))) *)
rewrite big_nat_recr // -{}IHm //= !subSS mulnBr muln1 -expnD subnKC //.
(* Goal: @eq nat (@card (matrix_finType (FinRing.Field.finType F) (S m) n) (@mem (matrix (FinRing.Field.sort F) (S m) n) (simplPredType (matrix (FinRing.Field.sort F) (S m) n)) (fr (S m)))) (muln (@card (matrix_finType (FinRing.Field.finType F) m n) (@mem (matrix (FinRing.Field.sort F) m n) (simplPredType (matrix (FinRing.Field.sort F) m n)) (fr m))) (subn (expn p n) (expn p m))) *)
rewrite -sum_nat_const /= -sum1_card -add1n.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) (fun i : Finite.sort (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) i addn (@in_mem (Finite.sort (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) i (@mem (Finite.sort (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) (predPredType (Finite.sort (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (S O))) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun i : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) i addn (@in_mem (matrix (FinRing.Field.sort F) m n) i (@mem (matrix (FinRing.Field.sort F) m n) (predPredType (matrix (FinRing.Field.sort F) m n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) m n) (fr m)))) (subn (expn p n) (expn p m)))) *)
rewrite (partition_big dsubmx (fr m)) /= => [|A]; last first.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun j : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) j addn (@eq_op nat_eqType (@mxrank (FinRing.Field.fieldType F) m n j) m) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) (fun i : matrix (FinRing.Field.sort F) (addn (S O) m) n => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n i) j)) (S O))))) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun i : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) i addn (@in_mem (matrix (FinRing.Field.sort F) m n) i (@mem (matrix (FinRing.Field.sort F) m n) (predPredType (matrix (FinRing.Field.sort F) m n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) m n) (fr m)))) (subn (expn p n) (expn p m)))) *)
(* Goal: forall _ : is_true (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) A (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))), is_true (@eq_op nat_eqType (@mxrank (FinRing.Field.fieldType F) m n (@dsubmx (FinRing.Field.sort F) (S O) m n A)) m) *)
rewrite !inE -{1}(vsubmxK A); move: {A}(_ A) (_ A) => Ad Au Afull.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun j : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) j addn (@eq_op nat_eqType (@mxrank (FinRing.Field.fieldType F) m n j) m) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) (fun i : matrix (FinRing.Field.sort F) (addn (S O) m) n => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n i) j)) (S O))))) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun i : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) i addn (@in_mem (matrix (FinRing.Field.sort F) m n) i (@mem (matrix (FinRing.Field.sort F) m n) (predPredType (matrix (FinRing.Field.sort F) m n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) m n) (fr m)))) (subn (expn p n) (expn p m)))) *)
(* Goal: is_true (@eq_op nat_eqType (@mxrank (FinRing.Field.fieldType F) m n Ad) m) *)
rewrite eqn_leq rank_leq_row -(leq_add2l (\rank Au)) -mxrank_sum_cap.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun j : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) j addn (@eq_op nat_eqType (@mxrank (FinRing.Field.fieldType F) m n j) m) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) (fun i : matrix (FinRing.Field.sort F) (addn (S O) m) n => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n i) j)) (S O))))) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun i : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) i addn (@in_mem (matrix (FinRing.Field.sort F) m n) i (@mem (matrix (FinRing.Field.sort F) m n) (predPredType (matrix (FinRing.Field.sort F) m n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) m n) (fr m)))) (subn (expn p n) (expn p m)))) *)
(* Goal: is_true (andb true (leq (addn (@mxrank (FinRing.Field.fieldType F) (S O) n Au) m) (addn (@mxrank (FinRing.Field.fieldType F) n n (@addsmx (FinRing.Field.fieldType F) (S O) m n Au Ad)) (@mxrank (FinRing.Field.fieldType F) n n (@capmx (FinRing.Field.fieldType F) (S O) m n Au Ad))))) *)
rewrite {1 3}[@mxrank]lock addsmxE (eqnP Afull) -lock -addnA.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun j : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) j addn (@eq_op nat_eqType (@mxrank (FinRing.Field.fieldType F) m n j) m) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) (fun i : matrix (FinRing.Field.sort F) (addn (S O) m) n => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n i) j)) (S O))))) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun i : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) i addn (@in_mem (matrix (FinRing.Field.sort F) m n) i (@mem (matrix (FinRing.Field.sort F) m n) (predPredType (matrix (FinRing.Field.sort F) m n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) m n) (fr m)))) (subn (expn p n) (expn p m)))) *)
(* Goal: is_true (andb true (leq (addn (@mxrank (FinRing.Field.fieldType F) (S O) n Au) m) (addn (S O) (addn m (@mxrank (FinRing.Field.fieldType F) n n (@capmx (FinRing.Field.fieldType F) (S O) m n Au Ad)))))) *)
by rewrite leq_add ?rank_leq_row ?leq_addr.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun j : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) j addn (@eq_op nat_eqType (@mxrank (FinRing.Field.fieldType F) m n j) m) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) m) n)) (fun i : matrix (FinRing.Field.sort F) (addn (S O) m) n => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) m) n) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n i) j)) (S O))))) (@BigOp.bigop nat (matrix (FinRing.Field.sort F) m n) O (index_enum (matrix_finType (FinRing.Field.finType F) m n)) (fun i : matrix (FinRing.Field.sort F) m n => @BigBody nat (matrix (FinRing.Field.sort F) m n) i addn (@in_mem (matrix (FinRing.Field.sort F) m n) i (@mem (matrix (FinRing.Field.sort F) m n) (predPredType (matrix (FinRing.Field.sort F) m n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) m n) (fr m)))) (subn (expn p n) (expn p m)))) *)
apply: eq_bigr => A rAm; rewrite (reindex (col_mx^~ A)) /=; last first.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (S O) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun j : matrix (FinRing.Field.sort F) (S O) n => @BigBody nat (matrix (FinRing.Field.sort F) (S O) n) j addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@col_mx (FinRing.Field.sort F) (S O) m n j A) (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n (@col_mx (FinRing.Field.sort F) (S O) m n j A)) A)) (S O))) (subn (expn p n) (expn p m)) *)
(* Goal: @bijective_on (matrix (FinRing.Field.sort F) (S O) n) (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (simplPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fun i : matrix (FinRing.Field.sort F) (addn (S O) m) n => andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n i) A)))) (fun x : matrix (FinRing.Field.sort F) (S O) n => @col_mx (FinRing.Field.sort F) (S O) m n x A) *)
exists usubmx => [v _ | vA]; first by rewrite col_mxKu.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (S O) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun j : matrix (FinRing.Field.sort F) (S O) n => @BigBody nat (matrix (FinRing.Field.sort F) (S O) n) j addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@col_mx (FinRing.Field.sort F) (S O) m n j A) (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n (@col_mx (FinRing.Field.sort F) (S O) m n j A)) A)) (S O))) (subn (expn p n) (expn p m)) *)
(* Goal: forall _ : is_true (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) vA (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (simplPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fun i : matrix (FinRing.Field.sort F) (addn (S O) m) n => andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n i) A))))), @eq (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@col_mx (FinRing.Field.sort F) (S O) m n (@usubmx (FinRing.Field.sort F) (S O) m n vA) A) vA *)
by case/andP=> _ /eqP <-; rewrite vsubmxK.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (S O) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun j : matrix (FinRing.Field.sort F) (S O) n => @BigBody nat (matrix (FinRing.Field.sort F) (S O) n) j addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@col_mx (FinRing.Field.sort F) (S O) m n j A) (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n (@col_mx (FinRing.Field.sort F) (S O) m n j A)) A)) (S O))) (subn (expn p n) (expn p m)) *)
transitivity #|~: [set v *m A | v in 'rV_m]|; last first.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (S O) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun j : matrix (FinRing.Field.sort F) (S O) n => @BigBody nat (matrix (FinRing.Field.sort F) (S O) n) j addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@col_mx (FinRing.Field.sort F) (S O) m n j A) (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n (@col_mx (FinRing.Field.sort F) (S O) m n j A)) A)) (S O))) (@card (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n)) (predPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n))) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@setC (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (predPredType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (pred_of_argType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m))))))))) *)
(* Goal: @eq nat (@card (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n)) (predPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n))) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@setC (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (predPredType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (pred_of_argType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m))))))))) (subn (expn p n) (expn p m)) *)
rewrite cardsCs setCK card_imset ?card_matrix ?card_ord ?mul1n //.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (S O) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun j : matrix (FinRing.Field.sort F) (S O) n => @BigBody nat (matrix (FinRing.Field.sort F) (S O) n) j addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@col_mx (FinRing.Field.sort F) (S O) m n j A) (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n (@col_mx (FinRing.Field.sort F) (S O) m n j A)) A)) (S O))) (@card (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n)) (predPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n))) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@setC (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (predPredType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (pred_of_argType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m))))))))) *)
(* Goal: @injective (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n)) (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m)) (fun v : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) *)
have [B AB1] := row_freeP rAm; apply: can_inj (mulmx^~ B) _ => v.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (S O) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun j : matrix (FinRing.Field.sort F) (S O) n => @BigBody nat (matrix (FinRing.Field.sort F) (S O) n) j addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@col_mx (FinRing.Field.sort F) (S O) m n j A) (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n (@col_mx (FinRing.Field.sort F) (S O) m n j A)) A)) (S O))) (@card (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n)) (predPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n))) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@setC (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (predPredType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (pred_of_argType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m))))))))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType (FinRing.Field.fieldType F))) (S O) m) (@mulmx (GRing.Field.ringType (FinRing.Field.fieldType F)) (S O) n m (@mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) B) v *)
by rewrite -mulmxA AB1 mulmx1.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (S O) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun j : matrix (FinRing.Field.sort F) (S O) n => @BigBody nat (matrix (FinRing.Field.sort F) (S O) n) j addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (@col_mx (FinRing.Field.sort F) (S O) m n j A) (@mem (matrix (FinRing.Field.sort F) (addn (S O) m) n) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) m) n)) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) m) n) (fr (addn (S O) m))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) m n)) (@dsubmx (FinRing.Field.sort F) (S O) m n (@col_mx (FinRing.Field.sort F) (S O) m n j A)) A)) (S O))) (@card (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n)) (predPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n))) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@setC (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (predPredType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (pred_of_argType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m))))))))) *)
rewrite -sum1_card; apply: eq_bigl => v; rewrite !inE col_mxKd eqxx.
(* Goal: @eq bool (andb (@eq_op nat_eqType (@mxrank (FinRing.Field.fieldType F) (addn (S O) m) n (@col_mx (FinRing.Field.sort F) (S O) m n v A)) (addn (S O) m)) true) (negb (@in_mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n)) v (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n)) (predPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n))) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (predPredType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m) (pred_of_argType (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) m))))))))) *)
rewrite andbT eqn_leq rank_leq_row /= -(leq_add2r (\rank (v :&: A)%MS)).
(* Goal: @eq bool (leq (addn (addn (S O) m) (@mxrank (FinRing.Field.fieldType F) n n (@capmx (FinRing.Field.fieldType F) (S O) m n v A))) (addn (@mxrank (FinRing.Field.fieldType F) (addn (S O) m) n (@col_mx (FinRing.Field.sort F) (S O) m n v A)) (@mxrank (FinRing.Field.fieldType F) n n (@capmx (FinRing.Field.fieldType F) (S O) m n v A)))) (negb (@in_mem (matrix (FinRing.Field.sort F) (S O) n) v (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : matrix (FinRing.Field.sort F) (S O) m => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (FinRing.Field.sort F) (S O) m) (predPredType (matrix (FinRing.Field.sort F) (S O) m)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) m) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) m))))))))) *)
rewrite -addsmxE mxrank_sum_cap (eqnP rAm) addnAC leq_add2r.
(* Goal: @eq bool (leq (addn (S O) (@mxrank (FinRing.Field.fieldType F) n n (@capmx (FinRing.Field.fieldType F) (S O) m n v A))) (@mxrank (FinRing.Field.fieldType F) (S O) n v)) (negb (@in_mem (matrix (FinRing.Field.sort F) (S O) n) v (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : matrix (FinRing.Field.sort F) (S O) m => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (FinRing.Field.sort F) (S O) m) (predPredType (matrix (FinRing.Field.sort F) (S O) m)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) m) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) m))))))))) *)
rewrite (ltn_leqif (mxrank_leqif_sup _)) ?capmxSl // sub_capmx submx_refl.
(* Goal: @eq bool (negb (andb true (@submx (FinRing.Field.fieldType F) (S O) m n v A))) (negb (@in_mem (matrix (FinRing.Field.sort F) (S O) n) v (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@SetDef.pred_of_set (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (@Imset.imset (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) m) (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (S O) n) (fun v : matrix (FinRing.Field.sort F) (S O) m => @mulmx (FinRing.Ring.ringType (FinRing.Field.finRingType F)) (S O) m n v A) (@mem (matrix (FinRing.Field.sort F) (S O) m) (predPredType (matrix (FinRing.Field.sort F) (S O) m)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) m) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) m))))))))) *)
by congr (~~ _); apply/submxP/imsetP=> [] [u]; exists u.
Qed.
Lemma LUP_card_GL n : n > 0 ->
#|'GL_n[F]| = (#|F| ^ 'C(n, 2) * \prod_(1 <= i < n.+1) (#|F| ^ i - 1))%N.
Proof.
(* Goal: forall _ : is_true (leq (S O) n), @eq nat (@card (GL_finType n (FinRing.Field.finComUnitRingType F)) (@mem (Finite.sort (GL_finType n (FinRing.Field.finComUnitRingType F))) (predPredType (Finite.sort (GL_finType n (FinRing.Field.finComUnitRingType F)))) (@SetDef.pred_of_set (GL_finType n (FinRing.Field.finComUnitRingType F)) (@GLgroup n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (muln (expn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (binomial n (S (S O)))) (@BigOp.bigop nat nat (S O) (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i muln true (subn (expn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) i) (S O))))) *)
case: n => // n' _; set n := n'.+1; set p := #|F|.
(* Goal: @eq nat (@card (GL_finType n (FinRing.Field.finComUnitRingType F)) (@mem (Finite.sort (GL_finType n (FinRing.Field.finComUnitRingType F))) (predPredType (Finite.sort (GL_finType n (FinRing.Field.finComUnitRingType F)))) (@SetDef.pred_of_set (GL_finType n (FinRing.Field.finComUnitRingType F)) (@GLgroup n (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (muln (expn p (binomial n (S (S O)))) (@BigOp.bigop nat nat (S O) (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i muln true (subn (expn p i) (S O))))) *)
rewrite cardsT /= card_sub /GRing.unit /= big_add1 /= -triangular_sum -/n.
(* Goal: @eq nat (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) (muln (expn p (@BigOp.bigop nat nat O (index_iota O n) (fun i : nat => @BigBody nat nat i addn true i))) (@BigOp.bigop nat nat (S O) (index_iota O n) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O))))) *)
elim: {n'}n => [|n IHn].
(* Goal: @eq nat (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)) (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (simplPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u)))))))) (muln (expn p (@BigOp.bigop nat nat O (index_iota O (S n)) (fun i : nat => @BigBody nat nat i addn true i))) (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O))))) *)
(* Goal: @eq nat (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) O O) (@mem (matrix (FinRing.Field.sort F) O O) (simplPredType (matrix (FinRing.Field.sort F) O O)) (@SimplPred (matrix (FinRing.Field.sort F) O O) (fun x : matrix (FinRing.Field.sort F) O O => @in_mem (matrix (FinRing.Field.sort F) O O) x (@mem (matrix (FinRing.Field.sort F) O O) (predPredType (matrix (FinRing.Field.sort F) O O)) (@has_quality (S O) (matrix (FinRing.Field.sort F) O O) (@Qualifier (S O) (matrix (FinRing.Field.sort F) O O) (fun u : matrix (FinRing.Field.sort F) O O => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) O u)))))))) (muln (expn p (@BigOp.bigop nat nat O (index_iota O O) (fun i : nat => @BigBody nat nat i addn true i))) (@BigOp.bigop nat nat (S O) (index_iota O O) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O))))) *)
rewrite !big_geq // mul1n (@eq_card _ _ predT) ?card_matrix //= => M.
(* Goal: @eq nat (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)) (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (simplPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u)))))))) (muln (expn p (@BigOp.bigop nat nat O (index_iota O (S n)) (fun i : nat => @BigBody nat nat i addn true i))) (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O))))) *)
(* Goal: @eq bool (@in_mem (matrix (FinRing.Field.sort F) O O) M (@mem (matrix (FinRing.Field.sort F) O O) (predPredType (matrix (FinRing.Field.sort F) O O)) (@pred_of_simpl (matrix (FinRing.Field.sort F) O O) (@SimplPred (matrix (FinRing.Field.sort F) O O) (fun x : matrix (FinRing.Field.sort F) O O => @in_mem (matrix (FinRing.Field.sort F) O O) x (@mem (matrix (FinRing.Field.sort F) O O) (predPredType (matrix (FinRing.Field.sort F) O O)) (@has_quality (S O) (matrix (FinRing.Field.sort F) O O) (@Qualifier (S O) (matrix (FinRing.Field.sort F) O O) (fun u : matrix (FinRing.Field.sort F) O O => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) O u))))))))) (@in_mem (matrix (FinRing.Field.sort F) O O) M (@mem (matrix (FinRing.Field.sort F) O O) (predPredType (matrix (FinRing.Field.sort F) O O)) (@pred_of_simpl (matrix (FinRing.Field.sort F) O O) (@predT (matrix (FinRing.Field.sort F) O O))))) *)
by rewrite {1}[M]flatmx0 -(flatmx0 1%:M) unitmx1.
(* Goal: @eq nat (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)) (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (simplPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u)))))))) (muln (expn p (@BigOp.bigop nat nat O (index_iota O (S n)) (fun i : nat => @BigBody nat nat i addn true i))) (@BigOp.bigop nat nat (S O) (index_iota O (S n)) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O))))) *)
rewrite !big_nat_recr //= expnD mulnAC mulnA -{}IHn -mulnA mulnC.
(* Goal: @eq nat (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)) (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (simplPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u)))))))) (muln (muln (subn (expn p (S n)) (S O)) (expn p n)) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
set LHS := #|_|; rewrite -[n.+1]muln1 -{2}[n]mul1n {}/LHS.
(* Goal: @eq nat (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)) (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) (simplPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u)))))))) (muln (muln (subn (expn p (muln (S n) (S O))) (S O)) (expn p (muln (S O) n))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
rewrite -!card_matrix subn1 -(cardC1 0) -mulnA; set nzC := predC1 _.
(* Goal: @eq nat (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)) (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) (simplPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u)))))))) (muln (@card (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))) (@mem (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) (simplPredType (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O)))))) nzC)) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (predPredType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (pred_of_argType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))))) *)
rewrite -sum1_card (partition_big lsubmx nzC) => [|A]; last first.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (fun j : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@pred_of_simpl (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) nzC j) (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) (fun i : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) i (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) i (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (S n) (S n)) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (@lsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (S n) (S O) n i) j)) (S O))))) (muln (@card (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))) (@mem (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) (simplPredType (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O)))))) nzC)) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (predPredType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (pred_of_argType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) A (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (S n) (S n)) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u))))))))), is_true (@pred_of_simpl (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) nzC (@lsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (S n) (S O) n A)) *)
rewrite unitmxE unitfE; apply: contra; move/eqP=> v0.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (fun j : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@pred_of_simpl (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) nzC j) (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) (fun i : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) i (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) i (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (S n) (S n)) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (@lsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (S n) (S O) n i) j)) (S O))))) (muln (@card (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))) (@mem (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) (simplPredType (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O)))))) nzC)) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (predPredType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (pred_of_argType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))))) *)
(* Goal: is_true (@eq_op (GRing.Field.eqType (FinRing.Field.fieldType F)) (@determinant (GRing.ComUnitRing.ringType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F))) (S n) A) (GRing.zero (GRing.Field.zmodType (FinRing.Field.fieldType F)))) *)
rewrite -[A]hsubmxK v0 -[n.+1]/(1 + n)%N -col_mx0.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (fun j : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@pred_of_simpl (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) nzC j) (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) (fun i : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) i (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) i (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (S n) (S n)) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (@lsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (S n) (S O) n i) j)) (S O))))) (muln (@card (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))) (@mem (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) (simplPredType (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O)))))) nzC)) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (predPredType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (pred_of_argType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))))) *)
(* Goal: is_true (@eq_op (GRing.Field.eqType (FinRing.Field.fieldType F)) (@determinant (GRing.ComUnitRing.ringType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F))) (addn (S O) n) (@row_mx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (addn (S O) n) (S O) n (@col_mx (GRing.Zmodule.sort (FinRing.Zmodule.zmodType (FinRing.Field.finZmodType F))) (S O) n (S O) (GRing.zero (matrix_zmodType (FinRing.Zmodule.zmodType (FinRing.Field.finZmodType F)) (S O) (S O))) (GRing.zero (matrix_zmodType (FinRing.Zmodule.zmodType (FinRing.Field.finZmodType F)) n (S O)))) (@rsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (addn (S O) n) (S O) n A))) (GRing.zero (GRing.Field.zmodType (FinRing.Field.fieldType F)))) *)
rewrite -[rsubmx _]vsubmxK -det_tr tr_row_mx !tr_col_mx !trmx0.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (fun j : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@pred_of_simpl (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) nzC j) (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) (fun i : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) i (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) i (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (S n) (S n)) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (@lsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (S n) (S O) n i) j)) (S O))))) (muln (@card (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))) (@mem (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) (simplPredType (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O)))))) nzC)) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (predPredType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (pred_of_argType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))))) *)
(* Goal: is_true (@eq_op (GRing.Field.eqType (FinRing.Field.fieldType F)) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)))) (addn (S O) n) (@col_mx (GRing.ComRing.sort (GRing.ComUnitRing.comRingType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)))) (S O) n (addn (S O) n) (@row_mx (GRing.ComRing.sort (GRing.ComUnitRing.comRingType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)))) (S O) (S O) n (GRing.zero (matrix_zmodType (GRing.ComRing.zmodType (GRing.ComUnitRing.comRingType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)))) (S O) (S O))) (GRing.zero (matrix_zmodType (GRing.ComRing.zmodType (GRing.ComUnitRing.comRingType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)))) (S O) n))) (@row_mx (GRing.ComRing.sort (GRing.ComUnitRing.comRingType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)))) n (S O) n (@trmx (GRing.ComRing.sort (GRing.ComUnitRing.comRingType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)))) (S O) n (@usubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (S O) n n (@rsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (addn (S O) n) (S O) n A))) (@trmx (GRing.ComRing.sort (GRing.ComUnitRing.comRingType (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)))) n n (@dsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (S O) n n (@rsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (addn (S O) n) (S O) n A)))))) (GRing.zero (GRing.Field.zmodType (FinRing.Field.fieldType F)))) *)
by rewrite det_lblock [0]mx11_scalar det_scalar1 mxE mul0r.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (fun j : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@pred_of_simpl (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) nzC j) (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) (fun i : Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n)) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (addn (S O) n))) i (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) i (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n))) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) (S n) (S n)))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (S n) (S n)) (@SimplPred (matrix (FinRing.Field.sort F) (S n) (S n)) (fun x : matrix (FinRing.Field.sort F) (S n) (S n) => @in_mem (matrix (FinRing.Field.sort F) (S n) (S n)) x (@mem (matrix (FinRing.Field.sort F) (S n) (S n)) (predPredType (matrix (FinRing.Field.sort F) (S n) (S n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (S n) (S n)) (fun u : matrix (FinRing.Field.sort F) (S n) (S n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (S n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (S n) (S O))) (@lsubmx (Finite.sort (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F))) (S n) (S O) n i) j)) (S O))))) (muln (@card (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))) (@mem (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O))))) (simplPredType (Equality.sort (Finite.eqType (FinRing.Zmodule.join_finType (matrix_finZmodType (FinRing.Field.finZmodType F) (S n) (S O)))))) nzC)) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (predPredType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n)) (@sort_of_simpl_pred (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n) (pred_of_argType (matrix (Finite.sort (FinRing.Field.finType F)) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))))) *)
rewrite -sum_nat_const; apply: eq_bigr; rewrite /= -[n.+1]/(1 + n)%N => v nzv.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n i) v)) (S O))) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) n) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
case: (pickP (fun i => v i 0 != 0)) => [k nza | v0]; last first.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n i) v)) (S O))) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) n) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n i) v)) (S O))) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) n) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
by case/eqP: nzv; apply/colP=> i; move/eqP: (v0 i); rewrite mxE.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n i) v)) (S O))) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) n) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
have xrkK: involutive (@xrow F _ _ 0 k).
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n i) v)) (S O))) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) n) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
(* Goal: forall n0 : nat, @involutive (matrix (FinRing.Field.sort F) (S n) n0) (@xrow (FinRing.Field.sort F) (S n) n0 (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k) *)
by move=> m A /=; rewrite /xrow -row_permM tperm2 row_perm1.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n i) v)) (S O))) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) n) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
rewrite (reindex_inj (inv_inj (xrkK (1 + n)%N))) /= -[n.+1]/(1 + n)%N.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun j : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) j addn (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k j) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k j)) v)) (S O))) (muln (@card (matrix_finType (FinRing.Field.finType F) (S O) n) (@mem (matrix (FinRing.Field.sort F) (S O) n) (predPredType (matrix (FinRing.Field.sort F) (S O) n)) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) n) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
rewrite (partition_big ursubmx xpredT) //= -sum_nat_const.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (S O) n) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun j : matrix (FinRing.Field.sort F) (S O) n => @BigBody nat (matrix (FinRing.Field.sort F) (S O) n) j addn true (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) j)) (S O))))) (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Field.finType F) (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (S O) n)) (fun i : Finite.sort (matrix_finType (FinRing.Field.finType F) (S O) n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Field.finType F) (S O) n)) i addn (@in_mem (Finite.sort (matrix_finType (FinRing.Field.finType F) (S O) n)) i (@mem (Finite.sort (matrix_finType (FinRing.Field.finType F) (S O) n)) (predPredType (Finite.sort (matrix_finType (FinRing.Field.finType F) (S O) n))) (@sort_of_simpl_pred (matrix (FinRing.Field.sort F) (S O) n) (pred_of_argType (matrix (FinRing.Field.sort F) (S O) n))))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))))) *)
apply: eq_bigr => u _; set a : F := v _ _ in nza.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
set v1 : 'cV_(1 + n) := xrow 0 k v.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
have def_a: usubmx v1 = a%:M.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: @eq (matrix (FinRing.Field.sort F) (S O) (S O)) (@usubmx (FinRing.Field.sort F) (S O) n (S O) v1) (@scalar_mx (FinRing.Field.ringType F) (S O) a) *)
by rewrite [_ v1]mx11_scalar mxE lshift0 mxE tpermL.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
pose Schur := dsubmx v1 *m (a^-1 *: u).
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
pose L : 'M_(1 + n) := block_mx a%:M 0 (dsubmx v1) 1%:M.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
pose U B : 'M_(1 + n) := block_mx 1 (a^-1 *: u) 0 B.
(* Goal: @eq nat (@BigOp.bigop nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) O (index_enum (matrix_finType (FinRing.Field.finType F) (addn (S O) n) (addn (S O) n))) (fun i : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @BigBody nat (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) i addn (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
rewrite (reindex (fun B => L *m U B)); last first.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: @bijective_on (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (simplPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n)))) (@SimplPred (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (fun i : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n)) => andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u)))) (fun B : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B)) *)
exists (fun A1 => drsubmx A1 - Schur) => [B _ | A1].
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) A1 (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (simplPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n)))) (@SimplPred (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (fun i : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n)) => andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u))))), @eq (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (FinRing.Field.ringType F)) n n) (@drsubmx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n A1) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (FinRing.Field.ringType F)) n n) Schur)))) A1 *)
(* Goal: @eq (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (FinRing.Field.ringType F)) n n) (@drsubmx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (FinRing.Field.ringType F)) n n) Schur)) B *)
by rewrite mulmx_block block_mxKdr mul1mx addrC addKr.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) A1 (@mem (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (simplPredType (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n)))) (@SimplPred (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (fun i : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n)) => andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k i)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n i) u))))), @eq (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (FinRing.Field.ringType F)) n n) (@drsubmx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n A1) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (FinRing.Field.ringType F)) n n) Schur)))) A1 *)
rewrite !inE mulmx_block !mulmx0 mul0mx !mulmx1 !addr0 mul1mx addrC subrK.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: forall _ : is_true (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k A1) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k A1)) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n A1) u)), @eq (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n (@scalar_mx (FinRing.Field.ringType F) (S O) a) (@mulmx (FinRing.Field.ringType F) (S O) (S O) n (@scalar_mx (FinRing.Field.ringType F) (S O) a) (@GRing.scale (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (S O) n) (@GRing.inv (FinRing.Field.unitRingType F) a) u)) (@dsubmx (FinRing.Field.sort F) (S O) n (S O) v1) (@drsubmx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n A1)) A1 *)
rewrite mul_scalar_mx scalerA divff // scale1r andbC; case/and3P => /eqP <- _.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: forall _ : is_true (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k A1)) v), @eq (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n (@scalar_mx (FinRing.Field.ringType F) (S O) a) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n A1) (@dsubmx (FinRing.Field.sort F) (S O) n (S O) v1) (@drsubmx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n A1)) A1 *)
rewrite -{1}(hsubmxK A1) xrowE mul_mx_row row_mxKl -xrowE => /eqP def_v.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: @eq (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n (@scalar_mx (FinRing.Field.ringType F) (S O) a) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n A1) (@dsubmx (FinRing.Field.sort F) (S O) n (S O) v1) (@drsubmx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n A1)) A1 *)
rewrite -def_a block_mxEh vsubmxK /v1 -def_v xrkK.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: @eq (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.Field.finRingType F)) (addn (S O) n) (addn (S O) n))) (@row_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (addn (S O) n) (S O) n (@lsubmx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (addn (S O) n) (S O) n A1) (@col_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n n (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n A1) (@drsubmx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n A1))) A1 *)
apply: trmx_inj; rewrite tr_row_mx tr_col_mx trmx_ursub trmx_drsub trmx_lsub.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
(* Goal: @eq (matrix (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (addn (S O) n) (addn (S O) n)) (@col_mx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) n (addn (S O) n) (@usubmx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) n (addn (S O) n) (@trmx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (addn (S O) n) (addn (S O) n) A1)) (@row_mx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) n (S O) n (@dlsubmx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) n (S O) n (@trmx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (addn (S O) n) (addn (S O) n) A1)) (@drsubmx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (S O) n (S O) n (@trmx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (addn (S O) n) (addn (S O) n) A1)))) (@trmx (Finite.sort (FinRing.Ring.join_finType (FinRing.Field.finRingType F))) (addn (S O) n) (addn (S O) n) A1) *)
by rewrite hsubmxK vsubmxK.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) O (index_enum (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) (fun j : Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n) => @BigBody nat (Finite.sort (matrix_finType (FinRing.Ring.join_finType (FinRing.UnitRing.join_finRingType (FinRing.Field.finUnitRingType F))) n n)) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (andb (andb (@in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@SimplPred (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun x : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @in_mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) x (@mem (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (predPredType (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n))) (@has_quality (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@Qualifier (S O) (matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (fun u : matrix (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) (addn (S O) n) u))))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@xrow (FinRing.Field.sort F) (addn (S O) n) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U j))) u)) (S O))) (@card (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n) (@mem (matrix (FinRing.Field.sort F) n n) (simplPredType (matrix (FinRing.Field.sort F) n n)) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u)))))))) *)
rewrite -sum1_card; apply: eq_bigl => B; rewrite xrowE unitmxE.
(* Goal: @eq bool (andb (andb (@in_mem (GRing.Ring.sort (GRing.ComUnitRing.ringType (FinRing.Field.comUnitRingType F))) (@determinant (GRing.ComUnitRing.ringType (FinRing.Field.comUnitRingType F)) (addn (S O) n) (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) (@tperm_mx (FinRing.Field.ringType F) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k) (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B)))) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (FinRing.Field.comUnitRingType F))) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (FinRing.Field.comUnitRingType F)))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (FinRing.Field.comUnitRingType F))) (@GRing.unit (GRing.ComUnitRing.unitRingType (FinRing.Field.comUnitRingType F)))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) (@tperm_mx (FinRing.Field.ringType F) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k) (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B))) u)) (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) B (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) n n) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
rewrite !det_mulmx unitrM -unitmxE unitmx_perm det_lblock det_ublock.
(* Goal: @eq bool (andb (andb (andb true (@in_mem (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (FinRing.Field.comUnitRingType F))) (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (FinRing.Field.comUnitRingType F))) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (FinRing.Field.comUnitRingType F))) (S O) (@scalar_mx (FinRing.Field.ringType F) (S O) a)) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (FinRing.Field.comUnitRingType F))) n (@scalar_mx (FinRing.Field.ringType F) n (GRing.one (FinRing.Field.ringType F))))) (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (FinRing.Field.comUnitRingType F))) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (FinRing.Field.comUnitRingType F))) (S O) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) O))) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (FinRing.Field.comUnitRingType F))) n B))) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (FinRing.Field.comUnitRingType F))) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (FinRing.Field.comUnitRingType F)))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType (FinRing.Field.comUnitRingType F))) (@GRing.unit (GRing.ComUnitRing.unitRingType (FinRing.Field.comUnitRingType F))))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) (@tperm_mx (FinRing.Field.ringType F) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k) (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B))) u)) (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) B (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) n n) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
rewrite !det_scalar1 det1 mulr1 mul1r unitrM unitfE nza -unitmxE.
(* Goal: @eq bool (andb (andb (andb true (andb true (@in_mem (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n) B (@mem (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n)) (@unitmx (FinRing.Field.comUnitRingType F) n))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) (@tperm_mx (FinRing.Field.ringType F) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k) (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@ursubmx (FinRing.Field.sort F) (S O) n (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) L (U B))) u)) (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) B (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) n n) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
rewrite mulmx_block !mulmx0 mul0mx !addr0 !mulmx1 mul1mx block_mxKur.
(* Goal: @eq bool (andb (andb (andb true (andb true (@in_mem (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n) B (@mem (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n)) (@unitmx (FinRing.Field.comUnitRingType F) n))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) (@tperm_mx (FinRing.Field.ringType F) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n (@scalar_mx (FinRing.Field.ringType F) (S O) a) (@mulmx (FinRing.Field.ringType F) (S O) (S O) n (@scalar_mx (FinRing.Field.ringType F) (S O) a) (@GRing.scale (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (S O) n) (@GRing.inv (FinRing.Field.unitRingType F) a) u)) (@dsubmx (FinRing.Field.sort F) (S O) n (S O) v1) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (FinRing.Field.ringType F)) n n) (@mulmx (FinRing.Field.ringType F) n (S O) n (@dsubmx (FinRing.Field.sort F) (S O) n (S O) v1) (@GRing.scale (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (S O) n) (@GRing.inv (FinRing.Field.unitRingType F) a) u)) B)))) v)) (@eq_op (Finite.eqType (matrix_finType (FinRing.Field.finType F) (S O) n)) (@mulmx (FinRing.Field.ringType F) (S O) (S O) n (@scalar_mx (FinRing.Field.ringType F) (S O) a) (@GRing.scale (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (S O) n) (@GRing.inv (FinRing.Field.unitRingType F) a) u)) u)) (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) B (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) n n) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
rewrite mul_scalar_mx scalerA divff // scale1r eqxx andbT.
(* Goal: @eq bool (andb (andb true (andb true (@in_mem (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n) B (@mem (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (FinRing.Field.comUnitRingType F)) n n)) (@unitmx (FinRing.Field.comUnitRingType F) n))))) (@eq_op (Finite.eqType (matrix_finType (FinRing.Zmodule.join_finType (FinRing.Field.finZmodType F)) (addn (S O) n) (S O))) (@lsubmx (FinRing.Field.sort F) (addn (S O) n) (S O) n (@mulmx (FinRing.Field.ringType F) (addn (S O) n) (addn (S O) n) (addn (S O) n) (@tperm_mx (FinRing.Field.ringType F) (addn (S O) n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) k) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (FinRing.Field.ringType F))) (S O) n (S O) n (@scalar_mx (FinRing.Field.ringType F) (S O) a) u (@dsubmx (FinRing.Field.sort F) (S O) n (S O) v1) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (FinRing.Field.ringType F)) n n) (@mulmx (FinRing.Field.ringType F) n (S O) n (@dsubmx (FinRing.Field.sort F) (S O) n (S O) v1) (@GRing.scale (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (FinRing.Field.unitRingType F)) (S O) n) (@GRing.inv (FinRing.Field.unitRingType F) a) u)) B)))) v)) (@in_mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) B (@mem (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n)) (predPredType (Finite.sort (matrix_finType (FinRing.ComUnitRing.finType (FinRing.Field.finComUnitRingType F)) n n))) (@pred_of_simpl (matrix (FinRing.Field.sort F) n n) (@SimplPred (matrix (FinRing.Field.sort F) n n) (fun x : matrix (FinRing.Field.sort F) n n => @in_mem (matrix (FinRing.Field.sort F) n n) x (@mem (matrix (FinRing.Field.sort F) n n) (predPredType (matrix (FinRing.Field.sort F) n n)) (@has_quality (S O) (matrix (FinRing.Field.sort F) n n) (@Qualifier (S O) (matrix (FinRing.Field.sort F) n n) (fun u : matrix (FinRing.Field.sort F) n n => @unitmx (FinRing.ComUnitRing.comUnitRingType (FinRing.Field.finComUnitRingType F)) n u))))))))) *)
by rewrite block_mxEh mul_mx_row row_mxKl -def_a vsubmxK -xrowE xrkK eqxx andbT.
Qed.
Lemma card_GL_1 : #|'GL_1[F]| = #|F|.-1.
Proof.
(* Goal: @eq nat (@card (GL_finType (S O) (FinRing.Field.finComUnitRingType F)) (@mem (Finite.sort (GL_finType (S O) (FinRing.Field.finComUnitRingType F))) (predPredType (Finite.sort (GL_finType (S O) (FinRing.Field.finComUnitRingType F)))) (@SetDef.pred_of_set (GL_finType (S O) (FinRing.Field.finComUnitRingType F)) (@GLgroup (S O) (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (Nat.pred (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F))))))) *)
by rewrite card_GL // mul1n big_nat1 expn1 subn1.
Qed.
Lemma card_GL_2 : #|'GL_2[F]| = (#|F| * #|F|.-1 ^ 2 * #|F|.+1)%N.
Proof.
(* Goal: @eq nat (@card (GL_finType (S (S O)) (FinRing.Field.finComUnitRingType F)) (@mem (Finite.sort (GL_finType (S (S O)) (FinRing.Field.finComUnitRingType F))) (predPredType (Finite.sort (GL_finType (S (S O)) (FinRing.Field.finComUnitRingType F)))) (@SetDef.pred_of_set (GL_finType (S (S O)) (FinRing.Field.finComUnitRingType F)) (@GLgroup (S (S O)) (FinRing.Field.finComUnitRingType F) (Phant (FinRing.Field.sort F)))))) (muln (muln (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (expn (Nat.pred (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F))))))) (S (S O)))) (S (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))))) *)
rewrite card_GL // big_ltn // big_nat1 expn1 -(addn1 #|F|) -subn1 -!mulnA.
(* Goal: @eq nat (muln (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (muln (subn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (S O)) (subn (expn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (S (S O))) (S O)))) (muln (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (muln (subn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (S O)) (muln (subn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (S O)) (addn (@card (FinRing.Field.finType F) (@mem (Equality.sort (FinRing.Field.eqType F)) (predPredType (Equality.sort (FinRing.Field.eqType F))) (@sort_of_simpl_pred (Equality.sort (FinRing.Field.eqType F)) (pred_of_argType (Equality.sort (FinRing.Field.eqType F)))))) (S O))))) *)
by rewrite -subn_sqr.
Qed.
End CardGL.
Lemma logn_card_GL_p n p : prime p -> logn p #|'GL_n(p)| = 'C(n, 2).
Proof.
(* Goal: forall _ : is_true (prime p), @eq nat (logn p (@card (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))) (@mem (Finite.sort (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p))))) (predPredType (Finite.sort (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))))) (@SetDef.pred_of_set (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))) (@GLgroup n (Zp_finComUnitRingType (Zp_trunc (pdiv p))) (Phant (ordinal (S (S (Zp_trunc (pdiv p))))))))))) (binomial n (S (S O))) *)
move=> p_pr; have p_gt1 := prime_gt1 p_pr.
(* Goal: @eq nat (logn p (@card (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))) (@mem (Finite.sort (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p))))) (predPredType (Finite.sort (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))))) (@SetDef.pred_of_set (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))) (@GLgroup n (Zp_finComUnitRingType (Zp_trunc (pdiv p))) (Phant (ordinal (S (S (Zp_trunc (pdiv p))))))))))) (binomial n (S (S O))) *)
have p_i_gt0: p ^ _ > 0 by move=> i; rewrite expn_gt0 ltnW.
(* Goal: @eq nat (logn p (@card (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))) (@mem (Finite.sort (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p))))) (predPredType (Finite.sort (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))))) (@SetDef.pred_of_set (GL_finType n (Zp_finComUnitRingType (Zp_trunc (pdiv p)))) (@GLgroup n (Zp_finComUnitRingType (Zp_trunc (pdiv p))) (Phant (ordinal (S (S (Zp_trunc (pdiv p))))))))))) (binomial n (S (S O))) *)
rewrite (card_GL _ (ltn0Sn n.-1)) card_ord Fp_cast // big_add1 /=.
(* Goal: @eq nat (logn p (muln (expn p (binomial (S (Nat.pred n)) (S (S O)))) (@BigOp.bigop nat nat (S O) (index_iota O (S (Nat.pred n))) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O)))))) (binomial n (S (S O))) *)
pose p'gt0 m := m > 0 /\ logn p m = 0%N.
(* Goal: @eq nat (logn p (muln (expn p (binomial (S (Nat.pred n)) (S (S O)))) (@BigOp.bigop nat nat (S O) (index_iota O (S (Nat.pred n))) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O)))))) (binomial n (S (S O))) *)
suffices [Pgt0 p'P]: p'gt0 (\prod_(0 <= i < n.-1.+1) (p ^ i.+1 - 1))%N.
(* Goal: p'gt0 (@BigOp.bigop nat nat (S O) (index_iota O (S (Nat.pred n))) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O)))) *)
(* Goal: @eq nat (logn p (muln (expn p (binomial (S (Nat.pred n)) (S (S O)))) (@BigOp.bigop nat nat (S O) (index_iota O (S (Nat.pred n))) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O)))))) (binomial n (S (S O))) *)
by rewrite lognM // p'P pfactorK //; case n.
(* Goal: p'gt0 (@BigOp.bigop nat nat (S O) (index_iota O (S (Nat.pred n))) (fun i : nat => @BigBody nat nat i muln true (subn (expn p (S i)) (S O)))) *)
apply big_ind => [|m1 m2 [m10 p'm1] [m20]|i _]; rewrite {}/p'gt0 ?logn1 //.
(* Goal: and (is_true (leq (S O) (subn (expn p (S i)) (S O)))) (@eq nat (logn p (subn (expn p (S i)) (S O))) O) *)
(* Goal: forall _ : @eq nat (logn p m2) O, and (is_true (leq (S O) (muln m1 m2))) (@eq nat (logn p (muln m1 m2)) O) *)
by rewrite muln_gt0 m10 lognM ?p'm1.
(* Goal: and (is_true (leq (S O) (subn (expn p (S i)) (S O)))) (@eq nat (logn p (subn (expn p (S i)) (S O))) O) *)
rewrite lognE -if_neg subn_gt0 p_pr /= -{1 2}(exp1n i.+1) ltn_exp2r // p_gt1.
(* Goal: and (is_true true) (@eq nat (if negb (andb true (dvdn p (subn (expn p (S i)) (S O)))) then O else S (logn p (divn (subn (expn p (S i)) (S O)) p))) O) *)
by rewrite dvdn_subr ?dvdn_exp // gtnNdvd.
Qed.
Section MatrixAlgebra.
Variables F : fieldType.
Local Notation "A \in R" := (@submx F _ _ _ (mxvec A) R).
Lemma mem0mx m n (R : 'A_(m, n)) : 0 \in R.
Proof.
(* Goal: is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))) R) *)
by rewrite linear0 sub0mx.
Qed.
Lemma memmx0 n A : (A \in (0 : 'A_n)) -> A = 0.
Proof.
(* Goal: forall _ : is_true (@submx F (S O) (expn n (S (S O))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (expn n (S (S O))) (expn n (S (S O)))) : matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (expn n (S (S O))) (expn n (S (S O))))), @eq (matrix (GRing.Field.sort F) n n) A (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) *)
by rewrite submx0 mxvec_eq0; move/eqP.
Qed.
Lemma memmx1 n (A : 'M_n) : (A \in mxvec 1%:M) = is_scalar_mx A.
Proof.
(* Goal: @eq bool (@submx F (S O) (S O) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@is_scalar_mx (GRing.Field.ringType F) n A) *)
apply/sub_rVP/is_scalar_mxP=> [[a] | [a ->]].
(* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun a0 : GRing.Ring.sort (GRing.Field.ringType F) => @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (muln n n)) (@mxvec (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n a)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) a0 (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) *)
(* Goal: forall _ : @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (muln n n)) (@mxvec (GRing.Field.sort F) n n A) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) a (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))), @ex (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (fun a : GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F)) => @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) A (@scalar_mx (GRing.Field.ringType F) n a)) *)
by rewrite -linearZ scale_scalar_mx mulr1 => /(can_inj mxvecK); exists a.
(* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun a0 : GRing.Ring.sort (GRing.Field.ringType F) => @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (muln n n)) (@mxvec (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n a)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) a0 (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) *)
by exists a; rewrite -linearZ scale_scalar_mx mulr1.
Qed.
Lemma memmx_subP m1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :
reflect (forall A, A \in R1 -> A \in R2) (R1 <= R2)%MS.
Proof.
(* Goal: Bool.reflect (forall (A : matrix (GRing.Field.sort F) n n) (_ : is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n A) R1)), is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n A) R2)) (@submx F m1 m2 (expn n (S (S O))) R1 R2) *)
apply: (iffP idP) => [sR12 A R1_A | sR12]; first exact: submx_trans sR12.
(* Goal: is_true (@submx F m1 m2 (expn n (S (S O))) R1 R2) *)
by apply/rV_subP=> vA; rewrite -(vec_mxK vA); apply: sR12.
Qed.
Arguments memmx_subP {m1 m2 n R1 R2}.
Lemma memmx_eqP m1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :
reflect (forall A, (A \in R1) = (A \in R2)) (R1 == R2)%MS.
Proof.
(* Goal: Bool.reflect (forall A : matrix (GRing.Field.sort F) n n, @eq bool (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n A) R1) (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n A) R2)) (andb (@submx F m1 m2 (expn n (S (S O))) R1 R2) (@submx F m2 m1 (expn n (S (S O))) R2 R1)) *)
apply: (iffP eqmxP) => [eqR12 A | eqR12]; first by rewrite eqR12.
(* Goal: @eqmx F m1 m2 (expn n (S (S O))) R1 R2 *)
by apply/eqmxP; apply/rV_eqP=> vA; rewrite -(vec_mxK vA) eqR12.
Qed.
Arguments memmx_eqP {m1 m2 n R1 R2}.
Lemma memmx_addsP m1 m2 n A (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :
reflect (exists D, [/\ D.1 \in R1, D.2 \in R2 & A = D.1 + D.2])
Proof.
(* Goal: Bool.reflect (@ex (prod (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n)) (fun D : prod (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) => and3 (is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R1)) (is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R2)) (@eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) A (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D))))) (@submx F (S O) (expn n (S (S O))) (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n A) (@addsmx F m1 m2 (expn n (S (S O))) R1 R2)) *)
apply: (iffP sub_addsmxP) => [[u /(canRL mxvecK)->] | [D []]].
(* Goal: forall (_ : is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R1)) (_ : is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R2)) (_ : @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) A (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D))), @ex (prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2)) (fun u : prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) => @eq (matrix (GRing.Field.sort F) (S O) (expn n (S (S O)))) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n A) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (expn n (S (S O)))) (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1) (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2))) *)
(* Goal: @ex (prod (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n)) (fun D : prod (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) => and3 (is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R1)) (is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R2)) (@eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@vec_mx (GRing.Field.sort F) n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (expn n (S (S O)))) (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1) (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)))) *)
exists (vec_mx (u.1 *m R1), vec_mx (u.2 *m R2)).
(* Goal: forall (_ : is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R1)) (_ : is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R2)) (_ : @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) A (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D))), @ex (prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2)) (fun u : prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) => @eq (matrix (GRing.Field.sort F) (S O) (expn n (S (S O)))) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n A) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (expn n (S (S O)))) (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1) (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2))) *)
(* Goal: and3 (is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) (@pair (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1)) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2))))) R1)) (is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) (@pair (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1)) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2))))) R2)) (@eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (@vec_mx (GRing.Field.sort F) n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (expn n (S (S O)))) (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1) (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) (@pair (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1)) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2)))) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) (@pair (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1)) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2)))))) *)
by rewrite /= linearD !vec_mxK !submxMl.
(* Goal: forall (_ : is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R1)) (_ : is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D)) R2)) (_ : @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) A (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D))), @ex (prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2)) (fun u : prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) => @eq (matrix (GRing.Field.sort F) (S O) (expn n (S (S O)))) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n A) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (expn n (S (S O)))) (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1) (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2))) *)
case/submxP=> u1 defD1 /submxP[u2 defD2] ->.
(* Goal: @ex (prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2)) (fun u : prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) => @eq (matrix (GRing.Field.sort F) (S O) (expn n (S (S O)))) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) D))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (expn n (S (S O)))) (@mulmx (GRing.Field.ringType F) (S O) m1 (expn n (S (S O))) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R1) (@mulmx (GRing.Field.ringType F) (S O) m2 (expn n (S (S O))) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m1) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2) u) R2))) *)
by exists (u1, u2); rewrite linearD /= defD1 defD2.
Qed.
Arguments memmx_addsP {m1 m2 n A R1 R2}.
Lemma memmx_sumsP (I : finType) (P : pred I) n (A : 'M_n) R_ :
reflect (exists2 A_, A = \sum_(i | P i) A_ i & forall i, A_ i \in R_ i)
(A \in \sum_(i | P i) R_ i)%MS.
Proof.
(* Goal: Bool.reflect (@ex2 (forall _ : Finite.sort I, GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (fun A_ : forall _ : Finite.sort I, GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n) => @eq (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) A (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n)) (P i) (A_ i)))) (fun A_ : forall _ : Finite.sort I, GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n) => forall i : Finite.sort I, is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (A_ i)) (R_ i)))) (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n A) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort F) (muln n n) (muln n n)) (Finite.sort I) i (@addsmx F (muln n n) (muln n n) (muln n n)) (P i) (R_ i)))) *)
apply: (iffP sub_sumsmxP) => [[C defA] | [A_ -> R_A] {A}].
(* Goal: @ex (forall _ : Finite.sort I, matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n)) (fun u_ : forall _ : Finite.sort I, matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n) => @eq (matrix (GRing.Field.sort F) (S O) (muln n n)) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n)) (P i) (A_ i)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (P i) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (u_ i) (R_ i))))) *)
(* Goal: @ex2 (forall _ : Finite.sort I, GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (fun A_ : forall _ : Finite.sort I, GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n) => @eq (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) A (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n)) (P i) (A_ i)))) (fun A_ : forall _ : Finite.sort I, GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n) => forall i : Finite.sort I, is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (A_ i)) (R_ i))) *)
exists (fun i => vec_mx (C i *m R_ i)) => [|i].
(* Goal: @ex (forall _ : Finite.sort I, matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n)) (fun u_ : forall _ : Finite.sort I, matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n) => @eq (matrix (GRing.Field.sort F) (S O) (muln n n)) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n)) (P i) (A_ i)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (P i) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (u_ i) (R_ i))))) *)
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (C i) (R_ i)))) (R_ i)) *)
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n) A (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n)) (P i) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (C i) (R_ i))))) *)
by rewrite -linear_sum -defA /= mxvecK.
(* Goal: @ex (forall _ : Finite.sort I, matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n)) (fun u_ : forall _ : Finite.sort I, matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n) => @eq (matrix (GRing.Field.sort F) (S O) (muln n n)) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n)) (P i) (A_ i)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (P i) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (u_ i) (R_ i))))) *)
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (C i) (R_ i)))) (R_ i)) *)
by rewrite vec_mxK submxMl.
(* Goal: @ex (forall _ : Finite.sort I, matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n)) (fun u_ : forall _ : Finite.sort I, matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n) => @eq (matrix (GRing.Field.sort F) (S O) (muln n n)) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n)) (P i) (A_ i)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (P i) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (u_ i) (R_ i))))) *)
exists (fun i => mxvec (A_ i) *m pinvmx (R_ i)).
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (muln n n)) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) n n)) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n)) (P i) (A_ i)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (Finite.sort I) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (P i) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (@mulmx (GRing.Field.ringType F) (S O) (muln n n) (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Field.zmodType F)) n n (A_ i)) (@pinvmx F (muln n n) (muln n n) (R_ i))) (R_ i)))) *)
by rewrite linear_sum; apply: eq_bigr => i _; rewrite mulmxKpV.
Qed.
Arguments memmx_sumsP {I P n A R_}.
Lemma has_non_scalar_mxP m n (R : 'A_(m, n)) :
(1%:M \in R)%MS ->
reflect (exists2 A, A \in R & ~~ is_scalar_mx A)%MS (1 < \rank R).
Proof.
(* Goal: forall _ : is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) R), Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)))) (leq (S (S O)) (@mxrank F m (expn n (S (S O))) R)) *)
case: (posnP n) => [-> | n_gt0] in R *; set S := mxvec _ => sSR.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (Datatypes.S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)))) (leq (Datatypes.S (Datatypes.S O)) (@mxrank F m (expn n (Datatypes.S (Datatypes.S O))) R)) *)
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) O O) (fun A : matrix (GRing.Field.sort F) O O => is_true (@submx F (Datatypes.S O) m (muln O O) (@mxvec (GRing.Field.sort F) O O A) R)) (fun A : matrix (GRing.Field.sort F) O O => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) O A)))) (leq (Datatypes.S (Datatypes.S O)) (@mxrank F m (expn O (Datatypes.S (Datatypes.S O))) R)) *)
by rewrite [R]thinmx0 mxrank0; right; case; rewrite /is_scalar_mx ?insubF.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (Datatypes.S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)))) (leq (Datatypes.S (Datatypes.S O)) (@mxrank F m (expn n (Datatypes.S (Datatypes.S O))) R)) *)
have rankS: \rank S = 1%N.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (Datatypes.S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)))) (leq (Datatypes.S (Datatypes.S O)) (@mxrank F m (expn n (Datatypes.S (Datatypes.S O))) R)) *)
(* Goal: @eq nat (@mxrank F (Datatypes.S O) (muln n n) S) (Datatypes.S O) *)
apply/eqP; rewrite eqn_leq rank_leq_row lt0n mxrank_eq0 mxvec_eq0.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (Datatypes.S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)))) (leq (Datatypes.S (Datatypes.S O)) (@mxrank F m (expn n (Datatypes.S (Datatypes.S O))) R)) *)
(* Goal: is_true (andb true (negb (@eq_op (matrix_eqType (GRing.Zmodule.eqType (GRing.Field.zmodType F)) n n) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n))))) *)
by rewrite -mxrank_eq0 mxrank1 -lt0n.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (Datatypes.S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)))) (leq (Datatypes.S (Datatypes.S O)) (@mxrank F m (expn n (Datatypes.S (Datatypes.S O))) R)) *)
rewrite -{2}rankS (ltn_leqif (mxrank_leqif_sup sSR)).
(* Goal: Bool.reflect (@ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (Datatypes.S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)))) (negb (@submx F m (Datatypes.S O) (muln n n) R S)) *)
apply: (iffP idP) => [/row_subPn[i] | [A sAR]].
(* Goal: forall _ : is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)), is_true (negb (@submx F m (Datatypes.S O) (muln n n) R S)) *)
(* Goal: forall _ : is_true (negb (@submx F (Datatypes.S O) (Datatypes.S O) (muln n n) (@row (GRing.Field.sort F) m (muln n n) i R) S)), @ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (Datatypes.S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A))) *)
rewrite -[row i R]vec_mxK memmx1; set A := vec_mx _ => nsA.
(* Goal: forall _ : is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)), is_true (negb (@submx F m (Datatypes.S O) (muln n n) R S)) *)
(* Goal: @ex2 (matrix (GRing.Field.sort F) n n) (fun A : matrix (GRing.Field.sort F) n n => is_true (@submx F (Datatypes.S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (fun A : matrix (GRing.Field.sort F) n n => is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A))) *)
by exists A; rewrite // vec_mxK row_sub.
(* Goal: forall _ : is_true (negb (@is_scalar_mx (GRing.Field.ringType F) n A)), is_true (negb (@submx F m (Datatypes.S O) (muln n n) R S)) *)
by rewrite -memmx1; apply/contra/submx_trans.
Qed.
Definition mulsmx m1 m2 n (R1 : 'A[F]_(m1, n)) (R2 : 'A_(m2, n)) :=
(\sum_i <<R1 *m lin_mx (mulmxr (vec_mx (row i R2)))>>)%MS.
Arguments mulsmx {m1%N m2%N n%N} R1%MS R2%MS.
Local Notation "R1 * R2" := (mulsmx R1 R2) : matrix_set_scope.
Lemma genmx_muls m1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :
<<(R1 * R2)%MS>>%MS = (R1 * R2)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln n n) (muln n n)) (@genmx F (muln n n) (muln n n) (@mulsmx m1 m2 n R1 R2)) (@mulsmx m1 m2 n R1 R2) *)
by rewrite genmx_sums; apply: eq_bigr => i; rewrite genmx_id.
Qed.
Lemma mem_mulsmx m1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) A1 A2 :
(A1 \in R1 -> A2 \in R2 -> A1 *m A2 \in R1 * R2)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n A1) R1)) (_ : is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n A2) R2)), is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A1 A2)) (@mulsmx m1 m2 n R1 R2)) *)
move=> R_A1 R_A2; rewrite -[A2]mxvecK; case/submxP: R_A2 => a ->{A2}.
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A1 (@vec_mx (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) (S O) m2 (muln n n) a R2)))) (@mulsmx m1 m2 n R1 R2)) *)
rewrite mulmx_sum_row !linear_sum summx_sub // => i _.
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n), GRing.Zmodule.sort (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n))))) (mxvec_linear (GRing.Field.ringType F) n n) (@GRing.Linear.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n)))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n)) (@GRing.Lmodule.base (GRing.ComRing.ringType (GRing.Field.comRingType F)) (@GRing.Lmodule.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n)) (@GRing.Lmodule.class (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (matrix_lmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n)))))) (@mulmx_linear (GRing.Field.comRingType F) n n n A1) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))) (vec_mx_linear (GRing.Field.ringType F) n n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) m2 a (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.Field.ringType F)) m2 (muln n n) i R2))))) (@mulsmx m1 m2 n R1 R2)) *)
rewrite !linearZ scalemx_sub {a}//= (sumsmx_sup i) // genmxE.
(* Goal: is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n n A1 (@vec_mx (GRing.Field.sort F) n n (@row (GRing.Field.sort F) m2 (muln n n) i R2)))) (@mulmx (GRing.Field.ringType F) m1 (expn n (S (S O))) (muln n n) R1 (@lin_mx (GRing.Field.ringType F) n n n n (@mulmxr_head (GRing.Field.ringType F) n n n tt (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m2 (expn n (S (S O))) i R2)))))) *)
rewrite -[A1]mxvecK; case/submxP: R_A1 => a ->{A1}.
(* Goal: is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n n (@vec_mx (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) (S O) m1 (muln n n) a R1)) (@vec_mx (GRing.Field.sort F) n n (@row (GRing.Field.sort F) m2 (muln n n) i R2)))) (@mulmx (GRing.Field.ringType F) m1 (expn n (S (S O))) (muln n n) R1 (@lin_mx (GRing.Field.ringType F) n n n n (@mulmxr_head (GRing.Field.ringType F) n n n tt (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m2 (expn n (S (S O))) i R2)))))) *)
by apply/submxP; exists a; rewrite mulmxA mul_rV_lin.
Qed.
Lemma mulsmx_subP m1 m2 m n
(R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) (R : 'A_(m, n)) :
reflect (forall A1 A2, A1 \in R1 -> A2 \in R2 -> A1 *m A2 \in R)
(R1 * R2 <= R)%MS.
Proof.
(* Goal: Bool.reflect (forall (A1 A2 : matrix (GRing.Field.sort F) n n) (_ : is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n A1) R1)) (_ : is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n A2) R2)), is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A1 A2)) R)) (@submx F (muln n n) m (muln n n) (@mulsmx m1 m2 n R1 R2) R) *)
apply: (iffP memmx_subP) => [sR12R A1 A2 R_A1 R_A2 | sR12R A].
(* Goal: forall _ : is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@mulsmx m1 m2 n R1 R2)), is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R) *)
(* Goal: is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A1 A2)) R) *)
by rewrite sR12R ?mem_mulsmx.
(* Goal: forall _ : is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@mulsmx m1 m2 n R1 R2)), is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R) *)
case/memmx_sumsP=> A_ -> R_A; rewrite linear_sum summx_sub //= => j _.
(* Goal: is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n (A_ j)) R) *)
rewrite (submx_trans (R_A _)) // genmxE; apply/row_subP=> i.
(* Goal: is_true (@submx F (S O) m (muln n n) (@row (GRing.Field.sort F) m1 (muln n n) i (@mulmx (GRing.Field.ringType F) m1 (expn n (S (S O))) (muln n n) R1 (@lin_mx (GRing.Field.ringType F) n n n n (@mulmxr_head (GRing.Field.ringType F) n n n tt (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m2 (expn n (S (S O))) j R2)))))) R) *)
by rewrite row_mul mul_rV_lin sR12R ?vec_mxK ?row_sub.
Qed.
Arguments mulsmx_subP {m1 m2 m n R1 R2 R}.
Lemma mulsmxS m1 m2 m3 m4 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n))
(R3 : 'A_(m3, n)) (R4 : 'A_(m4, n)) :
(R1 <= R3 -> R2 <= R4 -> R1 * R2 <= R3 * R4)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx F m1 m3 (expn n (S (S O))) R1 R3)) (_ : is_true (@submx F m2 m4 (expn n (S (S O))) R2 R4)), is_true (@submx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m2 n R1 R2) (@mulsmx m3 m4 n R3 R4)) *)
move=> sR13 sR24; apply/mulsmx_subP=> A1 A2 R_A1 R_A2.
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A1 A2)) (@mulsmx m3 m4 n R3 R4)) *)
by apply: mem_mulsmx; [apply: submx_trans sR13 | apply: submx_trans sR24].
Qed.
Lemma muls_eqmx m1 m2 m3 m4 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n))
(R3 : 'A_(m3, n)) (R4 : 'A_(m4, n)) :
(R1 :=: R3 -> R2 :=: R4 -> R1 * R2 = R3 * R4)%MS.
Proof.
(* Goal: forall (_ : @eqmx F m1 m3 (expn n (S (S O))) R1 R3) (_ : @eqmx F m2 m4 (expn n (S (S O))) R2 R4), @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@mulsmx m1 m2 n R1 R2) (@mulsmx m3 m4 n R3 R4) *)
move=> eqR13 eqR24; rewrite -(genmx_muls R1 R2) -(genmx_muls R3 R4).
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@genmx F (muln n n) (muln n n) (@mulsmx m1 m2 n R1 R2)) (@genmx F (muln n n) (muln n n) (@mulsmx m3 m4 n R3 R4)) *)
by apply/genmxP; rewrite !mulsmxS ?eqR13 ?eqR24.
Qed.
Lemma mulsmxP m1 m2 n A (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :
reflect (exists2 A1, forall i, A1 i \in R1
& exists2 A2, forall i, A2 i \in R2
& A = \sum_(i < n ^ 2) A1 i *m A2 i)
(A \in R1 * R2)%MS.
Arguments mulsmxP {m1 m2 n A R1 R2}.
Lemma mulsmxA m1 m2 m3 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) (R3 : 'A_(m3, n)) :
(R1 * (R2 * R3) = R1 * R2 * R3)%MS.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@mulsmx m1 (muln n n) n R1 (@mulsmx m2 m3 n R2 R3)) (@mulsmx (muln n n) m3 n (@mulsmx m1 m2 n R1 R2) R3) *)
rewrite -(genmx_muls (_ * _)%MS) -genmx_muls; apply/genmxP; apply/andP; split.
(* Goal: is_true (@submx F (muln n n) (muln n n) (muln n n) (@mulsmx (muln n n) m3 n (@mulsmx m1 m2 n R1 R2) R3) (@mulsmx m1 (muln n n) n R1 (@mulsmx m2 m3 n R2 R3))) *)
(* Goal: is_true (@submx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 (muln n n) n R1 (@mulsmx m2 m3 n R2 R3)) (@mulsmx (muln n n) m3 n (@mulsmx m1 m2 n R1 R2) R3)) *)
apply/mulsmx_subP=> A1 A23 R_A1; case/mulsmxP=> A2 R_A2 [A3 R_A3 ->{A23}].
(* Goal: is_true (@submx F (muln n n) (muln n n) (muln n n) (@mulsmx (muln n n) m3 n (@mulsmx m1 m2 n R1 R2) R3) (@mulsmx m1 (muln n n) n R1 (@mulsmx m2 m3 n R2 R3))) *)
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A1 (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) (Finite.sort (ordinal_finType (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) (index_enum (ordinal_finType (expn n (S (S O))))) (fun i : ordinal (expn n (S (S O))) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) (ordinal (expn n (S (S O)))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) true (@mulmx (GRing.Field.ringType F) n n n (A2 i) (A3 i)))))) (@mulsmx (muln n n) m3 n (@mulsmx m1 m2 n R1 R2) R3)) *)
by rewrite !linear_sum summx_sub //= => i _; rewrite mulmxA !mem_mulsmx.
(* Goal: is_true (@submx F (muln n n) (muln n n) (muln n n) (@mulsmx (muln n n) m3 n (@mulsmx m1 m2 n R1 R2) R3) (@mulsmx m1 (muln n n) n R1 (@mulsmx m2 m3 n R2 R3))) *)
apply/mulsmx_subP=> _ A3 /mulsmxP[A1 R_A1 [A2 R_A2 ->]] R_A3.
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) (Finite.sort (ordinal_finType (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) (index_enum (ordinal_finType (expn n (S (S O))))) (fun i : ordinal (expn n (S (S O))) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) (ordinal (expn n (S (S O)))) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n n)) true (@mulmx (GRing.Field.ringType F) n n n (A1 i) (A2 i)))) A3)) (@mulsmx m1 (muln n n) n R1 (@mulsmx m2 m3 n R2 R3))) *)
rewrite mulmx_suml linear_sum summx_sub //= => i _.
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n (A1 i) (A2 i)) A3)) (@mulsmx m1 (muln n n) n R1 (@mulsmx m2 m3 n R2 R3))) *)
by rewrite -mulmxA !mem_mulsmx.
Qed.
Lemma mulsmx_addl m1 m2 m3 n
(R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) (R3 : 'A_(m3, n)) :
((R1 + R2) * R3 = R1 * R3 + R2 * R3)%MS.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@mulsmx (expn n (S (S O))) m3 n (@addsmx F m1 m2 (expn n (S (S O))) R1 R2) R3) (@addsmx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m3 n R1 R3) (@mulsmx m2 m3 n R2 R3)) *)
rewrite -(genmx_muls R2 R3) -(genmx_muls R1 R3) -genmx_muls -genmx_adds.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@genmx F (muln n n) (muln n n) (@mulsmx (expn n (S (S O))) m3 n (@addsmx F m1 m2 (expn n (S (S O))) R1 R2) R3)) (@genmx F (muln n n) (muln n n) (@addsmx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m3 n R1 R3) (@mulsmx m2 m3 n R2 R3))) *)
apply/genmxP; rewrite andbC addsmx_sub !mulsmxS ?addsmxSl ?addsmxSr //=.
(* Goal: is_true (@submx F (muln n n) (muln n n) (muln n n) (@mulsmx (expn n (S (S O))) m3 n (@addsmx F m1 m2 (expn n (S (S O))) R1 R2) R3) (@addsmx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m3 n R1 R3) (@mulsmx m2 m3 n R2 R3))) *)
apply/mulsmx_subP=> _ A3 /memmx_addsP[A [R_A1 R_A2 ->]] R_A3.
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) A) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) A)) A3)) (@addsmx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m3 n R1 R3) (@mulsmx m2 m3 n R2 R3))) *)
by rewrite mulmxDl linearD addmx_sub_adds ?mem_mulsmx.
Qed.
Lemma mulsmx_addr m1 m2 m3 n
(R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) (R3 : 'A_(m3, n)) :
(R1 * (R2 + R3) = R1 * R2 + R1 * R3)%MS.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@mulsmx m1 (expn n (S (S O))) n R1 (@addsmx F m2 m3 (expn n (S (S O))) R2 R3)) (@addsmx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m2 n R1 R2) (@mulsmx m1 m3 n R1 R3)) *)
rewrite -(genmx_muls R1 R3) -(genmx_muls R1 R2) -genmx_muls -genmx_adds.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@genmx F (muln n n) (muln n n) (@mulsmx m1 (expn n (S (S O))) n R1 (@addsmx F m2 m3 (expn n (S (S O))) R2 R3))) (@genmx F (muln n n) (muln n n) (@addsmx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m2 n R1 R2) (@mulsmx m1 m3 n R1 R3))) *)
apply/genmxP; rewrite andbC addsmx_sub !mulsmxS ?addsmxSl ?addsmxSr //=.
(* Goal: is_true (@submx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 (expn n (S (S O))) n R1 (@addsmx F m2 m3 (expn n (S (S O))) R2 R3)) (@addsmx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m2 n R1 R2) (@mulsmx m1 m3 n R1 R3))) *)
apply/mulsmx_subP=> A1 _ R_A1 /memmx_addsP[A [R_A2 R_A3 ->]].
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A1 (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) n n) (@fst (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) A) (@snd (matrix (GRing.Field.sort F) n n) (matrix (GRing.Field.sort F) n n) A)))) (@addsmx F (muln n n) (muln n n) (muln n n) (@mulsmx m1 m2 n R1 R2) (@mulsmx m1 m3 n R1 R3))) *)
by rewrite mulmxDr linearD addmx_sub_adds ?mem_mulsmx.
Qed.
Lemma mulsmx0 m1 m2 n (R1 : 'A_(m1, n)) : (R1 * (0 : 'A_(m2, n)) = 0)%MS.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@mulsmx m1 m2 n R1 (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 (expn n (S (S O)))) : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) m2 (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) *)
apply/eqP; rewrite -submx0; apply/mulsmx_subP=> A1 A0 _.
(* Goal: forall _ : is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n A0) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 (expn n (S (S O)))))), is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A1 A0)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n)))) *)
by rewrite [A0 \in 0]eqmx0 => /memmx0->; rewrite mulmx0 mem0mx.
Qed.
Lemma muls0mx m1 m2 n (R2 : 'A_(m2, n)) : ((0 : 'A_(m1, n)) * R2 = 0)%MS.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) (@mulsmx m1 m2 n (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 (expn n (S (S O)))) : matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) m1 (expn n (S (S O)))) R2) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n))) *)
apply/eqP; rewrite -submx0; apply/mulsmx_subP=> A0 A2.
(* Goal: forall (_ : is_true (@submx F (S O) m1 (muln n n) (@mxvec (GRing.Field.sort F) n n A0) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m1 (expn n (S (S O))))))) (_ : is_true (@submx F (S O) m2 (muln n n) (@mxvec (GRing.Field.sort F) n n A2) R2)), is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@mulmx (GRing.Field.ringType F) n n n A0 A2)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (muln n n) (muln n n)))) *)
by rewrite [A0 \in 0]eqmx0 => /memmx0->; rewrite mul0mx mem0mx.
Qed.
Definition left_mx_ideal m1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :=
(R1 * R2 <= R2)%MS.
Definition right_mx_ideal m1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :=
(R2 * R1 <= R2)%MS.
Definition mx_ideal m1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :=
left_mx_ideal R1 R2 && right_mx_ideal R1 R2.
Definition mxring_id m n (R : 'A_(m, n)) e :=
[/\ e != 0,
e \in R,
forall A, A \in R -> e *m A = A
& forall A, A \in R -> A *m e = A]%MS.
Definition has_mxring_id m n (R : 'A[F]_(m , n)) :=
(R != 0) &&
(row_mx 0 (row_mx (mxvec R) (mxvec R))
<= row_mx (cokermx R) (row_mx (lin_mx (mulmx R \o lin_mulmx))
(lin_mx (mulmx R \o lin_mulmxr))))%MS.
Definition mxring m n (R : 'A_(m, n)) :=
left_mx_ideal R R && has_mxring_id R.
Lemma mxring_idP m n (R : 'A_(m, n)) :
reflect (exists e, mxring_id R e) (has_mxring_id R).
Proof.
(* Goal: Bool.reflect (@ex (Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) (fun e : Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) => @mxring_id m n R e)) (@has_mxring_id m n R) *)
apply: (iffP andP) => [[nzR] | [e [nz_e Re ideR idRe]]].
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: forall _ : is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n)))))), @ex (Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) (fun e : Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) => @mxring_id m n R e) *)
case/submxP=> v; rewrite -[v]vec_mxK; move/vec_mx: v => e.
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: forall _ : @eq (matrix (GRing.Field.sort F) (S O) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@mulmx (GRing.Field.ringType F) (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n e) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n)))))), @ex (Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) (fun e : Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) => @mxring_id m n R e) *)
rewrite !mul_mx_row; case/eq_row_mx => /eqP.
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: forall (_ : is_true (@eq_op (matrix_eqType (GRing.Field.eqType F) (S O) (expn n (S (S O)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@mulmx (GRing.Field.ringType F) (S O) (expn n (S (S O))) (expn n (S (S O))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n e) (@cokermx F m (expn n (S (S O))) R)))) (_ : @eq (matrix (GRing.Field.sort F) (S O) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R)) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mulmx (GRing.Field.ringType F) (S O) (expn n (S (S O))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n e) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n)))) (@mulmx (GRing.Field.ringType F) (S O) (expn n (S (S O))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n e) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n)))))), @ex (Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) (fun e : Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) => @mxring_id m n R e) *)
rewrite eq_sym -submxE => Re.
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: forall _ : @eq (matrix (GRing.Field.sort F) (S O) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R)) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mulmx (GRing.Field.ringType F) (S O) (expn n (S (S O))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n e) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n)))) (@mulmx (GRing.Field.ringType F) (S O) (expn n (S (S O))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n e) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))), @ex (Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) (fun e : Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) => @mxring_id m n R e) *)
case/eq_row_mx; rewrite !{1}mul_rV_lin1 /= mxvecK.
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: forall (_ : @eq (matrix (GRing.Field.sort F) (S O) (muln m (expn n (S (S O))))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (muln n n) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) m (expn n (S (S O))) (muln n n) R (@lin_mulmx (GRing.Field.comRingType F) n n n e)))) (_ : @eq (matrix (GRing.Field.sort F) (S O) (muln m (expn n (S (S O))))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (muln n n) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) m (expn n (S (S O))) (muln n n) R (@lin_mulmxr (GRing.Field.ringType F) n n n e)))), @ex (matrix (GRing.Field.sort F) n n) (fun e : matrix (GRing.Field.sort F) n n => @mxring_id m n R e) *)
set u := (_ *m _) => /(can_inj mxvecK) idRe /(can_inj mxvecK) ideR.
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: @ex (matrix (GRing.Field.sort F) n n) (fun e : matrix (GRing.Field.sort F) n n => @mxring_id m n R e) *)
exists e; split=> // [ | A /submxP[a defA] | A /submxP[a defA]].
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A e) A *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n e A) A *)
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) e (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))) *)
-
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A e) A *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n e A) A *)
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n)) e (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n n)))) *)
by apply: contra nzR; rewrite ideR => /eqP->; rewrite !linear0.
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A e) A *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n e A) A *)
-
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A e) A *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n e A) A *)
by rewrite -{2}[A]mxvecK defA idRe mulmxA mx_rV_lin -defA /= mxvecK.
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A e) A *)
by rewrite -{2}[A]mxvecK defA ideR mulmxA mx_rV_lin -defA /= mxvecK.
(* Goal: and (is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O)))))))) (is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n))))))) *)
split.
(* Goal: is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n)))))) *)
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Field.eqType F) m (expn n (S (S O)))) R (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (expn n (S (S O))))))) *)
by apply: contraNneq nz_e => R0; rewrite R0 eqmx0 in Re; rewrite (memmx0 Re).
(* Goal: is_true (@submx F (S O) (expn n (S (S O))) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Field.sort F) (expn n (S (S O))) (expn n (S (S O))) (addn (muln m (muln n n)) (muln m (muln n n))) (@cokermx F m (expn n (S (S O))) R) (@row_mx (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (muln n n) (muln m (muln n n)) (muln m (muln n n)) (@lin_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.ComRing.sort (GRing.Field.comRingType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmx (GRing.Field.comRingType F) n n n))) (@lin_mx (GRing.Field.ringType F) n n m (muln n n) (@funcomp (matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (expn n (S (S O))) (muln n n)) (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) tt (@mulmx (GRing.Field.ringType F) m (expn n (S (S O))) (muln n n) R) (@lin_mulmxr (GRing.Field.ringType F) n n n)))))) *)
apply/submxP; exists (mxvec e); rewrite !mul_mx_row !{1}mul_rV_lin1.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (@mulmx (GRing.Field.ringType F) (S O) (expn n (S (S O))) (expn n (S (S O))) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) n n e) (@cokermx F m (expn n (S (S O))) R)) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (expn n (S (S O))), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (expn n (S (S O)))))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (mxvec_linear (GRing.Field.ringType F) m (muln n n)) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) (expn n (S (S O))) (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@mulmx_linear (GRing.Field.comRingType F) m (expn n (S (S O))) (muln n n) R) (lin_mulmx_linear (GRing.Field.comRingType F) n n n))) (vec_mx_linear (GRing.Field.ringType F) n n)) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) n n e)) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (expn n (S (S O))), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (expn n (S (S O)))))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (mxvec_linear (GRing.Field.ringType F) m (muln n n)) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) (expn n (S (S O))) (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@mulmx_linear (GRing.Field.comRingType F) m (expn n (S (S O))) (muln n n) R) (lin_mulmxr_linear (GRing.Field.ringType F) n n n))) (vec_mx_linear (GRing.Field.ringType F) n n)) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) n n e)))) *)
rewrite submxE in Re; rewrite {Re}(eqP Re).
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (addn (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))))) (@row_mx (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (expn n (S (S O))))) (@row_mx (GRing.Field.sort F) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R) (@mxvec (GRing.Field.sort F) m (expn n (S (S O))) R))) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (expn n (S (S O))) (addn (muln m (expn n (S (S O)))) (muln m (expn n (S (S O))))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n))) (@row_mx (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (expn n (S (S O)))) (muln m (expn n (S (S O)))) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (expn n (S (S O))), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (expn n (S (S O)))))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (mxvec_linear (GRing.Field.ringType F) m (muln n n)) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) (expn n (S (S O))) (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@mulmx_linear (GRing.Field.comRingType F) m (expn n (S (S O))) (muln n n) R) (lin_mulmx_linear (GRing.Field.comRingType F) n n n))) (vec_mx_linear (GRing.Field.ringType F) n n)) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) n n e)) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (expn n (S (S O))), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (expn n (S (S O)))))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln m (expn n (S (S O)))))) (mxvec_linear (GRing.Field.ringType F) m (muln n n)) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) (expn n (S (S O))) (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@mulmx_linear (GRing.Field.comRingType F) m (expn n (S (S O))) (muln n n) R) (lin_mulmxr_linear (GRing.Field.ringType F) n n n))) (vec_mx_linear (GRing.Field.ringType F) n n)) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) n n e)))) *)
congr (row_mx 0 (row_mx (mxvec _) (mxvec _))); apply/row_matrixP=> i.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O)))) (@row (GRing.Zmodule.sort (GRing.Field.zmodType F)) m (expn n (S (S O))) i R) (@row (GRing.Zmodule.sort (GRing.Field.zmodType F)) m (expn n (S (S O))) i (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n), @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) (expn n (S (S O))) (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@mulmx_linear (GRing.Field.comRingType F) m (expn n (S (S O))) (muln n n) R) (lin_mulmxr_linear (GRing.Field.ringType F) n n n)) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))), @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n))) (vec_mx_linear (GRing.Field.ringType F) n n) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) n n e)))) *)
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O)))) (@row (GRing.Zmodule.sort (GRing.Field.zmodType F)) m (expn n (S (S O))) i R) (@row (GRing.Zmodule.sort (GRing.Field.zmodType F)) m (expn n (S (S O))) i (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n), @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) (expn n (S (S O))) (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@mulmx_linear (GRing.Field.comRingType F) m (expn n (S (S O))) (muln n n) R) (lin_mulmx_linear (GRing.Field.comRingType F) n n n)) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))), @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n))) (vec_mx_linear (GRing.Field.ringType F) n n) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) n n e)))) *)
by rewrite !row_mul !mul_rV_lin1 /= mxvecK ideR vec_mxK ?row_sub.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) (expn n (S (S O)))) (@row (GRing.Zmodule.sort (GRing.Field.zmodType F)) m (expn n (S (S O))) i R) (@row (GRing.Zmodule.sort (GRing.Field.zmodType F)) m (expn n (S (S O))) i (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n), @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)))) (@GRing.comp_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_lmodType (GRing.Field.ringType F) (expn n (S (S O))) (muln n n)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@mulmx_linear (GRing.Field.comRingType F) m (expn n (S (S O))) (muln n n) R) (lin_mulmxr_linear (GRing.Field.ringType F) n n n)) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (expn n (S (S O)))), @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n))) (vec_mx_linear (GRing.Field.ringType F) n n) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) n n e)))) *)
by rewrite !row_mul !mul_rV_lin1 /= mxvecK idRe vec_mxK ?row_sub.
Qed.
Arguments mxring_idP {m n R}.
Section CentMxDef.
Variables (m n : nat) (R : 'A[F]_(m, n)).
Definition cent_mx_fun (B : 'M[F]_n) := R *m lin_mx (mulmxr B \- mulmx B).
Lemma cent_mx_fun_is_linear : linear cent_mx_fun.
Proof.
(* Goal: @GRing.Linear.axiom (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) m (muln n n)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) cent_mx_fun (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType F)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)))) *)
move=> a A B; apply/row_matrixP=> i; rewrite linearP row_mul mul_rV_lin.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (muln n n)) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) n n (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n)) (@GRing.sub_fun_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (@mulmxr_linear (GRing.Field.ringType F) n n n (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) a A) B)) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (@mulmx_linear (GRing.Field.comRingType F) n n n (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) a A) B))) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (expn n (S (S O))) i R)))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) a (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n)))) (@row_linear (GRing.Field.ringType F) m (muln n n) i) (cent_mx_fun A))) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n)))) (@row_linear (GRing.Field.ringType F) m (muln n n) i) (cent_mx_fun B))) *)
rewrite /= {-3}[row]lock row_mul mul_rV_lin -lock row_mul mul_rV_lin.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (muln n n)) (@mxvec (GRing.Field.sort F) n n (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) n n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) n n) (@Choice.Class (matrix (GRing.Field.sort F) n n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) n n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) n n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))) (@mulmx (GRing.Field.ringType F) n n n (@vec_mx (GRing.Field.sort F) n n (@row (GRing.Field.sort F) m (expn n (S (S O))) i R)) (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) n n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) n n) (@Choice.Class (matrix (GRing.Field.sort F) n n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) n n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) n n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) a A) B)) (@GRing.opp (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) n n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) n n) (@Choice.Class (matrix (GRing.Field.sort F) n n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) n n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) n n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n n (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) n n) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) n n) (@Choice.Class (matrix (GRing.Field.sort F) n n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) n n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) n n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) n n))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) a A) B) (@vec_mx (GRing.Field.sort F) n n (@row (GRing.Field.sort F) m (expn n (S (S O))) i R)))))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln n n)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) a (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) n n (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n)) (@GRing.sub_fun_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (@mulmxr_linear (GRing.Field.ringType F) n n n A) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (@mulmx_linear (GRing.Field.comRingType F) n n n A)) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (expn n (S (S O))) i R))))) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) n n (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n)) (@GRing.sub_fun_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (@mulmxr_linear (GRing.Field.ringType F) n n n B) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (@mulmx_linear (GRing.Field.comRingType F) n n n B)) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (expn n (S (S O))) i R))))) *)
by rewrite -linearP -(linearP [linear of mulmx _ \- mulmxr _]).
Qed.
Canonical cent_mx_fun_additive := Additive cent_mx_fun_is_linear.
Canonical cent_mx_fun_linear := Linear cent_mx_fun_is_linear.
Definition cent_mx := kermx (lin_mx cent_mx_fun).
Definition center_mx := (R :&: cent_mx)%MS.
End CentMxDef.
Local Notation "''C' ( R )" := (cent_mx R) : matrix_set_scope.
Local Notation "''Z' ( R )" := (center_mx R) : matrix_set_scope.
Lemma cent_rowP m n B (R : 'A_(m, n)) :
reflect (forall i (A := vec_mx (row i R)), A *m B = B *m A) (B \in 'C(R))%MS.
Proof.
(* Goal: Bool.reflect (forall i : ordinal m, let A := @vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (expn n (S (S O))) i R) in @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A)) (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n B) (@cent_mx m n R)) *)
apply: (iffP sub_kermxP); rewrite mul_vec_lin => cBE.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (muln n n))) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) m (muln n n) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n))) (@cent_mx_fun_linear m n R) B)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln m (muln n n)))) *)
(* Goal: forall i : ordinal m, let A := @vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (expn n (S (S O))) i R) in @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A) *)
move/(canRL mxvecK): cBE => cBE i A /=; move/(congr1 (row i)): cBE.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (muln n n))) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) m (muln n n) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n))) (@cent_mx_fun_linear m n R) B)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln m (muln n n)))) *)
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n)) (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n) i (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n))) (@cent_mx_fun_linear m n R) B)) (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n) i (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln m (muln n n)))))), @eq (matrix (GRing.Field.sort F) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A) *)
rewrite row_mul mul_rV_lin -/A; move/(canRL mxvecK).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (muln n n))) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) m (muln n n) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n))) (@cent_mx_fun_linear m n R) B)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln m (muln n n)))) *)
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n)) (@GRing.sub_fun_linear (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) n n)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (@mulmxr_linear (GRing.Field.ringType F) n n n B) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n)) (@mulmx_linear (GRing.Field.comRingType F) n n n B)) A) (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) n n (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n) i (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln m (muln n n))))))), @eq (matrix (GRing.Field.sort F) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A) *)
by move/(canRL (subrK _)); rewrite !linear0 add0r.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln m (muln n n))) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) m (muln n n) (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n))) (@cent_mx_fun_linear m n R) B)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln m (muln n n)))) *)
apply: (canLR vec_mxK); apply/row_matrixP=> i.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (muln n n)) (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n) i (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m (muln n n))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n, matrix (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n))) (@cent_mx_fun_linear m n R) B)) (@row (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n) i (@vec_mx (GRing.Ring.sort (GRing.Field.ringType F)) m (muln n n) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (muln m (muln n n)))))) *)
by rewrite row_mul mul_rV_lin /= cBE subrr !linear0.
Qed.
Arguments cent_rowP {m n B R}.
Lemma cent_mxP m n B (R : 'A_(m, n)) :
reflect (forall A, A \in R -> A *m B = B *m A) (B \in 'C(R))%MS.
Proof.
(* Goal: Bool.reflect (forall (A : matrix (GRing.Field.sort F) n n) (_ : is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A)) (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n B) (@cent_mx m n R)) *)
apply: (iffP cent_rowP) => cEB => [A sAE | i A].
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A) *)
rewrite -[A]mxvecK -(mulmxKpV sAE); move: (mxvec A *m _) => u.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n (@vec_mx (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) (S O) m (muln n n) u R)) B) (@mulmx (GRing.Field.ringType F) n n n B (@vec_mx (GRing.Field.sort F) n n (@mulmx (GRing.Field.ringType F) (S O) m (muln n n) u R))) *)
rewrite !mulmx_sum_row !linear_sum mulmx_suml; apply: eq_bigr => i _ /=.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A) *)
(* Goal: @eq (matrix (GRing.Field.sort F) n n) (@mulmx (GRing.Field.ringType F) n n n (@vec_mx (GRing.Field.sort F) n n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) (@fun_of_matrix (GRing.Field.sort F) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Field.sort F) m (muln n n) i R))) B) (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) n n n B (@vec_mx (GRing.Field.sort F) n n (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln n n)) (@fun_of_matrix (GRing.Field.sort F) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Field.sort F) m (muln n n) i R)))) *)
by rewrite !linearZ -scalemxAl /= cEB.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n A B) (@mulmx (GRing.Field.ringType F) n n n B A) *)
by rewrite cEB // vec_mxK row_sub.
Qed.
Arguments cent_mxP {m n B R}.
Lemma scalar_mx_cent m n a (R : 'A_(m, n)) : (a%:M \in 'C(R))%MS.
Proof.
(* Goal: is_true (@submx F (S O) (muln n n) (muln n n) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) n n (@scalar_mx (GRing.Field.ringType F) n a)) (@cent_mx m n R)) *)
by apply/cent_mxP=> A _; apply: scalar_mxC.
Qed.
Lemma center_mx_sub m n (R : 'A_(m, n)) : ('Z(R) <= R)%MS.
Proof.
(* Goal: is_true (@submx F (expn n (S (S O))) m (expn n (S (S O))) (@center_mx m n R) R) *)
exact: capmxSl.
Qed.
Lemma center_mxP m n A (R : 'A_(m, n)) :
reflect (A \in R /\ forall B, B \in R -> B *m A = A *m B)
(A \in 'Z(R))%MS.
Proof.
(* Goal: Bool.reflect (and (is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n A) R)) (forall (B : matrix (GRing.Field.sort F) n n) (_ : is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n B) R)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n B A) (@mulmx (GRing.Field.ringType F) n n n A B))) (@submx F (S O) (expn n (S (S O))) (muln n n) (@mxvec (GRing.Field.sort F) n n A) (@center_mx m n R)) *)
rewrite sub_capmx; case R_A: (A \in R); last by right; case.
(* Goal: Bool.reflect (and (is_true true) (forall (B : matrix (GRing.Field.sort F) n n) (_ : is_true (@submx F (S O) m (muln n n) (@mxvec (GRing.Field.sort F) n n B) R)), @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n B A) (@mulmx (GRing.Field.ringType F) n n n A B))) (andb true (@submx F (S O) (muln n n) (expn n (S (S O))) (@mxvec (GRing.Field.sort F) n n A) (@cent_mx m n R))) *)
by apply: (iffP cent_mxP) => [cAR | [_ cAR]].
Qed.
Arguments center_mxP {m n A R}.
Lemma mxring_id_uniq m n (R : 'A_(m, n)) e1 e2 :
mxring_id R e1 -> mxring_id R e2 -> e1 = e2.
Proof.
(* Goal: forall (_ : @mxring_id m n R e1) (_ : @mxring_id m n R e2), @eq (Equality.sort (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) n n))) e1 e2 *)
by case=> [_ Re1 idRe1 _] [_ Re2 _ ide2R]; rewrite -(idRe1 _ Re2) ide2R.
Qed.
Lemma cent_mx_ideal m n (R : 'A_(m, n)) : left_mx_ideal 'C(R)%MS 'C(R)%MS.
Proof.
(* Goal: is_true (@left_mx_ideal (muln n n) (muln n n) n (@cent_mx m n R) (@cent_mx m n R)) *)
apply/mulsmx_subP=> A1 A2 C_A1 C_A2; apply/cent_mxP=> B R_B.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) n n) (@mulmx (GRing.Field.ringType F) n n n B (@mulmx (GRing.Field.ringType F) n n n A1 A2)) (@mulmx (GRing.Field.ringType F) n n n (@mulmx (GRing.Field.ringType F) n n n A1 A2) B) *)
by rewrite mulmxA (cent_mxP C_A1) // -!mulmxA (cent_mxP C_A2).
Qed.
Lemma cent_mx_ring m n (R : 'A_(m, n)) : n > 0 -> mxring 'C(R)%MS.
Lemma mxdirect_adds_center m1 m2 n (R1 : 'A_(m1, n)) (R2 : 'A_(m2, n)) :
mx_ideal (R1 + R2)%MS R1 -> mx_ideal (R1 + R2)%MS R2 ->
mxdirect (R1 + R2) ->
('Z((R1 + R2)%MS) :=: 'Z(R1) + 'Z(R2))%MS.
Lemma mxdirect_sums_center (I : finType) m n (R : 'A_(m, n)) R_ :
(\sum_i R_ i :=: R)%MS -> mxdirect (\sum_i R_ i) ->
(forall i : I, mx_ideal R (R_ i)) ->
('Z(R) :=: \sum_i 'Z(R_ i))%MS.
End MatrixAlgebra.
Arguments mulsmx {F m1%N m2%N n%N} R1%MS R2%MS.
Arguments left_mx_ideal {F m1%N m2%N n%N} R%MS S%MS : rename.
Arguments right_mx_ideal {F m1%N m2%N n%N} R%MS S%MS : rename.
Arguments mx_ideal {F m1%N m2%N n%N} R%MS S%MS : rename.
Arguments mxring_id {F m%N n%N} R%MS e%R.
Arguments has_mxring_id {F m%N n%N} R%MS.
Arguments mxring {F m%N n%N} R%MS.
Arguments cent_mx {F m%N n%N} R%MS.
Arguments center_mx {F m%N n%N} R%MS.
Notation "A \in R" := (submx (mxvec A) R) : matrix_set_scope.
Notation "R * S" := (mulsmx R S) : matrix_set_scope.
Notation "''C' ( R )" := (cent_mx R) : matrix_set_scope.
Notation "''C_' R ( S )" := (R :&: 'C(S))%MS : matrix_set_scope.
Notation "''C_' ( R ) ( S )" := ('C_R(S))%MS (only parsing) : matrix_set_scope.
Notation "''Z' ( R )" := (center_mx R) : matrix_set_scope.
Arguments memmx_subP {F m1 m2 n R1 R2}.
Arguments memmx_eqP {F m1 m2 n R1 R2}.
Arguments memmx_addsP {F m1 m2 n} A [R1 R2].
Arguments memmx_sumsP {F I P n A R_}.
Arguments mulsmx_subP {F m1 m2 m n R1 R2 R}.
Arguments mulsmxP {F m1 m2 n A R1 R2}.
Arguments mxring_idP F {m n R}.
Arguments cent_rowP {F m n B R}.
Arguments cent_mxP {F m n B R}.
Arguments center_mxP {F m n A R}.
Section MapMatrixSpaces.
Variables (aF rF : fieldType) (f : {rmorphism aF -> rF}).
Local Notation "A ^f" := (map_mx f A) : ring_scope.
Lemma Gaussian_elimination_map m n (A : 'M_(m, n)) :
Gaussian_elimination A^f = ((col_ebase A)^f, (row_ebase A)^f, \rank A).
Proof.
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) m m) (matrix (GRing.Field.sort rF) n n)) nat) (@Gaussian_elimination rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) (@pair (prod (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m m) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n)) nat (@pair (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m m) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m m (@col_ebase aF m n A)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@row_ebase aF m n A))) (@mxrank aF m n A)) *)
rewrite mxrankE /row_ebase /col_ebase unlock.
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) m m) (matrix (GRing.Field.sort rF) n n)) nat) (@Gaussian_elimination rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) (@pair (prod (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m m) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n)) nat (@pair (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m m) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m m (@fst (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n) (@fst (prod (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n)) nat (@Gaussian_elimination aF m n A)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@snd (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n) (@fst (prod (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n)) nat (@Gaussian_elimination aF m n A))))) (@snd (prod (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n)) nat (@Gaussian_elimination aF m n A))) *)
elim: m n A => [|m IHm] [|n] A /=; rewrite ?map_mx1 //.
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat) match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType rF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination rF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType rF) m n) (@drsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A)))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))))) in @pair (prod (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort rF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))) L)) (@xcol (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort rF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType rF) (S O) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType rF) (S m) (GRing.one (GRing.Field.ringType rF))) (@scalar_mx (GRing.Field.ringType rF) (S n) (GRing.one (GRing.Field.ringType rF)))) O end (@pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S m) (@fst (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n) (S n) (@snd (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end)))) (@snd (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end)) *)
set pAnz := [pred k | A k.1 k.2 != 0].
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat) match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType rF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination rF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType rF) m n) (@drsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A)))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))))) in @pair (prod (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort rF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))) L)) (@xcol (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort rF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType rF) (S O) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType rF) (S m) (GRing.one (GRing.Field.ringType rF))) (@scalar_mx (GRing.Field.ringType rF) (S n) (GRing.one (GRing.Field.ringType rF)))) O end (@pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S m) (@fst (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n) (S n) (@snd (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end)))) (@snd (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end)) *)
rewrite (@eq_pick _ _ pAnz) => [|k]; last by rewrite /= mxE fmorph_eq0.
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat) match @pick (prod_finType (ordinal_finType (S m)) (ordinal_finType (S n))) (@pred_of_simpl (prod (ordinal (S m)) (ordinal (S n))) pAnz) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination rF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType rF) m n) (@drsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A)))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))))) in @pair (prod (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort rF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))) L)) (@xcol (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort rF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType rF) (S O) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType rF) (S m) (GRing.one (GRing.Field.ringType rF))) (@scalar_mx (GRing.Field.ringType rF) (S n) (GRing.one (GRing.Field.ringType rF)))) O end (@pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S m) (@fst (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n) (S n) (@snd (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end)))) (@snd (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType aF)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@scalar_mx (GRing.Field.ringType aF) (S m) (GRing.one (GRing.Field.ringType aF))) (@scalar_mx (GRing.Field.ringType aF) (S n) (GRing.one (GRing.Field.ringType aF)))) O end)) *)
case: {+}(pick _) => [[i j]|]; last by rewrite !map_mx1.
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat) (let 'pair (pair L U as p) r := @Gaussian_elimination rF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType rF) m n) (@drsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A)))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))))) in @pair (prod (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort rF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType rF) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A))))) L)) (@xcol (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort rF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType rF) (S O) (@fun_of_matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A) i j)) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort rF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S n) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n (S O))) U))) (S r)) (@pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S m) (@fst (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r))))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n) (S n) (@snd (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r)))))) (@snd (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r)))) *)
rewrite mxE -fmorphV -map_xcol -map_xrow -map_dlsubmx -map_drsubmx.
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat) (let 'pair (pair L U as p) r := @Gaussian_elimination rF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType rF) m n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (Phant (forall _ : GRing.Field.sort aF, GRing.UnitRing.sort (GRing.Field.unitRingType rF))) f (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (S O) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))))) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (addn (S O) m) (addn (S O) n) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))))))) in @pair (prod (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort rF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) m (S O)) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (Phant (forall _ : GRing.Field.sort aF, GRing.UnitRing.sort (GRing.Field.unitRingType rF))) f (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (S O) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))))) L)) (@xcol (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort rF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType rF) (S O) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j))) (@ursubmx (GRing.Field.sort rF) (S O) m (S O) n (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (addn (S O) m) (addn (S O) n) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n (S O))) U))) (S r)) (@pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S m) (@fst (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r))))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n) (S n) (@snd (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r)))))) (@snd (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r)))) *)
rewrite -map_ursubmx -map_mxZ -map_mxM -map_mx_sub {}IHm /=.
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat) (@pair (prod (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort rF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) (S O) m)) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (S O) (@GRing.scale (GRing.Field.ringType aF) (matrix_lmodType (GRing.Field.ringType aF) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m m (@fst (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n) (@fst (prod (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n)) nat (@Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType aF) m n) (@mulmx (GRing.Field.ringType aF) m (S O) n (@GRing.scale (GRing.Field.ringType aF) (matrix_lmodType (GRing.Field.ringType aF) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))))))))) (@xcol (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort rF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType rF) (S O) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S O) n (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n (S O))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@snd (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n) (@fst (prod (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n)) nat (@Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType aF) m n) (@mulmx (GRing.Field.ringType aF) m (S O) n (@GRing.scale (GRing.Field.ringType aF) (matrix_lmodType (GRing.Field.ringType aF) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))))))))))))) (S (@snd (prod (matrix (GRing.Field.sort aF) m m) (matrix (GRing.Field.sort aF) n n)) nat (@Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Field.zmodType aF) m n) (@mulmx (GRing.Field.ringType aF) m (S O) n (@GRing.scale (GRing.Field.ringType aF) (matrix_lmodType (GRing.Field.ringType aF) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))))))) (@pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S m) (@fst (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r))))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n) (S n) (@snd (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n)) (@fst (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r)))))) (@snd (prod (matrix (GRing.Field.sort aF) (S m) (S m)) (matrix (GRing.Field.sort aF) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination aF m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType aF) m n) (@drsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))))) in @pair (prod (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L)) (@xcol (GRing.Field.sort aF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U))) (S r)))) *)
case: {+}(Gaussian_elimination _) => [[L U] r] /=; rewrite map_xrow map_xcol.
(* Goal: @eq (prod (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat) (@pair (prod (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort rF) (addn (S O) m) (addn (S O) m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort rF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType rF))) (S O) m)) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.UnitRing.ringType (GRing.Field.unitRingType rF)) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (S O) (@GRing.scale (GRing.Field.ringType aF) (matrix_lmodType (GRing.Field.ringType aF) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m m L))) (@xcol (GRing.Field.sort rF) (addn (S O) n) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort rF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType rF) (S O) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f (@fun_of_matrix (GRing.Field.sort aF) (S m) (S n) A i j))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S O) n (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n (S O))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n U)))) (S r)) (@pair (prod (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort rF) (S m) (S m)) (matrix (GRing.Field.sort rF) (S n) (S n)) (@xrow (GRing.Field.sort rF) (S m) (S m) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S m) (S m) (@block_mx (GRing.Field.sort aF) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType aF)) m (S O)) (@GRing.inv (GRing.Field.unitRingType aF) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@dlsubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A)))) L))) (@xcol (GRing.Field.sort rF) (S n) (S n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n) (S n) (@block_mx (GRing.Field.sort aF) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType aF) (S O) (@fun_of_matrix (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) A i j)) (@ursubmx (GRing.Field.sort aF) (S O) m (S O) n (@xrow (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort aF) (addn (S O) m) (addn (S O) n) j (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) A))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n (S O))) U)))) (S r)) *)
by rewrite !(@map_block_mx _ _ f 1 _ 1) !map_mx0 ?map_mx1 ?map_scalar_mx.
Qed.
Lemma mxrank_map m n (A : 'M_(m, n)) : \rank A^f = \rank A.
Proof.
(* Goal: @eq nat (@mxrank rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) (@mxrank aF m n A) *)
by rewrite mxrankE Gaussian_elimination_map.
Qed.
Lemma row_free_map m n (A : 'M_(m, n)) : row_free A^f = row_free A.
Proof.
(* Goal: @eq bool (@row_free rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) (@row_free aF m n A) *)
by rewrite /row_free mxrank_map.
Qed.
Lemma row_full_map m n (A : 'M_(m, n)) : row_full A^f = row_full A.
Proof.
(* Goal: @eq bool (@row_full rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) (@row_full aF m n A) *)
by rewrite /row_full mxrank_map.
Qed.
Lemma map_row_ebase m n (A : 'M_(m, n)) : (row_ebase A)^f = row_ebase A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@row_ebase aF m n A)) (@row_ebase rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) *)
by rewrite {2}/row_ebase unlock Gaussian_elimination_map.
Qed.
Lemma map_col_ebase m n (A : 'M_(m, n)) : (col_ebase A)^f = col_ebase A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m m) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m m (@col_ebase aF m n A)) (@col_ebase rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) *)
by rewrite {2}/col_ebase unlock Gaussian_elimination_map.
Qed.
Lemma map_row_base m n (A : 'M_(m, n)) :
(row_base A)^f = castmx (mxrank_map A, erefl n) (row_base A^f).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@mxrank aF m n A) n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@mxrank aF m n A) n (@row_base aF m n A)) (@castmx (GRing.Field.sort rF) (@mxrank rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) n (@mxrank aF m n A) n (@pair (@eq nat (@mxrank rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) (@mxrank aF m n A)) (@eq nat n n) (@mxrank_map m n A) (@Logic.eq_refl nat n)) (@row_base rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A))) *)
move: (mxrank_map A); rewrite {2}/row_base mxrank_map => eqrr.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@mxrank aF m n A) n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@mxrank aF m n A) n (@row_base aF m n A)) (@castmx (GRing.Field.sort rF) (@mxrank aF m n A) n (@mxrank aF m n A) n (@pair (@eq nat (@mxrank aF m n A) (@mxrank aF m n A)) (@eq nat n n) eqrr (@Logic.eq_refl nat n)) (@mulmx (GRing.Field.ringType rF) (@mxrank aF m n A) n n (@pid_mx (GRing.Field.ringType rF) (@mxrank aF m n A) n (@mxrank aF m n A)) (@row_ebase rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)))) *)
by rewrite castmx_id map_mxM map_pid_mx map_row_ebase.
Qed.
Lemma map_col_base m n (A : 'M_(m, n)) :
(col_base A)^f = castmx (erefl m, mxrank_map A) (col_base A^f).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m (@mxrank aF m n A)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (@mxrank aF m n A) (@col_base aF m n A)) (@castmx (GRing.Field.sort rF) m (@mxrank rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) m (@mxrank aF m n A) (@pair (@eq nat m m) (@eq nat (@mxrank rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) (@mxrank aF m n A)) (@Logic.eq_refl nat m) (@mxrank_map m n A)) (@col_base rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A))) *)
move: (mxrank_map A); rewrite {2}/col_base mxrank_map => eqrr.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m (@mxrank aF m n A)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (@mxrank aF m n A) (@col_base aF m n A)) (@castmx (GRing.Field.sort rF) m (@mxrank aF m n A) m (@mxrank aF m n A) (@pair (@eq nat m m) (@eq nat (@mxrank aF m n A) (@mxrank aF m n A)) (@Logic.eq_refl nat m) eqrr) (@mulmx (GRing.Field.ringType rF) m m (@mxrank aF m n A) (@col_ebase rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) (@pid_mx (GRing.Field.ringType rF) m (@mxrank aF m n A) (@mxrank aF m n A)))) *)
by rewrite castmx_id map_mxM map_pid_mx map_col_ebase.
Qed.
Lemma map_pinvmx m n (A : 'M_(m, n)) : (pinvmx A)^f = pinvmx A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n m) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n m (@pinvmx aF m n A)) (@pinvmx rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) *)
rewrite !map_mxM !map_invmx map_row_ebase map_col_ebase.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n m) (@mulmx (GRing.Field.ringType rF) n m m (@mulmx (GRing.Field.ringType rF) n n m (@invmx (GRing.Field.comUnitRingType rF) n (@row_ebase rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType aF), GRing.Ring.sort (GRing.Field.ringType rF))) f) n m (@pid_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType aF))) n m (@mxrank aF m n A)))) (@invmx (GRing.Field.comUnitRingType rF) m (@col_ebase rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)))) (@pinvmx rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) *)
by rewrite map_pid_mx -mxrank_map.
Qed.
Lemma map_kermx m n (A : 'M_(m, n)) : (kermx A)^f = kermx A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m m) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m m (@kermx aF m n A)) (@kermx rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) *)
by rewrite !map_mxM map_invmx map_col_ebase -mxrank_map map_copid_mx.
Qed.
Lemma map_cokermx m n (A : 'M_(m, n)) : (cokermx A)^f = cokermx A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@cokermx aF m n A)) (@cokermx rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) *)
by rewrite !map_mxM map_invmx map_row_ebase -mxrank_map map_copid_mx.
Qed.
Lemma map_submx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A^f <= B^f)%MS = (A <= B)%MS.
Proof.
(* Goal: @eq bool (@submx rF m1 m2 n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m2 n B)) (@submx aF m1 m2 n A B) *)
by rewrite !submxE -map_cokermx -map_mxM map_mx_eq0.
Qed.
Lemma map_ltmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A^f < B^f)%MS = (A < B)%MS.
Proof.
(* Goal: @eq bool (@ltmx rF m1 m2 n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m2 n B)) (@ltmx aF m1 m2 n A B) *)
by rewrite /ltmx !map_submx.
Qed.
Lemma map_eqmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(A^f :=: B^f)%MS <-> (A :=: B)%MS.
Proof.
(* Goal: iff (@eqmx rF m1 m2 n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m2 n B)) (@eqmx aF m1 m2 n A B) *)
split=> [/eqmxP|eqAB]; first by rewrite !map_submx => /eqmxP.
(* Goal: @eqmx rF m1 m2 n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m2 n B) *)
by apply/eqmxP; rewrite !map_submx !eqAB !submx_refl.
Qed.
Lemma map_genmx m n (A : 'M_(m, n)) : (<<A>>^f :=: <<A^f>>)%MS.
Proof.
(* Goal: @eqmx rF n n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@genmx aF m n A)) (@genmx rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) *)
by apply/eqmxP; rewrite !(genmxE, map_submx) andbb.
Qed.
Lemma map_addsmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(((A + B)%MS)^f :=: A^f + B^f)%MS.
Proof.
(* Goal: @eqmx rF n n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@addsmx aF m1 m2 n A B)) (@addsmx rF m1 m2 n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m2 n B)) *)
by apply/eqmxP; rewrite !addsmxE -map_col_mx !map_submx !addsmxE andbb.
Qed.
Lemma map_capmx_gen m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
(capmx_gen A B)^f = capmx_gen A^f B^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (addn m1 m2) n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (addn m1 m2) n (@capmx_gen aF m1 m2 n A B)) (@capmx_gen rF m1 m2 n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m2 n B)) *)
by rewrite map_mxM map_lsubmx map_kermx map_col_mx.
Qed.
Lemma map_capmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
((A :&: B)^f :=: A^f :&: B^f)%MS.
Proof.
(* Goal: @eqmx rF n n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@capmx aF m1 m2 n A B)) (@capmx rF m1 m2 n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m2 n B)) *)
by apply/eqmxP; rewrite !capmxE -map_capmx_gen !map_submx -!capmxE andbb.
Qed.
Lemma map_complmx m n (A : 'M_(m, n)) : (A^C^f = A^f^C)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@complmx aF m n A)) (@complmx rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m n A)) *)
by rewrite map_mxM map_row_ebase -mxrank_map map_copid_mx.
Qed.
Lemma map_diffmx m1 m2 n (A : 'M_(m1, n)) (B : 'M_(m2, n)) :
((A :\: B)^f :=: A^f :\: B^f)%MS.
Proof.
(* Goal: @eqmx rF n n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@diffmx aF m1 m2 n A B)) (@diffmx rF m1 m2 n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m2 n B)) *)
apply/eqmxP; rewrite !diffmxE -map_capmx_gen -map_complmx.
(* Goal: is_true (andb (@submx rF n n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@diffmx aF m1 m2 n A B)) (@capmx rF m1 n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@complmx aF (addn m1 m2) n (@capmx_gen aF m1 m2 n A B))))) (@submx rF n n n (@capmx rF m1 n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m1 n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@complmx aF (addn m1 m2) n (@capmx_gen aF m1 m2 n A B)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@diffmx aF m1 m2 n A B)))) *)
by rewrite -!map_capmx !map_submx -!diffmxE andbb.
Qed.
Lemma map_eigenspace n (g : 'M_n) a : (eigenspace g a)^f = eigenspace g^f (f a).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@eigenspace aF n g a)) (@eigenspace rF n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n g) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f a)) *)
by rewrite map_kermx map_mx_sub ?map_scalar_mx.
Qed.
Lemma eigenvalue_map n (g : 'M_n) a : eigenvalue g^f (f a) = eigenvalue g a.
Proof.
(* Goal: @eq bool (@eigenvalue rF n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n g) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f a)) (@eigenvalue aF n g a) *)
by rewrite /eigenvalue -map_eigenspace map_mx_eq0.
Qed.
Lemma memmx_map m n A (E : 'A_(m, n)) : (A^f \in E^f)%MS = (A \in E)%MS.
Proof.
(* Goal: @eq bool (@submx rF (S O) m (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n A)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (expn n (S (S O))) E)) (@submx aF (S O) m (muln n n) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) n n A) E) *)
by rewrite -map_mxvec map_submx.
Qed.
Lemma map_mulsmx m1 m2 n (E1 : 'A_(m1, n)) (E2 : 'A_(m2, n)) :
((E1 * E2)%MS^f :=: E1^f * E2^f)%MS.
Lemma map_cent_mx m n (E : 'A_(m, n)) : ('C(E)%MS)^f = 'C(E^f)%MS.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (muln n n) (muln n n)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (muln n n) (muln n n) (@cent_mx aF m n E)) (@cent_mx rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (expn n (S (S O))) E)) *)
rewrite map_kermx //; congr (kermx _); apply: map_lin_mx => // A.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) m (muln n n)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType aF), GRing.Ring.sort (GRing.Field.ringType rF))) f) m (muln n n) (@cent_mx_fun aF m n E A)) (@cent_mx_fun rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (expn n (S (S O))) E) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType aF), GRing.Ring.sort (GRing.Field.ringType rF))) f) n n A)) *)
rewrite map_mxM //; congr (_ *m _); apply: map_lin_mx => //= B.
(* Goal: @eq (matrix (GRing.Field.sort rF) n n) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n n) (@mulmx (GRing.Field.ringType aF) n n n B A) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) n n) (@mulmx (GRing.Field.ringType aF) n n n A B)))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n n) (@mulmx (GRing.Field.ringType rF) n n n (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n B) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n A)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType rF)) n n) (@mulmx (GRing.Field.ringType rF) n n n (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n A) (@map_mx (GRing.Field.sort aF) (GRing.Field.sort rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) n n B)))) *)
by rewrite map_mx_sub ? map_mxM.
Qed.
Lemma map_center_mx m n (E : 'A_(m, n)) : (('Z(E))^f :=: 'Z(E^f))%MS.
Proof.
(* Goal: @eqmx rF (expn n (S (S O))) (expn n (S (S O))) (expn n (S (S O))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (expn n (S (S O))) (expn n (S (S O))) (@center_mx aF m n E)) (@center_mx rF m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) m (expn n (S (S O))) E)) *)
by rewrite /center_mx -map_cent_mx; apply: map_capmx.
Qed.
End MapMatrixSpaces.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelNC.
Require Export GeoCoq.Elements.OriginalProofs.lemma_crossimpliesopposite.
Require Export GeoCoq.Elements.OriginalProofs.proposition_34.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCdistinct.
Section Euclid.
Context `{Ax:euclidean_euclidean}.
Lemma lemma_diagonalsbisect :
forall A B C D,
PG A B C D ->
exists X, Midpoint A X C /\ Midpoint B X D.
Proof.
(* Goal: forall (A B C D : @Point Ax0) (_ : @PG Ax0 A B C D), @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
let Tf:=fresh in assert (Tf:exists M, (BetS A M C /\ BetS B M D)) by (conclude lemma_diagonalsmeet);destruct Tf as [M];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert ((Par A B C D /\ Par A D B C)) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq A C) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq B D) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CR A C B D) by (conclude_def CR ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Par A B C D) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Par A B D C) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol A B D) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (TS A B D C) by (forward_using lemma_crossimpliesopposite).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Par B A D C) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (BetS C M A) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (BetS D M B) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CR B D A C) by (conclude_def CR ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol A B C) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol B A C) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (TS B A C D) by (forward_using lemma_crossimpliesopposite).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Cong A B D C) by (forward_using proposition_34).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Cong A B C D) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (~ Col M A B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
(* Goal: not (@Col Ax0 M A B) *)
{
(* Goal: not (@Col Ax0 M A B) *)
intro.
(* Goal: False *)
assert (Col A M C) by (conclude_def Col ).
(* Goal: False *)
assert (Col M A C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq A M) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq M A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A B C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (nCol A B C) by (forward_using lemma_parallelNC).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Triangle M A B) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (~ Col M C D).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
(* Goal: not (@Col Ax0 M C D) *)
{
(* Goal: not (@Col Ax0 M C D) *)
intro.
(* Goal: False *)
assert (Col A M C) by (conclude_def Col ).
(* Goal: False *)
assert (Col M C A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq M C) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col C D A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A C D) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (nCol A C D) by (forward_using lemma_parallelNC).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Triangle M C D) by (conclude_def Triangle ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Par B A C D) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B A C A C D) by (conclude proposition_29B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B A C B A C) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Out A C M) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol A B C) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq A B) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Out A B B) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B A C B A M) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B A M B A C) by (conclude lemma_equalanglessymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B A M A C D) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (eq D D) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol A C D) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq C D) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq C A) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Out C D D) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Out C A M) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A C D A C D) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A C D M C D) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B A M M C D) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol A C D) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Col A M C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Col A C M) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Col A C C) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq M C) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol M C D) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA M C D D C M) by (conclude lemma_ABCequalsCBA).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B A M D C M) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Par A B D C) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A B D B D C) by (conclude proposition_29B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A B D A B D) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Out B D M) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol B A D) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq B A) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Out B A A) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A B D A B M) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A B M A B D) by (conclude lemma_equalanglessymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A B M B D C) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol B D C) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq D C) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq D B) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Out D C C) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Out D B M) by (conclude lemma_ray4).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B D C B D C) by (conclude lemma_equalanglesreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA B D C M D C) by (conclude lemma_equalangleshelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A B M M D C) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol B D C) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Col B M D) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Col B D M) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (eq D D) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Col B D D) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (neq M D) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (nCol M D C) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA M D C C D M) by (conclude lemma_ABCequalsCBA).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA A B M C D M) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (CongA M A B M C D) by (conclude lemma_equalanglesflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert ((Cong M A M C /\ Cong M B M D /\ CongA A M B C M D)) by (conclude proposition_26A).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Cong A M M C) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Cong B M M D) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Midpoint A M C) by (conclude_def Midpoint ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
assert (Midpoint B M D) by (conclude_def Midpoint ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Midpoint Ax0 A X C) (@Midpoint Ax0 B X D)) *)
close.
Qed.
End Euclid.
|
From Coq Require Import ssreflect ssrbool ssrfun.
From mathcomp Require Import ssrnat eqtype seq path.
From fcsl Require Import prelude ordtype pcm finmap unionmap.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Module Type NMSig.
Parameter tp : Type -> Type.
Section Params.
Variable A : Type.
Notation tp := (tp A).
Parameter nm_undef : tp.
Parameter defined : tp -> bool.
Parameter empty : tp.
Parameter upd : nat -> A -> tp -> tp.
Parameter dom : tp -> seq nat.
Parameter dom_eq : tp -> tp -> bool.
Parameter free : nat -> tp -> tp.
Parameter find : nat -> tp -> option A.
Parameter union : tp -> tp -> tp.
Parameter nm_filter : pred nat -> tp -> tp.
Parameter empb : tp -> bool.
Parameter undefb : tp -> bool.
Parameter pts : nat -> A -> tp.
Parameter from : tp -> @UM.base nat_ordType A (fun x => x != 0).
Parameter to : @UM.base nat_ordType A (fun x => x != 0) -> tp.
Axiom ftE : forall b, from (to b) = b.
Axiom tfE : forall f, to (from f) = f.
Axiom undefE : nm_undef = to (@UM.Undef nat_ordType A (fun x => x != 0)).
Axiom defE : forall f, defined f = UM.valid (from f).
Axiom emptyE : empty = to (@UM.empty nat_ordType A (fun x => x != 0)).
Axiom updE : forall k v f, upd k v f = to (UM.upd k v (from f)).
Axiom domE : forall f, dom f = UM.dom (from f).
Axiom dom_eqE : forall f1 f2, dom_eq f1 f2 = UM.dom_eq (from f1) (from f2).
Axiom freeE : forall k f, free k f = to (UM.free k (from f)).
Axiom findE : forall k f, find k f = UM.find k (from f).
Axiom unionE : forall f1 f2, union f1 f2 = to (UM.union (from f1) (from f2)).
Axiom nmfiltE : forall q f, nm_filter q f = to (UM.um_filter q (from f)).
Axiom empbE : forall f, empb f = UM.empb (from f).
Axiom undefbE : forall f, undefb f = UM.undefb (from f).
Axiom ptsE : forall k v, pts k v = to (@UM.pts nat_ordType A (fun x => x != 0) k v).
End Params.
End NMSig.
Module NMDef : NMSig.
Section NMDef.
Variable A : Type.
Definition nonz x := x != 0.
Definition tp : Type := @UM.base nat_ordType A nonz.
Definition nm_undef := @UM.Undef nat_ordType A nonz.
Definition defined f := @UM.valid nat_ordType A nonz f.
Definition empty := @UM.empty nat_ordType A nonz.
Definition upd k v f := @UM.upd nat_ordType A nonz k v f.
Definition dom f := @UM.dom nat_ordType A nonz f.
Definition dom_eq f1 f2 := @UM.dom_eq nat_ordType A nonz f1 f2.
Definition free k f := @UM.free nat_ordType A nonz k f.
Definition find k f := @UM.find nat_ordType A nonz k f.
Definition union f1 f2 := @UM.union nat_ordType A nonz f1 f2.
Definition nm_filter q f := @UM.um_filter nat_ordType A nonz q f.
Definition empb f := @UM.empb nat_ordType A nonz f.
Definition undefb f := @UM.undefb nat_ordType A nonz f.
Definition pts k v := @UM.pts nat_ordType A nonz k v.
Definition from (f : tp) : @UM.base nat_ordType A nonz := f.
Definition to (b : @UM.base nat_ordType A nonz) : tp := b.
Lemma tfE f : to (from f) = f. Proof. by []. Qed.
Proof.
(* Goal: @eq tp (to (from f)) f *)
by [].
Qed.
Lemma defE f : defined f = UM.valid (from f). Proof. by []. Qed.
Proof.
(* Goal: @eq bool (defined f) (@UM.valid nat_ordType A nonz (from f)) *)
by [].
Qed.
Lemma updE k v f : upd k v f = to (UM.upd k v (from f)). Proof. by []. Qed.
Proof.
(* Goal: @eq (@UM.base nat_ordType A nonz) (upd k v f) (to (@UM.upd nat_ordType A nonz k v (from f))) *)
by [].
Qed.
Lemma dom_eqE f1 f2 : dom_eq f1 f2 = UM.dom_eq (from f1) (from f2).
Proof.
(* Goal: @eq bool (dom_eq f1 f2) (@UM.dom_eq nat_ordType A nonz (from f1) (from f2)) *)
by [].
Qed.
Lemma freeE k f : free k f = to (UM.free k (from f)). Proof. by []. Qed.
Proof.
(* Goal: @eq (@UM.base nat_ordType A nonz) (free k f) (to (@UM.free nat_ordType A nonz k (from f))) *)
by [].
Qed.
Lemma unionE f1 f2 : union f1 f2 = to (UM.union (from f1) (from f2)).
Proof.
(* Goal: @eq (@UM.base nat_ordType A nonz) (union f1 f2) (to (@UM.union nat_ordType A nonz (from f1) (from f2))) *)
by [].
Qed.
Lemma nmfiltE q f : nm_filter q f = to (UM.um_filter q (from f)).
Proof.
(* Goal: @eq (@UM.base nat_ordType A nonz) (nm_filter q f) (to (@UM.um_filter nat_ordType A nonz q (from f))) *)
by [].
Qed.
Lemma empbE f : empb f = UM.empb (from f). Proof. by []. Qed.
Proof.
(* Goal: @eq bool (empb f) (@UM.empb nat_ordType A nonz (from f)) *)
by [].
Qed.
Lemma ptsE k v : pts k v = to (@UM.pts nat_ordType A nonz k v).
Proof.
(* Goal: @eq (@UM.base nat_ordType A nonz) (pts k v) (to (@UM.pts nat_ordType A nonz k v)) *)
by [].
Qed.
End NMDef.
End NMDef.
Notation natmap := NMDef.tp.
Definition natmapMixin A :=
UMCMixin (@NMDef.ftE A) (@NMDef.tfE A) (@NMDef.defE A)
(@NMDef.undefE A) (@NMDef.emptyE A) (@NMDef.updE A)
(@NMDef.domE A) (@NMDef.dom_eqE A) (@NMDef.freeE A)
(@NMDef.findE A) (@NMDef.unionE A) (@NMDef.nmfiltE A)
(@NMDef.empbE A) (@NMDef.undefbE A) (@NMDef.ptsE A).
Canonical nat_mapUMC A :=
Eval hnf in UMC (natmap A) (@natmapMixin A).
Definition nat_mapPCMMix A := union_map_classPCMMix (nat_mapUMC A).
Canonical nat_mapPCM A := Eval hnf in PCM (natmap A) (@nat_mapPCMMix A).
Definition nat_mapCPCMMix A := union_map_classCPCMMix (nat_mapUMC A).
Canonical nat_mapCPCM A := Eval hnf in CPCM (natmap A) (@nat_mapCPCMMix A).
Definition nat_mapTPCMMix A := union_map_classTPCMMix (nat_mapUMC A).
Canonical nat_mapTPCM A := Eval hnf in TPCM (natmap A) (@nat_mapTPCMMix A).
Definition nat_map_eqMix (A : eqType) :=
@union_map_class_eqMix nat_ordType A _ _ (@natmapMixin A).
Canonical nat_map_eqType (A : eqType) :=
Eval hnf in EqType (natmap A) (@nat_map_eqMix A).
Definition nm_pts A (k : nat) (v : A) :=
@UMC.pts nat_ordType A (@nat_mapUMC A) k v.
Notation "x \-> v" := (@nm_pts _ x v) (at level 30).
Lemma nm_dom0 A (h : natmap A) : (h = um_undef \/ h = Unit) <-> (dom h = [::]).
Proof.
(* Goal: iff (or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A)))) (@eq (list (Ordered.sort nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h) (@Datatypes.nil (Ordered.sort nat_ordType))) *)
split=>[|E]; first by case=>->; rewrite ?dom_undef ?dom0.
(* Goal: or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A))) *)
case V : (valid h); last by move/invalidE: (negbT V)=>->; left.
(* Goal: or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A))) *)
by rewrite (dom0E V) ?E //; right.
Qed.
Section FreshLastKey.
Variable A : Type.
Implicit Type h : natmap A.
Definition last_key h := last 0 (dom h).
Definition fresh h := (last_key h).+1.
Lemma lastkey_undef : last_key um_undef = 0.
Proof.
(* Goal: @eq nat (last_key (@UMC.um_undef nat_ordType A (nat_mapUMC A))) O *)
by rewrite /last_key !umEX.
Qed.
Lemma lastkey0 : last_key Unit = 0.
Proof.
(* Goal: @eq nat (last_key (@PCM.unit (nat_mapPCM A))) O *)
by rewrite /last_key /Unit /= !umEX.
Qed.
Lemma lastkey_dom h : valid h -> last_key h \notin dom h -> h = Unit.
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) h)) (_ : is_true (negb (@in_mem nat (last_key h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))))), @eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A)) *)
rewrite /valid /= /last_key /Unit /= !umEX /= -{4}[h]UMC.tfE.
(* Goal: forall (_ : is_true (@UM.valid nat_ordType A (fun x : nat => negb (@eq_op (Ordered.eqType nat_ordType) x O)) (@UMC.from nat_ordType A (nat_mapUMC A) h))) (_ : is_true (negb (@in_mem nat (@last nat O (@UM.dom nat_ordType A (fun x : nat => negb (@eq_op (Ordered.eqType nat_ordType) x O)) (@UMC.from nat_ordType A (nat_mapUMC A) h))) (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UM.dom nat_ordType A (fun x : nat => negb (@eq_op (Ordered.eqType nat_ordType) x O)) (@UMC.from nat_ordType A (nat_mapUMC A) h)))))), @eq (NMDef.tp A) (@UMC.to nat_ordType A (nat_mapUMC A) (@UMC.from nat_ordType A (nat_mapUMC A) h)) (@UMC.to nat_ordType A (nat_mapUMC A) (@UM.empty nat_ordType A (@pred_of_simpl nat (@UMC.cond nat_ordType A (nat_mapUMC A))))) *)
case: (UMC.from h)=>//=; case=>s H /= H1 _ /seq_last_in.
(* Goal: forall _ : @eq (list (Equality.sort nat_eqType)) (@supp nat_ordType A (@FinMap nat_ordType A s H)) (@Datatypes.nil (Equality.sort nat_eqType)), @eq (NMDef.tp A) (@UMC.to nat_ordType A (nat_mapUMC A) (@UM.Def nat_ordType A (fun x : nat => negb (@eq_op (Ordered.eqType nat_ordType) x O)) (@FinMap nat_ordType A s H) H1)) (@UMC.to nat_ordType A (nat_mapUMC A) (@UM.empty nat_ordType A (@pred_of_simpl nat (@UMC.cond nat_ordType A (nat_mapUMC A))))) *)
rewrite /UM.empty UMC.eqE UM.umapE /supp fmapE /= {H H1}.
(* Goal: forall _ : @eq (list nat) (@map (prod nat A) nat (@key nat_ordType A) s) (@Datatypes.nil nat), @eq (list (prod nat A)) s (@Datatypes.nil (prod nat A)) *)
by elim: s.
Qed.
Lemma dom_lastkey0P h : last_key h = 0 <-> dom h = [::].
Proof.
(* Goal: iff (@eq nat (last_key h) O) (@eq (list (Ordered.sort nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h) (@Datatypes.nil (Ordered.sort nat_ordType))) *)
rewrite -nm_dom0; split; last first.
(* Goal: forall _ : @eq nat (last_key h) O, or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A))) *)
(* Goal: forall _ : or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A))), @eq nat (last_key h) O *)
-
(* Goal: forall _ : @eq nat (last_key h) O, or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A))) *)
(* Goal: forall _ : or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A))), @eq nat (last_key h) O *)
by case=>E; subst h; rewrite ?lastkey_undef ?lastkey0.
(* Goal: forall _ : @eq nat (last_key h) O, or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A))) *)
move=>E; case V : (valid h); last by left; move/invalidE: (negbT V).
(* Goal: or (@eq (NMDef.tp A) h (@UMC.um_undef nat_ordType A (nat_mapUMC A))) (@eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A))) *)
right; apply: lastkey_dom=>//; rewrite E.
(* Goal: is_true (negb (@in_mem nat O (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))) *)
by apply: contraT; rewrite negbK; apply: dom_cond.
Qed.
Lemma dom_lastkey h : valid h -> ~~ empb h -> last_key h \in dom h.
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) h)) (_ : is_true (negb (@UMC.empb nat_ordType A (nat_mapUMC A) h))), is_true (@in_mem nat (last_key h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
by move=>X; apply: contraR; move/(lastkey_dom X)=>->; apply/empbP.
Qed.
Lemma lastkeyxx h : valid h -> last_key h = 0 -> h = Unit.
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) h)) (_ : @eq nat (last_key h) O), @eq (NMDef.tp A) h (@PCM.unit (nat_mapPCM A)) *)
by move=>V H; apply: lastkey_dom V _; apply/negP=>/dom_cond; rewrite H.
Qed.
Lemma dom_lastkeyE h a : a < last_key h -> last_key h \in dom h.
Proof.
(* Goal: forall _ : is_true (leq (S a) (last_key h)), is_true (@in_mem nat (last_key h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
move=>H; case V : (valid h); last first.
(* Goal: is_true (@in_mem nat (last_key h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
(* Goal: is_true (@in_mem nat (last_key h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
-
(* Goal: is_true (@in_mem nat (last_key h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
(* Goal: is_true (@in_mem nat (last_key h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
by move/invalidE: (negbT V) H=>->; rewrite lastkey_undef.
(* Goal: is_true (@in_mem nat (last_key h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
by apply: dom_lastkey V (contraL _ H)=>/empbE ->; rewrite lastkey0.
Qed.
Lemma lastkey_max h x : x \in dom h -> x <= last_key h.
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))), is_true (leq x (last_key h)) *)
rewrite /last_key /= !umEX; case: (UMC.from h)=>//; case=>s H _ /=.
(* Goal: forall _ : is_true (@in_mem nat x (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@supp nat_ordType A (@FinMap nat_ordType A s H)))), is_true (leq x (@last nat O (@supp nat_ordType A (@FinMap nat_ordType A s H)))) *)
rewrite /supp /ord /= (leq_eqVlt x) orbC.
(* Goal: forall _ : is_true (@in_mem nat x (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@map (prod nat A) nat (@key nat_ordType A) s))), is_true (orb (leq (S x) (@last nat O (@map (prod nat A) nat (@key nat_ordType A) s))) (@eq_op nat_eqType x (@last nat O (@map (prod nat A) nat (@key nat_ordType A) s)))) *)
by apply: sorted_last_key_max (sorted_oleq H).
Qed.
Lemma max_lastkey h x :
x \in dom h -> {in dom h, forall y, y <= x} -> last_key h = x.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))) (_ : @prop_in1 (Equality.sort (Ordered.eqType nat_ordType)) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)) (fun y : nat => is_true (leq y x)) (inPhantom (forall y : nat, is_true (leq y x)))), @eq nat (last_key h) x *)
rewrite /last_key !umEX; case: (UMC.from h)=>//; case=>s H _ /=.
(* Goal: forall (_ : is_true (@in_mem nat x (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@supp nat_ordType A (@FinMap nat_ordType A s H))))) (_ : @prop_in1 nat (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@supp nat_ordType A (@FinMap nat_ordType A s H))) (fun y : nat => is_true (leq y x)) (inPhantom (forall y : nat, is_true (leq y x)))), @eq nat (@last nat O (@supp nat_ordType A (@FinMap nat_ordType A s H))) x *)
move=>H1 /= H2; apply: sorted_max_key_last (sorted_oleq H) H1 _.
(* Goal: forall (z : Equality.sort (Ordered.eqType nat_ordType)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) z (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@map (prod (Ordered.sort nat_ordType) A) (Ordered.sort nat_ordType) (@key nat_ordType A) s)))), is_true (@oleq nat_ordType z x) *)
by move=>z /(H2 z); rewrite leq_eqVlt orbC.
Qed.
Lemma lastkeyPt (x : nat) v : x != 0 -> last_key (x \-> v) = x.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op nat_eqType x O)), @eq nat (last_key (@nm_pts A x v)) x *)
by rewrite /last_key domPtK /= => ->.
Qed.
Lemma hist_path h : path oleq 0 (dom h).
Proof.
(* Goal: is_true (@path (Ordered.sort nat_ordType) (@oleq nat_ordType) O (@UMC.dom nat_ordType A (nat_mapUMC A) h)) *)
rewrite !umEX; case: (UMC.from h)=>// {h} h /= _; case: h; case=>//= x s H.
(* Goal: is_true (andb (@oleq nat_ordType O (@key nat_ordType A x)) (@path nat (@oleq nat_ordType) (@key nat_ordType A x) (@map (prod nat A) nat (@key nat_ordType A) s))) *)
rewrite {1}/oleq /ord /= orbC -leq_eqVlt /=.
(* Goal: is_true (@path nat (@oleq nat_ordType) (@key nat_ordType A x) (@map (prod nat A) nat (@key nat_ordType A) s)) *)
by apply: sub_path H=>z y; rewrite /oleq=>->.
Qed.
Lemma lastkey_mono h1 h2 :
{subset dom h1 <= dom h2} -> last_key h1 <= last_key h2.
Proof.
(* Goal: forall _ : @sub_mem (Equality.sort (Ordered.eqType nat_ordType)) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h1)) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h2)), is_true (leq (last_key h1) (last_key h2)) *)
by rewrite leq_eqVlt orbC; apply: seq_last_mono; apply: hist_path.
Qed.
Lemma lastkeyfUn h1 h2 :
valid (h1 \+ h2) -> last_key h1 <= last_key (h1 \+ h2).
Proof.
(* Goal: forall _ : is_true (@PCM.valid (nat_mapPCM A) (@PCM.join (nat_mapPCM A) h1 h2)), is_true (leq (last_key h1) (last_key (@PCM.join (nat_mapPCM A) h1 h2))) *)
by move=>X; apply: lastkey_mono=>x; rewrite domUn inE X => ->.
Qed.
Lemma lastkeyUnf h1 h2 :
valid (h1 \+ h2) -> last_key h2 <= last_key (h1 \+ h2).
Proof.
(* Goal: forall _ : is_true (@PCM.valid (nat_mapPCM A) (@PCM.join (nat_mapPCM A) h1 h2)), is_true (leq (last_key h2) (last_key (@PCM.join (nat_mapPCM A) h1 h2))) *)
by rewrite joinC; apply: lastkeyfUn.
Qed.
Lemma lastkeyUn_mono h1 h2 t :
valid (h1 \+ h2) -> last_key (h1 \+ h2) < t -> last_key h1 < t.
Lemma lastkeyUn0 h1 h2 :
valid (h1 \+ h2) ->
last_key h1 = last_key h2 -> (h1 = Unit) * (h2 = Unit).
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) (@PCM.join (nat_mapPCM A) h1 h2))) (_ : @eq nat (last_key h1) (last_key h2)), prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
move=>V E.
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
case E1: (empb h1).
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
-
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
move/empbE: E1 E V=>->; rewrite unitL lastkey0.
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
(* Goal: forall (_ : @eq nat O (last_key h2)) (_ : is_true (@PCM.valid (nat_mapPCM A) h2)), prod (@eq (NMDef.tp A) (@PCM.unit (@union_map_classPCM nat_ordType A (nat_mapUMC A))) (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
by case/esym/dom_lastkey0P/nm_dom0=>-> //; rewrite valid_undef.
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
case E2: (empb h2).
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
-
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
move/empbE: E2 E V=>->; rewrite unitR lastkey0.
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
(* Goal: forall (_ : @eq nat (last_key h1) O) (_ : is_true (@PCM.valid (nat_mapPCM A) h1)), prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) (@PCM.unit (@union_map_classPCM nat_ordType A (nat_mapUMC A))) (@PCM.unit (nat_mapPCM A))) *)
by case/dom_lastkey0P/nm_dom0=>-> //; rewrite valid_undef.
(* Goal: prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
case: validUn (V)=>// _ _ /(_ _ (dom_lastkey (validL V) (negbT E1))).
(* Goal: forall (_ : is_true (negb (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) (last_key h1) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h2))))) (_ : is_true true), prod (@eq (NMDef.tp A) h1 (@PCM.unit (nat_mapPCM A))) (@eq (NMDef.tp A) h2 (@PCM.unit (nat_mapPCM A))) *)
by rewrite E (dom_lastkey (validR V) (negbT E2)).
Qed.
Lemma lastkeyUn h1 h2 :
last_key (h1 \+ h2) =
if valid (h1 \+ h2) then maxn (last_key h1) (last_key h2) else 0.
Lemma lastkeyPtUn h t u :
valid h -> last_key h < t -> valid (t \-> u \+ h).
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) h)) (_ : is_true (leq (S (last_key h)) t)), is_true (@PCM.valid (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A t u) h)) *)
move=>V L; rewrite validPtUn; apply/and3P; split=>//=.
(* Goal: is_true (negb (@in_mem nat t (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))) *)
(* Goal: is_true (negb (@eq_op (Ordered.eqType nat_ordType) t O)) *)
-
(* Goal: is_true (negb (@in_mem nat t (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))) *)
(* Goal: is_true (negb (@eq_op (Ordered.eqType nat_ordType) t O)) *)
by rewrite -lt0n; apply: leq_ltn_trans L.
(* Goal: is_true (negb (@in_mem nat t (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))) *)
by apply: contraL L; move/lastkey_max; case: leqP.
Qed.
Lemma dom_ordfresh h x : x \in dom h -> x < fresh h.
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))), is_true (leq (S x) (fresh h)) *)
by move/lastkey_max.
Qed.
Lemma dom_freshn h n : fresh h + n \notin dom h.
Proof.
(* Goal: is_true (negb (@in_mem nat (addn (fresh h) n) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))) *)
by apply: contra (@dom_ordfresh _ _) _; rewrite -leqNgt leq_addr.
Qed.
Lemma dom_freshUn h1 h2 : valid h1 -> [pcm h2 <= h1] -> fresh h1 \notin dom h2.
Lemma dom_fresh h : fresh h \notin dom h.
Proof.
(* Goal: is_true (negb (@in_mem nat (fresh h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))) *)
by move: (dom_freshn h 0); rewrite addn0.
Qed.
Lemma valid_freshUn h1 h2 v :
valid h1 -> [pcm h2 <= h1] -> valid (fresh h1 \-> v \+ h2) = valid h2.
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) h1)) (_ : @pcm_preord (nat_mapPCM A) h2 h1), @eq bool (@PCM.valid (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h1) v) h2)) (@PCM.valid (nat_mapPCM A) h2) *)
move=>V [x E]; rewrite {h1}E in V *.
by rewrite validPtUn dom_freshUn // andbT.
Qed.
Qed.
Lemma valid_fresh h v : valid (fresh h \-> v \+ h) = valid h.
Proof.
(* Goal: @eq bool (@PCM.valid (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h) v) h)) (@PCM.valid (nat_mapPCM A) h) *)
by rewrite validPtUn dom_fresh andbT.
Qed.
Lemma lastkey_freshUn h1 h2 v :
valid h1 -> [pcm h2 <= h1] ->
last_key (fresh h1 \-> v \+ h2) = fresh h1.
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) h1)) (_ : @pcm_preord (nat_mapPCM A) h2 h1), @eq nat (last_key (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h1) v) h2)) (fresh h1) *)
move=>V [x E]; rewrite {h1}E in V *.
apply: max_lastkey=>[|y] /=.
-
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) h1)) (_ : @pcm_preord (nat_mapPCM A) h2 h1), @eq nat (last_key (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h1) v) h2)) (fresh h1) *)
by rewrite domUn inE valid_freshUn // (validL V) domPt inE eq_refl.
rewrite domUn inE valid_freshUn // (validL V) /= domPt inE /= eq_sym.
rewrite leq_eqVlt; case: eqP=>//= _ D.
by apply: lastkey_max; rewrite domUn inE V D.
Qed.
Qed.
Lemma lastkey_fresh h v : valid h -> last_key (fresh h \-> v \+ h) = fresh h.
Proof.
(* Goal: forall _ : is_true (@PCM.valid (nat_mapPCM A) h), @eq nat (last_key (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h) v) h)) (fresh h) *)
move=>Vf; apply: max_lastkey=>[|x] /=.
(* Goal: forall _ : is_true (@in_mem nat x (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h) v) h)))), is_true (leq x (fresh h)) *)
(* Goal: is_true (@in_mem nat (fresh h) (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h) v) h)))) *)
-
(* Goal: forall _ : is_true (@in_mem nat x (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h) v) h)))), is_true (leq x (fresh h)) *)
(* Goal: is_true (@in_mem nat (fresh h) (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h) v) h)))) *)
by rewrite domUn inE valid_fresh Vf domPt inE eq_refl.
(* Goal: forall _ : is_true (@in_mem nat x (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (fresh h) v) h)))), is_true (leq x (fresh h)) *)
rewrite domUn inE /= valid_fresh Vf /= domPt inE /= eq_sym.
(* Goal: forall _ : is_true (orb (@eq_op (Ordered.eqType nat_ordType) x (fresh h)) (@in_mem nat x (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))), is_true (leq x (fresh h)) *)
by rewrite leq_eqVlt; case: eqP=>//= _; apply: dom_ordfresh.
Qed.
Lemma umpleq_lastkey h1 h2 :
valid h2 -> [pcm h1 <= h2] -> last_key h1 <= last_key h2.
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM A) h2)) (_ : @pcm_preord (nat_mapPCM A) h1 h2), is_true (leq (last_key h1) (last_key h2)) *)
by move=>V H; case: H V=>z->V; apply: lastkey_mono=>k D; rewrite domUn inE V D.
Qed.
Lemma valid_indb (P : natmap A -> Prop) :
P Unit ->
(forall u, P (1 \-> u)) ->
(forall t u h, P h -> last_key h < t ->
valid (t \-> u \+ h) -> P (t \-> u \+ h)) ->
forall h, valid h -> P h.
Lemma valid_indf (P : natmap A -> Prop) :
P Unit ->
(forall t u h, P h ->
(forall x, x \in dom h -> t < x) ->
valid (t \-> u \+ h) -> P (t \-> u \+ h)) ->
forall h, valid h -> P h.
Proof.
(* Goal: forall (_ : P (@PCM.unit (nat_mapPCM A))) (_ : forall (t : nat) (u : A) (h : NMDef.tp A) (_ : P h) (_ : forall (x : Equality.sort (Ordered.eqType nat_ordType)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))), is_true (leq (S t) x)) (_ : is_true (@PCM.valid (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A t u) h))), P (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A t u) h)) (h : NMDef.tp A) (_ : is_true (@PCM.valid (nat_mapPCM A) h)), P h *)
move=>H1 H2; elim/um_indf=>//=.
(* Goal: forall (k : nat) (v : A) (f : NMDef.tp A) (_ : forall _ : is_true (@PCM.valid (nat_mapPCM A) f), P f) (_ : is_true (@PCM.valid (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f))) (_ : is_true (@path nat (@ord nat_ordType) k (@UMC.dom nat_ordType A (nat_mapUMC A) f))) (_ : is_true (@PCM.valid (nat_mapPCM A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f))), P (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f) *)
(* Goal: forall _ : is_true (@PCM.valid (nat_mapPCM A) (@UMC.um_undef nat_ordType A (nat_mapUMC A))), P (@UMC.um_undef nat_ordType A (nat_mapUMC A)) *)
-
(* Goal: forall (k : nat) (v : A) (f : NMDef.tp A) (_ : forall _ : is_true (@PCM.valid (nat_mapPCM A) f), P f) (_ : is_true (@PCM.valid (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f))) (_ : is_true (@path nat (@ord nat_ordType) k (@UMC.dom nat_ordType A (nat_mapUMC A) f))) (_ : is_true (@PCM.valid (nat_mapPCM A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f))), P (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f) *)
(* Goal: forall _ : is_true (@PCM.valid (nat_mapPCM A) (@UMC.um_undef nat_ordType A (nat_mapUMC A))), P (@UMC.um_undef nat_ordType A (nat_mapUMC A)) *)
by rewrite -[valid _]negbK; move/negP/invalidE.
(* Goal: forall (k : nat) (v : A) (f : NMDef.tp A) (_ : forall _ : is_true (@PCM.valid (nat_mapPCM A) f), P f) (_ : is_true (@PCM.valid (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f))) (_ : is_true (@path nat (@ord nat_ordType) k (@UMC.dom nat_ordType A (nat_mapUMC A) f))) (_ : is_true (@PCM.valid (nat_mapPCM A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f))), P (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f) *)
move=>k v f H V K _.
(* Goal: P (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k v) f) *)
apply: H2=>//; first by apply: H (validR V).
(* Goal: forall (x : Equality.sort (Ordered.eqType nat_ordType)) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) f)))), is_true (leq (S k) x) *)
move=>x; move/(order_path_min (@ordtype.trans _)): K.
(* Goal: forall (_ : is_true (@all (Equality.sort (Ordered.eqType nat_ordType)) (@ord nat_ordType k) (@UMC.dom nat_ordType A (nat_mapUMC A) f))) (_ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) f)))), is_true (leq (S k) x) *)
by case: allP=>// X _; apply: X.
Qed.
End FreshLastKey.
Section Gapless.
Variable A : Type.
Implicit Type h : natmap A.
Definition gapless h := forall k, 0 < k <= last_key h -> k \in dom h.
Lemma gp_undef : gapless um_undef.
Proof.
(* Goal: gapless (@UMC.um_undef nat_ordType A (nat_mapUMC A)) *)
by move=>k; rewrite lastkey_undef; case: k.
Qed.
Lemma gp0 : gapless Unit.
Proof.
(* Goal: gapless (@PCM.unit (nat_mapPCM A)) *)
by move=>k; rewrite lastkey0; case: k.
Qed.
Lemma gp_fresh h u : gapless (fresh h \-> u \+ h) <-> gapless h.
Proof.
(* Goal: iff (gapless (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)) (gapless h) *)
case V : (valid h); last first.
(* Goal: iff (gapless (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)) (gapless h) *)
(* Goal: iff (gapless (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)) (gapless h) *)
-
(* Goal: iff (gapless (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)) (gapless h) *)
(* Goal: iff (gapless (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)) (gapless h) *)
by move/invalidE: (negbT V)=>->; rewrite join_undefR.
(* Goal: iff (gapless (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)) (gapless h) *)
split=>H k; move: (V); rewrite -(valid_fresh _ u)=>V'; last first.
(* Goal: forall _ : is_true (andb (leq (S O) k) (leq k (@last_key A h))), is_true (@in_mem nat k (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
(* Goal: forall _ : is_true (andb (leq (S O) k) (leq k (@last_key A (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)))), is_true (@in_mem nat k (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)))) *)
-
(* Goal: forall _ : is_true (andb (leq (S O) k) (leq k (@last_key A h))), is_true (@in_mem nat k (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
(* Goal: forall _ : is_true (andb (leq (S O) k) (leq k (@last_key A (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)))), is_true (@in_mem nat k (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A (@fresh A h) u) h)))) *)
rewrite lastkey_fresh // domPtUn inE V' /= (leq_eqVlt k) eq_sym.
(* Goal: forall _ : is_true (andb (leq (S O) k) (leq k (@last_key A h))), is_true (@in_mem nat k (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
(* Goal: forall _ : is_true (andb (leq (S O) k) (orb (@eq_op nat_eqType (@fresh A h) k) (leq (S k) (@fresh A h)))), is_true (orb (@eq_op (Ordered.eqType nat_ordType) (@fresh A h) k) (@in_mem nat k (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))) *)
by move: (H k); rewrite -(ltnS k); case: ltngtP.
(* Goal: forall _ : is_true (andb (leq (S O) k) (leq k (@last_key A h))), is_true (@in_mem nat k (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
rewrite -(ltnS k) -/(fresh h); case/andP=>Z N.
(* Goal: is_true (@in_mem nat k (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
move: (H k); rewrite lastkey_fresh // domPtUn inE V' Z /= leq_eqVlt eq_sym.
(* Goal: forall _ : forall _ : is_true (orb (@eq_op nat_eqType (@fresh A h) k) (leq (S k) (@fresh A h))), is_true (orb (@eq_op (Ordered.eqType nat_ordType) (@fresh A h) k) (@in_mem nat k (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h)))), is_true (@in_mem nat k (@mem nat (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))) *)
by case: ltngtP N=>//= _ _; apply.
Qed.
Lemma gpPtUn h k u :
valid (k \-> u \+ h) ->
gapless (k \-> u \+ h) -> last_key h < k -> k = fresh h.
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A k u) h))) (_ : gapless (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A k u) h)) (_ : is_true (leq (S (@last_key A h)) k)), @eq nat k (@fresh A h) *)
move=>V C N; apply/eqP/contraT=>X.
(* Goal: is_true false *)
have Y : fresh h < k by rewrite leq_eqVlt eq_sym (negbTE X) in N.
(* Goal: is_true false *)
suff Z : last_key (k \-> u \+ h) = k.
(* Goal: @eq nat (@last_key A (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A k u) h)) k *)
(* Goal: is_true false *)
-
(* Goal: @eq nat (@last_key A (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A k u) h)) k *)
(* Goal: is_true false *)
move: (C (fresh h)); rewrite Z (leq_eqVlt _ k) Y orbT andbT => /(_ erefl).
(* Goal: @eq nat (@last_key A (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A k u) h)) k *)
(* Goal: forall _ : is_true (@in_mem nat (@fresh A h) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A k u) h)))), is_true false *)
rewrite domPtUn inE (negbTE X) /=; case/andP=>_ /dom_ordfresh.
(* Goal: @eq nat (@last_key A (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A k u) h)) k *)
(* Goal: forall _ : is_true (leq (S (@fresh A h)) (@fresh A h)), is_true false *)
by rewrite ltnn.
(* Goal: @eq nat (@last_key A (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@nm_pts A k u) h)) k *)
apply: max_lastkey (find_some (findPtUn V)) _ => x.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@PCM.join (@union_map_classPCM nat_ordType A (nat_mapUMC A)) (@UMC.pts nat_ordType A (nat_mapUMC A) k u) h)))), is_true (leq x k) *)
rewrite domUn inE; case/andP=>_ /orP [].
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))), is_true (leq x k) *)
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@UMC.pts nat_ordType A (nat_mapUMC A) k u)))), is_true (leq x k) *)
-
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))), is_true (leq x k) *)
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) (@UMC.pts nat_ordType A (nat_mapUMC A) k u)))), is_true (leq x k) *)
by rewrite domPt inE; case/andP=>_ /eqP ->.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (Ordered.eqType nat_ordType)) x (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType A (nat_mapUMC A) h))), is_true (leq x k) *)
by move/lastkey_max/leq_ltn_trans/(_ N)/ltnW.
Qed.
End Gapless.
Arguments gp_fresh [A][h] u.
Section AtVal.
Variable A : Type.
Implicit Type h : natmap (A * A).
Definition atval v t h := oapp snd v (find t h).
Lemma umpleq_atval v t h1 h2 :
gapless h1 -> valid h2 -> [pcm h1 <= h2] -> t <= last_key h1 ->
atval v t h2 = atval v t h1.
Proof.
(* Goal: forall (_ : @gapless (prod A A) h1) (_ : is_true (@PCM.valid (nat_mapPCM (prod A A)) h2)) (_ : @pcm_preord (nat_mapPCM (prod A A)) h1 h2) (_ : is_true (leq t (@last_key (prod A A) h1))), @eq A (atval v t h2) (atval v t h1) *)
move=>G V H K; rewrite /atval; case E1 : (find t h1)=>[a|].
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) t h2)) (@Option.apply (prod A A) A (@snd A A) v (@None (prod A A))) *)
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) t h2)) (@Option.apply (prod A A) A (@snd A A) v (@Some (prod A A) a)) *)
-
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) t h2)) (@Option.apply (prod A A) A (@snd A A) v (@None (prod A A))) *)
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) t h2)) (@Option.apply (prod A A) A (@snd A A) v (@Some (prod A A) a)) *)
by rewrite (umpleq_some V H E1).
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) t h2)) (@Option.apply (prod A A) A (@snd A A) v (@None (prod A A))) *)
case: t K E1 => [|t] K E1; last by move: (G t.+1 K) (find_none E1)=>->.
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) O h2)) (@Option.apply (prod A A) A (@snd A A) v (@None (prod A A))) *)
by case E2 : (find 0 h2)=>//; move/find_some/dom_cond: E2.
Qed.
Definition last_val v h := atval v (last_key h) h.
Lemma lastval0 v : last_val v Unit = v.
Proof.
(* Goal: @eq A (last_val v (@PCM.unit (nat_mapPCM (prod A A)))) v *)
by rewrite /last_val /atval lastkey0 find0E.
Qed.
Lemma lastvalPt v p x : p != 0 -> last_val v (p \-> x) = x.2.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op nat_eqType p O)), @eq A (last_val v (@nm_pts (prod A A) p x)) (@snd A A x) *)
by move=>V; rewrite /last_val /atval lastkeyPt // findPt /= V.
Qed.
Lemma lastval_fresh v x h :
valid h -> last_val v (fresh h \-> x \+ h) = x.2.
Proof.
(* Goal: forall _ : is_true (@PCM.valid (nat_mapPCM (prod A A)) h), @eq A (last_val v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h)) (@snd A A x) *)
by move=>V; rewrite /last_val /atval lastkey_fresh // findPtUn // valid_fresh.
Qed.
Lemma lastvalUn v h1 h2 :
last_val v (h1 \+ h2) =
if valid (h1 \+ h2) then
if last_key h1 < last_key h2 then last_val v h2 else last_val v h1
else v.
Proof.
(* Goal: @eq A (last_val v (@PCM.join (nat_mapPCM (prod A A)) h1 h2)) (if @PCM.valid (nat_mapPCM (prod A A)) (@PCM.join (nat_mapPCM (prod A A)) h1 h2) then if leq (S (@last_key (prod A A) h1)) (@last_key (prod A A) h2) then last_val v h2 else last_val v h1 else v) *)
rewrite /last_val /atval lastkeyUn maxnC /maxn.
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (if @PCM.valid (nat_mapPCM (prod A A)) (@PCM.join (nat_mapPCM (prod A A)) h1 h2) then if leq (S (@last_key (prod A A) h2)) (@last_key (prod A A) h1) then @last_key (prod A A) h1 else @last_key (prod A A) h2 else O) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (if @PCM.valid (nat_mapPCM (prod A A)) (@PCM.join (nat_mapPCM (prod A A)) h1 h2) then if leq (S (@last_key (prod A A) h1)) (@last_key (prod A A) h2) then @Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) h2) else @Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1) else v) *)
case: ifP; last by move/negbT/invalidE=>->; rewrite find_undef.
(* Goal: forall _ : is_true (@PCM.valid (nat_mapPCM (prod A A)) (@PCM.join (nat_mapPCM (prod A A)) h1 h2)), @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (if leq (S (@last_key (prod A A) h2)) (@last_key (prod A A) h1) then @last_key (prod A A) h1 else @last_key (prod A A) h2) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (if leq (S (@last_key (prod A A) h1)) (@last_key (prod A A) h2) then @Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) h2) else @Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
case: ltngtP=>N V.
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) h2)) *)
-
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) h2)) *)
by rewrite findUnR // (dom_lastkeyE N).
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
-
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
by rewrite findUnL // (dom_lastkeyE N).
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h2) (@PCM.join (nat_mapPCM (prod A A)) h1 h2))) (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h1) h1)) *)
by rewrite !(lastkeyUn0 V N) unitL lastkey0 find0E.
Qed.
Lemma lastval_freshUn v x h1 h2 :
valid h1 -> [pcm h2 <= h1] ->
last_val v (fresh h1 \-> x \+ h2) = x.2.
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (nat_mapPCM (prod A A)) h1)) (_ : @pcm_preord (nat_mapPCM (prod A A)) h2 h1), @eq A (last_val v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h1) x) h2)) (@snd A A x) *)
move=>V H; rewrite /last_val /atval.
(* Goal: @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h1) x) h2)) (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h1) x) h2))) (@snd A A x) *)
rewrite lastkey_freshUn // findPtUn // valid_freshUn //.
(* Goal: is_true (@PCM.valid (nat_mapPCM (prod A A)) h2) *)
by case: H V=>h -> /validL.
Qed.
End AtVal.
Section Continuous.
Variable A : Type.
Implicit Type h : natmap (A * A).
Definition continuous v h :=
forall k x, find k.+1 h = Some x -> oapp snd v (find k h) = x.1.
Lemma cn_undef v : continuous v um_undef.
Proof.
(* Goal: continuous v (@UMC.um_undef nat_ordType (prod A A) (nat_mapUMC (prod A A))) *)
by move=>x w; rewrite find_undef.
Qed.
Lemma cn0 v : continuous v Unit.
Proof.
(* Goal: continuous v (@PCM.unit (nat_mapPCM (prod A A))) *)
by move=>x w; rewrite find0E.
Qed.
Lemma cn_fresh v h x :
valid h ->
continuous v (fresh h \-> x \+ h) <->
continuous v h /\ last_val v h = x.1.
Proof.
(* Goal: forall _ : is_true (@PCM.valid (nat_mapPCM (prod A A)) h), iff (continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h)) (and (continuous v h) (@eq A (@last_val A v h) (@fst A A x))) *)
rewrite -(valid_fresh _ x)=>V; split; last first.
(* Goal: forall _ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h), and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)) *)
(* Goal: forall _ : and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)), continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h) *)
-
(* Goal: forall _ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h), and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)) *)
(* Goal: forall _ : and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)), continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h) *)
case=>C H k y; rewrite !findPtUn2 // eqSS; case: ltngtP=>N.
(* Goal: forall _ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h), and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)) *)
(* Goal: forall _ : @eq (option (prod A A)) (@Some (prod A A) x) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
-
(* Goal: forall _ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h), and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)) *)
(* Goal: forall _ : @eq (option (prod A A)) (@Some (prod A A) x) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
by rewrite ltn_eqF; [apply: C | apply: (ltn_trans N _)].
(* Goal: forall _ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h), and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)) *)
(* Goal: forall _ : @eq (option (prod A A)) (@Some (prod A A) x) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
-
(* Goal: forall _ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h), and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)) *)
(* Goal: forall _ : @eq (option (prod A A)) (@Some (prod A A) x) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
by move/find_some /dom_ordfresh /(ltn_trans N); rewrite ltnn.
(* Goal: forall _ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h), and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)) *)
(* Goal: forall _ : @eq (option (prod A A)) (@Some (prod A A) x) (@Some (prod A A) y), @eq A (@Option.apply (prod A A) A (@snd A A) v (if @eq_op (Ordered.eqType nat_ordType) k (@fresh (prod A A) h) then @Some (prod A A) x else @UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A y) *)
by case=><-; rewrite N ltn_eqF.
(* Goal: forall _ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h), and (continuous v h) (@eq A (@last_val A v h) (@fst A A x)) *)
move=>C; split; last first.
(* Goal: continuous v h *)
(* Goal: @eq A (@last_val A v h) (@fst A A x) *)
-
(* Goal: continuous v h *)
(* Goal: @eq A (@last_val A v h) (@fst A A x) *)
move: (C (last_key h) x).
(* Goal: continuous v h *)
(* Goal: forall _ : forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S (@last_key (prod A A) h)) (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h)) (@Some (prod A A) x), @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@last_key (prod A A) h) (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h))) (@fst A A x), @eq A (@last_val A v h) (@fst A A x) *)
by rewrite !findPtUn2 // eq_refl ltn_eqF //; apply.
(* Goal: continuous v h *)
move=>k w; case: (ltnP k (last_key h))=>N; last first.
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) w), @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A w) *)
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) w), @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A w) *)
-
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) w), @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A w) *)
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) w), @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A w) *)
by move/find_some /dom_ordfresh /(leq_ltn_trans N); rewrite ltnn.
(* Goal: forall _ : @eq (option (prod A A)) (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) (S k) h) (@Some (prod A A) w), @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) (@fst A A w) *)
by move: (C k w); rewrite !findPtUn2 // eqSS !ltn_eqF // (ltn_trans N _).
Qed.
Lemma cn_sub v h x y k :
valid (k.+1 \-> (x, y) \+ h) -> continuous v (k.+1 \-> (x, y) \+ h) ->
Proof.
(* Goal: forall (_ : is_true (@PCM.valid (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (S k) (@pair A A x y)) h))) (_ : continuous v (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (S k) (@pair A A x y)) h)), @eq A (@Option.apply (prod A A) A (@snd A A) v (@UMC.find nat_ordType (prod A A) (nat_mapUMC (prod A A)) k h)) x *)
by move=>V /(_ k (x, y)); rewrite !findPtUn2 // eq_refl ltn_eqF //; apply.
Qed.
End Continuous.
Arguments cn_fresh [A][v][h][x] _.
Section Complete.
Variable A : Type.
Implicit Type h : natmap (A * A).
Definition complete v0 h vn :=
[/\ valid h, gapless h, continuous v0 h & last_val v0 h = vn].
Lemma cm_valid v0 h vn : complete v0 h vn -> valid h.
Proof.
(* Goal: forall _ : complete v0 h vn, is_true (@PCM.valid (nat_mapPCM (prod A A)) h) *)
by case.
Qed.
Lemma cm0 v : complete v Unit v.
Proof.
(* Goal: complete v (@PCM.unit (nat_mapPCM (prod A A))) v *)
by split=>//; [apply: gp0 | apply: cn0 | rewrite lastval0].
Qed.
Lemma cm_fresh v0 vn h x :
complete v0 (fresh h \-> x \+ h) vn <-> vn = x.2 /\ complete v0 h x.1.
Proof.
(* Goal: iff (complete v0 (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h) vn) (and (@eq A vn (@snd A A x)) (complete v0 h (@fst A A x))) *)
split.
(* Goal: forall _ : and (@eq A vn (@snd A A x)) (complete v0 h (@fst A A x)), complete v0 (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h) vn *)
(* Goal: forall _ : complete v0 (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h) vn, and (@eq A vn (@snd A A x)) (complete v0 h (@fst A A x)) *)
-
(* Goal: forall _ : and (@eq A vn (@snd A A x)) (complete v0 h (@fst A A x)), complete v0 (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h) vn *)
(* Goal: forall _ : complete v0 (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h) vn, and (@eq A vn (@snd A A x)) (complete v0 h (@fst A A x)) *)
by case=>/validR V /gp_fresh G /(cn_fresh V) []; rewrite lastval_fresh.
(* Goal: forall _ : and (@eq A vn (@snd A A x)) (complete v0 h (@fst A A x)), complete v0 (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) (@fresh (prod A A) h) x) h) vn *)
case=>-> [V] /(gp_fresh x) G C E; split=>//; by [rewrite valid_fresh | apply/(cn_fresh V) | rewrite lastval_fresh].
Qed.
Lemma cmPtUn v0 vn h k x :
complete v0 (k \-> x \+ h) vn -> last_key h < k -> k = fresh h.
Proof.
(* Goal: forall (_ : complete v0 (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) k x) h) vn) (_ : is_true (leq (S (@last_key (prod A A) h)) k)), @eq nat k (@fresh (prod A A) h) *)
by case=>V /(gpPtUn V).
Qed.
Lemma cmPt v0 vn k x : complete v0 (k \-> x) vn -> k = 1 /\ x = (v0, vn).
Proof.
(* Goal: forall _ : complete v0 (@nm_pts (prod A A) k x) vn, and (@eq nat k (S O)) (@eq (prod A A) x (@pair A A v0 vn)) *)
case; rewrite validPt; case: k=>//= k _ /(_ 1).
(* Goal: forall (_ : forall _ : is_true (andb (leq (S O) (S O)) (leq (S O) (@last_key (prod A A) (@nm_pts (prod A A) (S k) x)))), is_true (@in_mem nat (S O) (@mem (Equality.sort (Ordered.eqType nat_ordType)) (seq_predType (Ordered.eqType nat_ordType)) (@UMC.dom nat_ordType (prod A A) (nat_mapUMC (prod A A)) (@nm_pts (prod A A) (S k) x))))) (_ : @continuous A v0 (@nm_pts (prod A A) (S k) x)) (_ : @eq A (@last_val A v0 (@nm_pts (prod A A) (S k) x)) vn), and (@eq nat (S k) (S O)) (@eq (prod A A) x (@pair A A v0 vn)) *)
rewrite lastkeyPt //= domPt inE /= => /(_ (erefl _))/eqP ->.
(* Goal: forall (_ : @continuous A v0 (@nm_pts (prod A A) (S O) x)) (_ : @eq A (@last_val A v0 (@nm_pts (prod A A) (S O) x)) vn), and (@eq nat (S O) (S O)) (@eq (prod A A) x (@pair A A v0 vn)) *)
move/(_ 0 x); rewrite findPt findPt2 /= => -> //.
(* Goal: forall _ : @eq A (@last_val A (@fst A A x) (@nm_pts (prod A A) (S O) x)) vn, and (@eq nat (S O) (S O)) (@eq (prod A A) x (@pair A A (@fst A A x) vn)) *)
by rewrite /last_val lastkeyPt // /atval findPt /= => <-; case: x.
Qed.
Lemma cmCons v0 vn k x h :
complete v0 (k \-> x \+ h) vn -> last_key h < k ->
[/\ k = fresh h, vn = x.2 & complete v0 h x.1].
Proof.
(* Goal: forall (_ : complete v0 (@PCM.join (@union_map_classPCM nat_ordType (prod A A) (nat_mapUMC (prod A A))) (@nm_pts (prod A A) k x) h) vn) (_ : is_true (leq (S (@last_key (prod A A) h)) k)), and3 (@eq nat k (@fresh (prod A A) h)) (@eq A vn (@snd A A x)) (complete v0 h (@fst A A x)) *)
by move=>C H; move: {C} (cmPtUn C H) (C)=>-> /cm_fresh [].
Qed.
End Complete.
Prenex Implicits cm_valid cmPt.
|
Require Import Coq.Arith.Arith Coq.micromega.Lia Coq.NArith.NArith.
Require Import Coq.ZArith.ZArith.
Local Open Scope N_scope.
Hint Rewrite Nplus_0_r nat_of_Nsucc nat_of_Nplus nat_of_Nminus
N_of_nat_of_N nat_of_N_of_nat
nat_of_P_o_P_of_succ_nat_eq_succ nat_of_P_succ_morphism : N.
Theorem nat_of_N_eq : forall n m,
nat_of_N n = nat_of_N m
-> n = m.
Proof.
(* Goal: forall (n m : N) (_ : @eq nat (N.to_nat n) (N.to_nat m)), @eq N n m *)
intros ? ? H; apply (f_equal N_of_nat) in H; autorewrite with N in *; assumption.
Qed.
Theorem Nneq_in : forall n m,
nat_of_N n <> nat_of_N m
-> n <> m.
Proof.
(* Goal: forall (n m : N) (_ : not (@eq nat (N.to_nat n) (N.to_nat m))), not (@eq N n m) *)
congruence.
Qed.
Section omega_compat.
Local Ltac omega ::= lia.
Theorem Nneq_out : forall n m,
n <> m
-> nat_of_N n <> nat_of_N m.
Proof.
(* Goal: forall (n m : N) (_ : not (@eq N n m)), not (@eq nat (N.to_nat n) (N.to_nat m)) *)
intuition.
Qed.
End omega_compat.
Theorem Nlt_out : forall n m, n < m
-> (nat_of_N n < nat_of_N m)%nat.
Proof.
(* Goal: forall (n m : N) (_ : N.lt n m), lt (N.to_nat n) (N.to_nat m) *)
unfold N.lt; intros ?? H.
(* Goal: lt (N.to_nat n) (N.to_nat m) *)
rewrite nat_of_Ncompare in H.
(* Goal: lt (N.to_nat n) (N.to_nat m) *)
apply nat_compare_Lt_lt; assumption.
Qed.
Theorem Nlt_in : forall n m, (nat_of_N n < nat_of_N m)%nat
-> n < m.
Proof.
(* Goal: forall (n m : N) (_ : lt (N.to_nat n) (N.to_nat m)), N.lt n m *)
unfold N.lt; intros.
(* Goal: @eq comparison (N.compare n m) Lt *)
rewrite nat_of_Ncompare.
(* Goal: @eq comparison (Nat.compare (N.to_nat n) (N.to_nat m)) Lt *)
apply (proj1 (nat_compare_lt _ _)); assumption.
Qed.
Theorem Nge_out : forall n m, n >= m
-> (nat_of_N n >= nat_of_N m)%nat.
Proof.
(* Goal: forall (n m : N) (_ : N.ge n m), ge (N.to_nat n) (N.to_nat m) *)
unfold N.ge; intros ?? H.
(* Goal: ge (N.to_nat n) (N.to_nat m) *)
rewrite nat_of_Ncompare in H.
(* Goal: ge (N.to_nat n) (N.to_nat m) *)
apply nat_compare_ge; assumption.
Qed.
Theorem Nge_in : forall n m, (nat_of_N n >= nat_of_N m)%nat
-> n >= m.
Proof.
(* Goal: forall (n m : N) (_ : ge (N.to_nat n) (N.to_nat m)), N.ge n m *)
unfold N.ge; intros.
(* Goal: not (@eq comparison (N.compare n m) Lt) *)
rewrite nat_of_Ncompare.
(* Goal: not (@eq comparison (Nat.compare (N.to_nat n) (N.to_nat m)) Lt) *)
apply nat_compare_ge; assumption.
Qed.
Ltac nsimp H := simpl in H; repeat progress (autorewrite with N in H; simpl in H).
Ltac pre_nomega :=
try (apply nat_of_N_eq || apply Nneq_in || apply Nlt_in || apply Nge_in); simpl;
repeat (progress autorewrite with N; simpl);
repeat match goal with
| [ H : _ <> _ |- _ ] => apply Nneq_out in H; nsimp H
| [ H : _ = _ -> False |- _ ] => apply Nneq_out in H; nsimp H
| [ H : _ |- _ ] => (apply (f_equal nat_of_N) in H
|| apply Nlt_out in H || apply Nge_out in H); nsimp H
end.
Ltac nomega := pre_nomega; omega || (unfold nat_of_P in *; simpl in *; omega).
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq div choice fintype.
From mathcomp
Require Import finfun bigop prime binomial ssralg finset fingroup finalg.
From mathcomp
Require Import perm zmodp countalg.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Import GRing.Theory.
Local Open Scope ring_scope.
Reserved Notation "''M_' n" (at level 8, n at level 2, format "''M_' n").
Reserved Notation "''rV_' n" (at level 8, n at level 2, format "''rV_' n").
Reserved Notation "''cV_' n" (at level 8, n at level 2, format "''cV_' n").
Reserved Notation "''M_' ( n )" (at level 8, only parsing).
Reserved Notation "''M_' ( m , n )" (at level 8, format "''M_' ( m , n )").
Reserved Notation "''M[' R ]_ n" (at level 8, n at level 2, only parsing).
Reserved Notation "''rV[' R ]_ n" (at level 8, n at level 2, only parsing).
Reserved Notation "''cV[' R ]_ n" (at level 8, n at level 2, only parsing).
Reserved Notation "''M[' R ]_ ( n )" (at level 8, only parsing).
Reserved Notation "''M[' R ]_ ( m , n )" (at level 8, only parsing).
Reserved Notation "\matrix_ i E"
(at level 36, E at level 36, i at level 2,
format "\matrix_ i E").
Reserved Notation "\matrix_ ( i < n ) E"
(at level 36, E at level 36, i, n at level 50, only parsing).
Reserved Notation "\matrix_ ( i , j ) E"
(at level 36, E at level 36, i, j at level 50,
format "\matrix_ ( i , j ) E").
Reserved Notation "\matrix[ k ]_ ( i , j ) E"
(at level 36, E at level 36, i, j at level 50,
format "\matrix[ k ]_ ( i , j ) E").
Reserved Notation "\matrix_ ( i < m , j < n ) E"
(at level 36, E at level 36, i, m, j, n at level 50, only parsing).
Reserved Notation "\matrix_ ( i , j < n ) E"
(at level 36, E at level 36, i, j, n at level 50, only parsing).
Reserved Notation "\row_ j E"
(at level 36, E at level 36, j at level 2,
format "\row_ j E").
Reserved Notation "\row_ ( j < n ) E"
(at level 36, E at level 36, j, n at level 50, only parsing).
Reserved Notation "\col_ j E"
(at level 36, E at level 36, j at level 2,
format "\col_ j E").
Reserved Notation "\col_ ( j < n ) E"
(at level 36, E at level 36, j, n at level 50, only parsing).
Reserved Notation "x %:M" (at level 8, format "x %:M").
Reserved Notation "A *m B" (at level 40, left associativity, format "A *m B").
Reserved Notation "A ^T" (at level 8, format "A ^T").
Reserved Notation "\tr A" (at level 10, A at level 8, format "\tr A").
Reserved Notation "\det A" (at level 10, A at level 8, format "\det A").
Reserved Notation "\adj A" (at level 10, A at level 8, format "\adj A").
Local Notation simp := (Monoid.Theory.simpm, oppr0).
Section MatrixDef.
Variable R : Type.
Variables m n : nat.
Inductive matrix : predArgType := Matrix of {ffun 'I_m * 'I_n -> R}.
Definition mx_val A := let: Matrix g := A in g.
Definition matrix_of_fun_def F := Matrix [ffun ij => F ij.1 ij.2].
Definition matrix_of_fun k := locked_with k matrix_of_fun_def.
Canonical matrix_unlockable k := [unlockable fun matrix_of_fun k].
Definition fun_of_matrix A (i : 'I_m) (j : 'I_n) := mx_val A (i, j).
Coercion fun_of_matrix : matrix >-> Funclass.
Lemma mxE k F : matrix_of_fun k F =2 F.
Proof.
(* Goal: @eqrel R (ordinal n) (ordinal m) (fun_of_matrix (matrix_of_fun k F)) F *)
by move=> i j; rewrite unlock /fun_of_matrix /= ffunE.
Qed.
Lemma matrixP (A B : matrix) : A =2 B <-> A = B.
Proof.
(* Goal: iff (@eqrel R (ordinal n) (ordinal m) (fun_of_matrix A) (fun_of_matrix B)) (@eq matrix A B) *)
rewrite /fun_of_matrix; split=> [/= eqAB | -> //].
(* Goal: @eq matrix A B *)
by apply/val_inj/ffunP=> [[i j]]; apply: eqAB.
Qed.
End MatrixDef.
Bind Scope ring_scope with matrix.
Notation "''M[' R ]_ ( m , n )" := (matrix R m n) (only parsing): type_scope.
Notation "''rV[' R ]_ n" := 'M[R]_(1, n) (only parsing) : type_scope.
Notation "''cV[' R ]_ n" := 'M[R]_(n, 1) (only parsing) : type_scope.
Notation "''M[' R ]_ n" := 'M[R]_(n, n) (only parsing) : type_scope.
Notation "''M[' R ]_ ( n )" := 'M[R]_n (only parsing) : type_scope.
Notation "''M_' ( m , n )" := 'M[_]_(m, n) : type_scope.
Notation "''rV_' n" := 'M_(1, n) : type_scope.
Notation "''cV_' n" := 'M_(n, 1) : type_scope.
Notation "''M_' n" := 'M_(n, n) : type_scope.
Notation "''M_' ( n )" := 'M_n (only parsing) : type_scope.
Notation "\matrix[ k ]_ ( i , j ) E" := (matrix_of_fun k (fun i j => E))
(at level 36, E at level 36, i, j at level 50): ring_scope.
Notation "\matrix_ ( i < m , j < n ) E" :=
(@matrix_of_fun _ m n matrix_key (fun i j => E)) (only parsing) : ring_scope.
Notation "\matrix_ ( i , j < n ) E" :=
(\matrix_(i < n, j < n) E) (only parsing) : ring_scope.
Notation "\matrix_ ( i , j ) E" := (\matrix_(i < _, j < _) E) : ring_scope.
Notation "\matrix_ ( i < m ) E" :=
(\matrix_(i < m, j < _) @fun_of_matrix _ 1 _ E 0 j)
(only parsing) : ring_scope.
Notation "\matrix_ i E" := (\matrix_(i < _) E) : ring_scope.
Notation "\col_ ( i < n ) E" := (@matrix_of_fun _ n 1 matrix_key (fun i _ => E))
(only parsing) : ring_scope.
Notation "\col_ i E" := (\col_(i < _) E) : ring_scope.
Notation "\row_ ( j < n ) E" := (@matrix_of_fun _ 1 n matrix_key (fun _ j => E))
(only parsing) : ring_scope.
Notation "\row_ j E" := (\row_(j < _) E) : ring_scope.
Definition matrix_eqMixin (R : eqType) m n :=
Eval hnf in [eqMixin of 'M[R]_(m, n) by <:].
Canonical matrix_eqType (R : eqType) m n:=
Eval hnf in EqType 'M[R]_(m, n) (matrix_eqMixin R m n).
Definition matrix_choiceMixin (R : choiceType) m n :=
[choiceMixin of 'M[R]_(m, n) by <:].
Canonical matrix_choiceType (R : choiceType) m n :=
Eval hnf in ChoiceType 'M[R]_(m, n) (matrix_choiceMixin R m n).
Definition matrix_countMixin (R : countType) m n :=
[countMixin of 'M[R]_(m, n) by <:].
Canonical matrix_countType (R : countType) m n :=
Eval hnf in CountType 'M[R]_(m, n) (matrix_countMixin R m n).
Canonical matrix_subCountType (R : countType) m n :=
Eval hnf in [subCountType of 'M[R]_(m, n)].
Definition matrix_finMixin (R : finType) m n :=
[finMixin of 'M[R]_(m, n) by <:].
Canonical matrix_finType (R : finType) m n :=
Eval hnf in FinType 'M[R]_(m, n) (matrix_finMixin R m n).
Canonical matrix_subFinType (R : finType) m n :=
Eval hnf in [subFinType of 'M[R]_(m, n)].
Lemma card_matrix (F : finType) m n : (#|{: 'M[F]_(m, n)}| = #|F| ^ (m * n))%N.
Proof.
(* Goal: @eq nat (@card (matrix_finType F m n) (@mem (matrix (Finite.sort F) m n) (predPredType (matrix (Finite.sort F) m n : predArgType)) (@sort_of_simpl_pred (matrix (Finite.sort F) m n : predArgType) (pred_of_argType (matrix (Finite.sort F) m n : predArgType))))) (expn (@card F (@mem (Equality.sort (Finite.eqType F)) (predPredType (Equality.sort (Finite.eqType F))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType F)) (pred_of_argType (Equality.sort (Finite.eqType F)))))) (muln m n)) *)
by rewrite card_sub card_ffun card_prod !card_ord.
Qed.
Definition const_mx m n a : 'M[R]_(m, n) := \matrix[const_mx_key]_(i, j) a.
Arguments const_mx {m n}.
Section FixedDim.
Variables m n : nat.
Implicit Type A : 'M[R]_(m, n).
Definition castmx m' n' (eq_mn : (m = m') * (n = n')) A : 'M_(m', n') :=
let: erefl in _ = m' := eq_mn.1 return 'M_(m', n') in
let: erefl in _ = n' := eq_mn.2 return 'M_(m, n') in A.
Definition conform_mx m' n' B A :=
match m =P m', n =P n' with
| ReflectT eq_m, ReflectT eq_n => castmx (eq_m, eq_n) A
| _, _ => B
end.
Definition trmx A := \matrix[trmx_key]_(i, j) A j i.
Definition row_perm (s : 'S_m) A := \matrix[row_perm_key]_(i, j) A (s i) j.
Definition col_perm (s : 'S_n) A := \matrix[col_perm_key]_(i, j) A i (s j).
Definition xrow i1 i2 := row_perm (tperm i1 i2).
Definition xcol j1 j2 := col_perm (tperm j1 j2).
Definition row i0 A := \row_j A i0 j.
Definition col j0 A := \col_i A i j0.
Definition row' i0 A := \matrix_(i, j) A (lift i0 i) j.
Definition col' j0 A := \matrix_(i, j) A i (lift j0 j).
Lemma castmx_const m' n' (eq_mn : (m = m') * (n = n')) a :
castmx eq_mn (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R m' n') (@castmx m' n' eq_mn (@const_mx m n a)) (@const_mx m' n' a) *)
by case: eq_mn; case: m' /; case: n' /.
Qed.
Lemma trmx_const a : trmx (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R n m) (trmx (@const_mx m n a)) (@const_mx n m a) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma row_perm_const s a : row_perm s (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R m n) (row_perm s (@const_mx m n a)) (@const_mx m n a) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma col_perm_const s a : col_perm s (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R m n) (col_perm s (@const_mx m n a)) (@const_mx m n a) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma xrow_const i1 i2 a : xrow i1 i2 (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R m n) (xrow i1 i2 (@const_mx m n a)) (@const_mx m n a) *)
exact: row_perm_const.
Qed.
Lemma xcol_const j1 j2 a : xcol j1 j2 (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R m n) (xcol j1 j2 (@const_mx m n a)) (@const_mx m n a) *)
exact: col_perm_const.
Qed.
Lemma rowP (u v : 'rV[R]_n) : u 0 =1 v 0 <-> u = v.
Proof.
(* Goal: iff (@eqfun R (ordinal n) (@fun_of_matrix R (S O) n u (GRing.zero (Zp_zmodType O))) (@fun_of_matrix R (S O) n v (GRing.zero (Zp_zmodType O)))) (@eq (matrix R (S O) n) u v) *)
by split=> [eq_uv | -> //]; apply/matrixP=> i; rewrite ord1.
Qed.
Lemma rowK u_ i0 : row i0 (\matrix_i u_ i) = u_ i0.
Proof.
(* Goal: @eq (matrix R (S O) n) (row i0 (@matrix_of_fun R m n matrix_key (fun (i : Finite.sort (ordinal_finType m)) (j : Finite.sort (ordinal_finType n)) => @fun_of_matrix R (S O) n (u_ i) (GRing.zero (Zp_zmodType O)) j))) (u_ i0) *)
by apply/rowP=> i'; rewrite !mxE.
Qed.
Lemma row_matrixP A B : (forall i, row i A = row i B) <-> A = B.
Proof.
(* Goal: iff (forall i : ordinal m, @eq (matrix R (S O) n) (row i A) (row i B)) (@eq (matrix R m n) A B) *)
split=> [eqAB | -> //]; apply/matrixP=> i j.
(* Goal: @eq R (@fun_of_matrix R m n A i j) (@fun_of_matrix R m n B i j) *)
by move/rowP/(_ j): (eqAB i); rewrite !mxE.
Qed.
Lemma colP (u v : 'cV[R]_m) : u^~ 0 =1 v^~ 0 <-> u = v.
Proof.
(* Goal: iff (@eqfun R (ordinal m) (fun x : ordinal m => @fun_of_matrix R m (S O) u x (GRing.zero (Zp_zmodType O))) (fun x : ordinal m => @fun_of_matrix R m (S O) v x (GRing.zero (Zp_zmodType O)))) (@eq (matrix R m (S O)) u v) *)
by split=> [eq_uv | -> //]; apply/matrixP=> i j; rewrite ord1.
Qed.
Lemma row_const i0 a : row i0 (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R (S O) n) (row i0 (@const_mx m n a)) (@const_mx (S O) n a) *)
by apply/rowP=> j; rewrite !mxE.
Qed.
Lemma col_const j0 a : col j0 (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R m (S O)) (col j0 (@const_mx m n a)) (@const_mx m (S O) a) *)
by apply/colP=> i; rewrite !mxE.
Qed.
Lemma row'_const i0 a : row' i0 (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R (Nat.pred m) n) (row' i0 (@const_mx m n a)) (@const_mx (Nat.pred m) n a) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma col'_const j0 a : col' j0 (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R m (Nat.pred n)) (col' j0 (@const_mx m n a)) (@const_mx m (Nat.pred n) a) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma col_perm1 A : col_perm 1 A = A.
Proof.
(* Goal: @eq (matrix R m n) (col_perm (oneg (perm_of_baseFinGroupType (ordinal_finType n))) A) A *)
by apply/matrixP=> i j; rewrite mxE perm1.
Qed.
Lemma row_perm1 A : row_perm 1 A = A.
Proof.
(* Goal: @eq (matrix R m n) (row_perm (oneg (perm_of_baseFinGroupType (ordinal_finType m))) A) A *)
by apply/matrixP=> i j; rewrite mxE perm1.
Qed.
Lemma col_permM s t A : col_perm (s * t) A = col_perm s (col_perm t A).
Proof.
(* Goal: @eq (matrix R m n) (col_perm (@mulg (perm_of_baseFinGroupType (ordinal_finType n)) s t) A) (col_perm s (col_perm t A)) *)
by apply/matrixP=> i j; rewrite !mxE permM.
Qed.
Lemma row_permM s t A : row_perm (s * t) A = row_perm s (row_perm t A).
Proof.
(* Goal: @eq (matrix R m n) (row_perm (@mulg (perm_of_baseFinGroupType (ordinal_finType m)) s t) A) (row_perm s (row_perm t A)) *)
by apply/matrixP=> i j; rewrite !mxE permM.
Qed.
Lemma col_row_permC s t A :
col_perm s (row_perm t A) = row_perm t (col_perm s A).
Proof.
(* Goal: @eq (matrix R m n) (col_perm s (row_perm t A)) (row_perm t (col_perm s A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
End FixedDim.
Local Notation "A ^T" := (trmx A) : ring_scope.
Lemma castmx_id m n erefl_mn (A : 'M_(m, n)) : castmx erefl_mn A = A.
Proof.
(* Goal: @eq (matrix R m n) (@castmx m n m n erefl_mn A) A *)
by case: erefl_mn => e_m e_n; rewrite [e_m]eq_axiomK [e_n]eq_axiomK.
Qed.
Lemma castmx_comp m1 n1 m2 n2 m3 n3 (eq_m1 : m1 = m2) (eq_n1 : n1 = n2)
(eq_m2 : m2 = m3) (eq_n2 : n2 = n3) A :
castmx (eq_m2, eq_n2) (castmx (eq_m1, eq_n1) A)
= castmx (etrans eq_m1 eq_m2, etrans eq_n1 eq_n2) A.
Proof.
(* Goal: @eq (matrix R m3 n3) (@castmx m2 n2 m3 n3 (@pair (@eq nat m2 m3) (@eq nat n2 n3) eq_m2 eq_n2) (@castmx m1 n1 m2 n2 (@pair (@eq nat m1 m2) (@eq nat n1 n2) eq_m1 eq_n1) A)) (@castmx m1 n1 m3 n3 (@pair (@eq nat m1 m3) (@eq nat n1 n3) (@etrans nat m1 m2 m3 eq_m1 eq_m2) (@etrans nat n1 n2 n3 eq_n1 eq_n2)) A) *)
by case: m2 / eq_m1 eq_m2; case: m3 /; case: n2 / eq_n1 eq_n2; case: n3 /.
Qed.
Lemma castmxK m1 n1 m2 n2 (eq_m : m1 = m2) (eq_n : n1 = n2) :
cancel (castmx (eq_m, eq_n)) (castmx (esym eq_m, esym eq_n)).
Proof.
(* Goal: @cancel (matrix R m2 n2) (matrix R m1 n1) (@castmx m1 n1 m2 n2 (@pair (@eq nat m1 m2) (@eq nat n1 n2) eq_m eq_n)) (@castmx m2 n2 m1 n1 (@pair (@eq nat m2 m1) (@eq nat n2 n1) (@esym nat m1 m2 eq_m) (@esym nat n1 n2 eq_n))) *)
by case: m2 / eq_m; case: n2 / eq_n.
Qed.
Lemma castmxKV m1 n1 m2 n2 (eq_m : m1 = m2) (eq_n : n1 = n2) :
cancel (castmx (esym eq_m, esym eq_n)) (castmx (eq_m, eq_n)).
Proof.
(* Goal: @cancel (matrix R m1 n1) (matrix R m2 n2) (@castmx m2 n2 m1 n1 (@pair (@eq nat m2 m1) (@eq nat n2 n1) (@esym nat m1 m2 eq_m) (@esym nat n1 n2 eq_n))) (@castmx m1 n1 m2 n2 (@pair (@eq nat m1 m2) (@eq nat n1 n2) eq_m eq_n)) *)
by case: m2 / eq_m; case: n2 / eq_n.
Qed.
Lemma castmx_sym m1 n1 m2 n2 (eq_m : m1 = m2) (eq_n : n1 = n2) A1 A2 :
A1 = castmx (eq_m, eq_n) A2 -> A2 = castmx (esym eq_m, esym eq_n) A1.
Proof.
(* Goal: forall _ : @eq (matrix R m2 n2) A1 (@castmx m1 n1 m2 n2 (@pair (@eq nat m1 m2) (@eq nat n1 n2) eq_m eq_n) A2), @eq (matrix R m1 n1) A2 (@castmx m2 n2 m1 n1 (@pair (@eq nat m2 m1) (@eq nat n2 n1) (@esym nat m1 m2 eq_m) (@esym nat n1 n2 eq_n)) A1) *)
by move/(canLR (castmxK _ _)).
Qed.
Lemma castmxE m1 n1 m2 n2 (eq_mn : (m1 = m2) * (n1 = n2)) A i j :
castmx eq_mn A i j =
A (cast_ord (esym eq_mn.1) i) (cast_ord (esym eq_mn.2) j).
Proof.
(* Goal: @eq R (@fun_of_matrix R m2 n2 (@castmx m1 n1 m2 n2 eq_mn A) i j) (@fun_of_matrix R m1 n1 A (@cast_ord m2 m1 (@esym nat m1 m2 (@fst (@eq nat m1 m2) (@eq nat n1 n2) eq_mn)) i) (@cast_ord n2 n1 (@esym nat n1 n2 (@snd (@eq nat m1 m2) (@eq nat n1 n2) eq_mn)) j)) *)
by do [case: eq_mn; case: m2 /; case: n2 /] in A i j *; rewrite !cast_ord_id.
Qed.
Lemma conform_mx_id m n (B A : 'M_(m, n)) : conform_mx B A = A.
Proof.
(* Goal: @eq (matrix R m n) (@conform_mx m n m n B A) A *)
by rewrite /conform_mx; do 2!case: eqP => // *; rewrite castmx_id.
Qed.
Lemma nonconform_mx m m' n n' (B : 'M_(m', n')) (A : 'M_(m, n)) :
(m != m') || (n != n') -> conform_mx B A = B.
Proof.
(* Goal: forall _ : is_true (orb (negb (@eq_op nat_eqType m m')) (negb (@eq_op nat_eqType n n'))), @eq (matrix R m' n') (@conform_mx m n m' n' B A) B *)
by rewrite /conform_mx; do 2!case: eqP.
Qed.
Lemma conform_castmx m1 n1 m2 n2 m3 n3
(e_mn : (m2 = m3) * (n2 = n3)) (B : 'M_(m1, n1)) A :
conform_mx B (castmx e_mn A) = conform_mx B A.
Proof.
(* Goal: @eq (matrix R m1 n1) (@conform_mx m3 n3 m1 n1 B (@castmx m2 n2 m3 n3 e_mn A)) (@conform_mx m2 n2 m1 n1 B A) *)
by do [case: e_mn; case: m3 /; case: n3 /] in A *.
Qed.
Qed.
Lemma trmxK m n : cancel (@trmx m n) (@trmx n m).
Proof.
(* Goal: @cancel (matrix R n m) (matrix R m n) (@trmx m n) (@trmx n m) *)
by move=> A; apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma trmx_inj m n : injective (@trmx m n).
Proof.
(* Goal: @injective (matrix R n m) (matrix R m n) (@trmx m n) *)
exact: can_inj (@trmxK m n).
Qed.
Lemma trmx_cast m1 n1 m2 n2 (eq_mn : (m1 = m2) * (n1 = n2)) A :
(castmx eq_mn A)^T = castmx (eq_mn.2, eq_mn.1) A^T.
Proof.
(* Goal: @eq (matrix R n2 m2) (@trmx m2 n2 (@castmx m1 n1 m2 n2 eq_mn A)) (@castmx n1 m1 n2 m2 (@pair (@eq nat n1 n2) (@eq nat m1 m2) (@snd (@eq nat m1 m2) (@eq nat n1 n2) eq_mn) (@fst (@eq nat m1 m2) (@eq nat n1 n2) eq_mn)) (@trmx m1 n1 A)) *)
by case: eq_mn => eq_m eq_n; apply/matrixP=> i j; rewrite !(mxE, castmxE).
Qed.
Lemma tr_row_perm m n s (A : 'M_(m, n)) : (row_perm s A)^T = col_perm s A^T.
Proof.
(* Goal: @eq (matrix R n m) (@trmx m n (@row_perm m n s A)) (@col_perm n m s (@trmx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma tr_col_perm m n s (A : 'M_(m, n)) : (col_perm s A)^T = row_perm s A^T.
Proof.
(* Goal: @eq (matrix R n m) (@trmx m n (@col_perm m n s A)) (@row_perm n m s (@trmx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma tr_xrow m n i1 i2 (A : 'M_(m, n)) : (xrow i1 i2 A)^T = xcol i1 i2 A^T.
Proof.
(* Goal: @eq (matrix R n m) (@trmx m n (@xrow m n i1 i2 A)) (@xcol n m i1 i2 (@trmx m n A)) *)
exact: tr_row_perm.
Qed.
Lemma tr_xcol m n j1 j2 (A : 'M_(m, n)) : (xcol j1 j2 A)^T = xrow j1 j2 A^T.
Proof.
(* Goal: @eq (matrix R n m) (@trmx m n (@xcol m n j1 j2 A)) (@xrow n m j1 j2 (@trmx m n A)) *)
exact: tr_col_perm.
Qed.
Lemma row_id n i (V : 'rV_n) : row i V = V.
Proof.
(* Goal: @eq (matrix R (S O) n) (@row (S O) n i V) V *)
by apply/rowP=> j; rewrite mxE [i]ord1.
Qed.
Lemma col_id n j (V : 'cV_n) : col j V = V.
Proof.
(* Goal: @eq (matrix R n (S O)) (@col n (S O) j V) V *)
by apply/colP=> i; rewrite mxE [j]ord1.
Qed.
Lemma row_eq m1 m2 n i1 i2 (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
row i1 A1 = row i2 A2 -> A1 i1 =1 A2 i2.
Proof.
(* Goal: forall _ : @eq (matrix R (S O) n) (@row m1 n i1 A1) (@row m2 n i2 A2), @eqfun R (ordinal n) (@fun_of_matrix R m1 n A1 i1) (@fun_of_matrix R m2 n A2 i2) *)
by move/rowP=> eqA12 j; have:= eqA12 j; rewrite !mxE.
Qed.
Lemma col_eq m n1 n2 j1 j2 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
col j1 A1 = col j2 A2 -> A1^~ j1 =1 A2^~ j2.
Proof.
(* Goal: forall _ : @eq (matrix R m (S O)) (@col m n1 j1 A1) (@col m n2 j2 A2), @eqfun R (ordinal m) (fun x : ordinal m => @fun_of_matrix R m n1 A1 x j1) (fun x : ordinal m => @fun_of_matrix R m n2 A2 x j2) *)
by move/colP=> eqA12 i; have:= eqA12 i; rewrite !mxE.
Qed.
Lemma row'_eq m n i0 (A B : 'M_(m, n)) :
row' i0 A = row' i0 B -> {in predC1 i0, A =2 B}.
Proof.
(* Goal: forall _ : @eq (matrix R (Nat.pred m) n) (@row' m n i0 A) (@row' m n i0 B), @prop_in1 (Equality.sort (ordinal_eqType m)) (@mem (Equality.sort (ordinal_eqType m)) (simplPredType (Equality.sort (ordinal_eqType m))) (@predC1 (ordinal_eqType m) i0)) (fun x : ordinal m => forall y : ordinal n, @eq R (@fun_of_matrix R m n A x y) (@fun_of_matrix R m n B x y)) (inPhantom (@eqrel R (ordinal n) (ordinal m) (@fun_of_matrix R m n A) (@fun_of_matrix R m n B))) *)
move/matrixP=> eqAB' i; rewrite !inE eq_sym; case/unlift_some=> i' -> _ j.
(* Goal: @eq R (@fun_of_matrix R m n A (@lift m i0 i') j) (@fun_of_matrix R m n B (@lift m i0 i') j) *)
by have:= eqAB' i' j; rewrite !mxE.
Qed.
Lemma col'_eq m n j0 (A B : 'M_(m, n)) :
col' j0 A = col' j0 B -> forall i, {in predC1 j0, A i =1 B i}.
Proof.
(* Goal: forall (_ : @eq (matrix R m (Nat.pred n)) (@col' m n j0 A) (@col' m n j0 B)) (i : ordinal m), @prop_in1 (Equality.sort (ordinal_eqType n)) (@mem (Equality.sort (ordinal_eqType n)) (simplPredType (Equality.sort (ordinal_eqType n))) (@predC1 (ordinal_eqType n) j0)) (fun x : ordinal n => @eq R (@fun_of_matrix R m n A i x) (@fun_of_matrix R m n B i x)) (inPhantom (@eqfun R (ordinal n) (@fun_of_matrix R m n A i) (@fun_of_matrix R m n B i))) *)
move/matrixP=> eqAB' i j; rewrite !inE eq_sym; case/unlift_some=> j' -> _.
(* Goal: @eq R (@fun_of_matrix R m n A i (@lift n j0 j')) (@fun_of_matrix R m n B i (@lift n j0 j')) *)
by have:= eqAB' i j'; rewrite !mxE.
Qed.
Lemma tr_row m n i0 (A : 'M_(m, n)) : (row i0 A)^T = col i0 A^T.
Proof.
(* Goal: @eq (matrix R n (S O)) (@trmx (S O) n (@row m n i0 A)) (@col n m i0 (@trmx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma tr_row' m n i0 (A : 'M_(m, n)) : (row' i0 A)^T = col' i0 A^T.
Proof.
(* Goal: @eq (matrix R n (Nat.pred m)) (@trmx (Nat.pred m) n (@row' m n i0 A)) (@col' n m i0 (@trmx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma tr_col m n j0 (A : 'M_(m, n)) : (col j0 A)^T = row j0 A^T.
Proof.
(* Goal: @eq (matrix R (S O) m) (@trmx m (S O) (@col m n j0 A)) (@row n m j0 (@trmx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma tr_col' m n j0 (A : 'M_(m, n)) : (col' j0 A)^T = row' j0 A^T.
Proof.
(* Goal: @eq (matrix R (Nat.pred n) m) (@trmx m (Nat.pred n) (@col' m n j0 A)) (@row' n m j0 (@trmx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Definition row_mx (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) : 'M[R]_(m, n1 + n2) :=
\matrix[row_mx_key]_(i, j)
match split j with inl j1 => A1 i j1 | inr j2 => A2 i j2 end.
Definition col_mx (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) : 'M[R]_(m1 + m2, n) :=
\matrix[col_mx_key]_(i, j)
match split i with inl i1 => A1 i1 j | inr i2 => A2 i2 j end.
Definition lsubmx (A : 'M[R]_(m, n1 + n2)) :=
\matrix[lsubmx_key]_(i, j) A i (lshift n2 j).
Definition rsubmx (A : 'M[R]_(m, n1 + n2)) :=
\matrix[rsubmx_key]_(i, j) A i (rshift n1 j).
Definition usubmx (A : 'M[R]_(m1 + m2, n)) :=
\matrix[usubmx_key]_(i, j) A (lshift m2 i) j.
Definition dsubmx (A : 'M[R]_(m1 + m2, n)) :=
\matrix[dsubmx_key]_(i, j) A (rshift m1 i) j.
Lemma row_mxEl A1 A2 i j : row_mx A1 A2 i (lshift n2 j) = A1 i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R m (addn n1 n2) (row_mx A1 A2) i (@lshift n1 n2 j)) (@fun_of_matrix R m n1 A1 i j) *)
by rewrite mxE (unsplitK (inl _ _)).
Qed.
Lemma row_mxKl A1 A2 : lsubmx (row_mx A1 A2) = A1.
Proof.
(* Goal: @eq (matrix R m n1) (lsubmx (row_mx A1 A2)) A1 *)
by apply/matrixP=> i j; rewrite mxE row_mxEl.
Qed.
Lemma row_mxEr A1 A2 i j : row_mx A1 A2 i (rshift n1 j) = A2 i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R m (addn n1 n2) (row_mx A1 A2) i (@rshift n1 n2 j)) (@fun_of_matrix R m n2 A2 i j) *)
by rewrite mxE (unsplitK (inr _ _)).
Qed.
Lemma row_mxKr A1 A2 : rsubmx (row_mx A1 A2) = A2.
Proof.
(* Goal: @eq (matrix R m n2) (rsubmx (row_mx A1 A2)) A2 *)
by apply/matrixP=> i j; rewrite mxE row_mxEr.
Qed.
Lemma hsubmxK A : row_mx (lsubmx A) (rsubmx A) = A.
Proof.
(* Goal: @eq (matrix R m (addn n1 n2)) (row_mx (lsubmx A) (rsubmx A)) A *)
apply/matrixP=> i j; rewrite !mxE.
(* Goal: @eq R match @split n1 n2 j with | inl j1 => @fun_of_matrix R m n1 (lsubmx A) i j1 | inr j2 => @fun_of_matrix R m n2 (rsubmx A) i j2 end (@fun_of_matrix R m (addn n1 n2) A i j) *)
by case: splitP => k Dk //=; rewrite !mxE //=; congr (A _ _); apply: val_inj.
Qed.
Lemma col_mxEu A1 A2 i j : col_mx A1 A2 (lshift m2 i) j = A1 i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R (addn m1 m2) n (col_mx A1 A2) (@lshift m1 m2 i) j) (@fun_of_matrix R m1 n A1 i j) *)
by rewrite mxE (unsplitK (inl _ _)).
Qed.
Lemma col_mxKu A1 A2 : usubmx (col_mx A1 A2) = A1.
Proof.
(* Goal: @eq (matrix R m1 n) (usubmx (col_mx A1 A2)) A1 *)
by apply/matrixP=> i j; rewrite mxE col_mxEu.
Qed.
Lemma col_mxEd A1 A2 i j : col_mx A1 A2 (rshift m1 i) j = A2 i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R (addn m1 m2) n (col_mx A1 A2) (@rshift m1 m2 i) j) (@fun_of_matrix R m2 n A2 i j) *)
by rewrite mxE (unsplitK (inr _ _)).
Qed.
Lemma col_mxKd A1 A2 : dsubmx (col_mx A1 A2) = A2.
Proof.
(* Goal: @eq (matrix R m2 n) (dsubmx (col_mx A1 A2)) A2 *)
by apply/matrixP=> i j; rewrite mxE col_mxEd.
Qed.
Lemma eq_row_mx A1 A2 B1 B2 : row_mx A1 A2 = row_mx B1 B2 -> A1 = B1 /\ A2 = B2.
Proof.
(* Goal: forall _ : @eq (matrix R m (addn n1 n2)) (row_mx A1 A2) (row_mx B1 B2), and (@eq (matrix R m n1) A1 B1) (@eq (matrix R m n2) A2 B2) *)
move=> eqAB; move: (congr1 lsubmx eqAB) (congr1 rsubmx eqAB).
(* Goal: forall (_ : @eq (matrix R m n1) (lsubmx (row_mx A1 A2)) (lsubmx (row_mx B1 B2))) (_ : @eq (matrix R m n2) (rsubmx (row_mx A1 A2)) (rsubmx (row_mx B1 B2))), and (@eq (matrix R m n1) A1 B1) (@eq (matrix R m n2) A2 B2) *)
by rewrite !(row_mxKl, row_mxKr).
Qed.
Lemma eq_col_mx A1 A2 B1 B2 : col_mx A1 A2 = col_mx B1 B2 -> A1 = B1 /\ A2 = B2.
Proof.
(* Goal: forall _ : @eq (matrix R (addn m1 m2) n) (col_mx A1 A2) (col_mx B1 B2), and (@eq (matrix R m1 n) A1 B1) (@eq (matrix R m2 n) A2 B2) *)
move=> eqAB; move: (congr1 usubmx eqAB) (congr1 dsubmx eqAB).
(* Goal: forall (_ : @eq (matrix R m1 n) (usubmx (col_mx A1 A2)) (usubmx (col_mx B1 B2))) (_ : @eq (matrix R m2 n) (dsubmx (col_mx A1 A2)) (dsubmx (col_mx B1 B2))), and (@eq (matrix R m1 n) A1 B1) (@eq (matrix R m2 n) A2 B2) *)
by rewrite !(col_mxKu, col_mxKd).
Qed.
Lemma row_mx_const a : row_mx (const_mx a) (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R m (addn n1 n2)) (row_mx (@const_mx m n1 a) (@const_mx m n2 a)) (@const_mx m (addn n1 n2) a) *)
by split_mxE.
Qed.
Lemma col_mx_const a : col_mx (const_mx a) (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R (addn m1 m2) n) (col_mx (@const_mx m1 n a) (@const_mx m2 n a)) (@const_mx (addn m1 m2) n a) *)
by split_mxE.
Qed.
End CutPaste.
Lemma trmx_lsub m n1 n2 (A : 'M_(m, n1 + n2)) : (lsubmx A)^T = usubmx A^T.
Proof.
(* Goal: @eq (matrix R n1 m) (@trmx m n1 (@lsubmx m n1 n2 A)) (@usubmx n1 n2 m (@trmx m (addn n1 n2) A)) *)
by split_mxE.
Qed.
Lemma trmx_rsub m n1 n2 (A : 'M_(m, n1 + n2)) : (rsubmx A)^T = dsubmx A^T.
Proof.
(* Goal: @eq (matrix R n2 m) (@trmx m n2 (@rsubmx m n1 n2 A)) (@dsubmx n1 n2 m (@trmx m (addn n1 n2) A)) *)
by split_mxE.
Qed.
Lemma tr_row_mx m n1 n2 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
(row_mx A1 A2)^T = col_mx A1^T A2^T.
Proof.
(* Goal: @eq (matrix R (addn n1 n2) m) (@trmx m (addn n1 n2) (@row_mx m n1 n2 A1 A2)) (@col_mx n1 n2 m (@trmx m n1 A1) (@trmx m n2 A2)) *)
by split_mxE.
Qed.
Lemma tr_col_mx m1 m2 n (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
(col_mx A1 A2)^T = row_mx A1^T A2^T.
Proof.
(* Goal: @eq (matrix R n (addn m1 m2)) (@trmx (addn m1 m2) n (@col_mx m1 m2 n A1 A2)) (@row_mx n m1 m2 (@trmx m1 n A1) (@trmx m2 n A2)) *)
by split_mxE.
Qed.
Lemma trmx_usub m1 m2 n (A : 'M_(m1 + m2, n)) : (usubmx A)^T = lsubmx A^T.
Proof.
(* Goal: @eq (matrix R n m1) (@trmx m1 n (@usubmx m1 m2 n A)) (@lsubmx n m1 m2 (@trmx (addn m1 m2) n A)) *)
by split_mxE.
Qed.
Lemma trmx_dsub m1 m2 n (A : 'M_(m1 + m2, n)) : (dsubmx A)^T = rsubmx A^T.
Proof.
(* Goal: @eq (matrix R n m2) (@trmx m2 n (@dsubmx m1 m2 n A)) (@rsubmx n m1 m2 (@trmx (addn m1 m2) n A)) *)
by split_mxE.
Qed.
Lemma vsubmxK m1 m2 n (A : 'M_(m1 + m2, n)) : col_mx (usubmx A) (dsubmx A) = A.
Proof.
(* Goal: @eq (matrix R (addn m1 m2) n) (@col_mx m1 m2 n (@usubmx m1 m2 n A) (@dsubmx m1 m2 n A)) A *)
by apply: trmx_inj; rewrite tr_col_mx trmx_usub trmx_dsub hsubmxK.
Qed.
Lemma cast_row_mx m m' n1 n2 (eq_m : m = m') A1 A2 :
castmx (eq_m, erefl _) (row_mx A1 A2)
= row_mx (castmx (eq_m, erefl n1) A1) (castmx (eq_m, erefl n2) A2).
Proof.
(* Goal: @eq (matrix R m' (addn n1 n2)) (@castmx m (addn n1 n2) m' (addn n1 n2) (@pair (@eq nat m m') (@eq nat (addn n1 n2) (addn n1 n2)) eq_m (@Logic.eq_refl nat (addn n1 n2))) (@row_mx m n1 n2 A1 A2)) (@row_mx m' n1 n2 (@castmx m n1 m' n1 (@pair (@eq nat m m') (@eq nat n1 n1) eq_m (@Logic.eq_refl nat n1)) A1) (@castmx m n2 m' n2 (@pair (@eq nat m m') (@eq nat n2 n2) eq_m (@Logic.eq_refl nat n2)) A2)) *)
by case: m' / eq_m.
Qed.
Lemma cast_col_mx m1 m2 n n' (eq_n : n = n') A1 A2 :
castmx (erefl _, eq_n) (col_mx A1 A2)
= col_mx (castmx (erefl m1, eq_n) A1) (castmx (erefl m2, eq_n) A2).
Proof.
(* Goal: @eq (matrix R (addn m1 m2) n') (@castmx (addn m1 m2) n (addn m1 m2) n' (@pair (@eq nat (addn m1 m2) (addn m1 m2)) (@eq nat n n') (@Logic.eq_refl nat (addn m1 m2)) eq_n) (@col_mx m1 m2 n A1 A2)) (@col_mx m1 m2 n' (@castmx m1 n m1 n' (@pair (@eq nat m1 m1) (@eq nat n n') (@Logic.eq_refl nat m1) eq_n) A1) (@castmx m2 n m2 n' (@pair (@eq nat m2 m2) (@eq nat n n') (@Logic.eq_refl nat m2) eq_n) A2)) *)
by case: n' / eq_n.
Qed.
Lemma row_mxA m n1 n2 n3 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) (A3 : 'M_(m, n3)) :
let cast := (erefl m, esym (addnA n1 n2 n3)) in
row_mx A1 (row_mx A2 A3) = castmx cast (row_mx (row_mx A1 A2) A3).
Proof.
(* Goal: let cast : prod (@eq nat m m) (@eq nat (addn (addn n1 n2) n3) (addn n1 (addn n2 n3))) := @pair (@eq nat m m) (@eq nat (addn (addn n1 n2) n3) (addn n1 (addn n2 n3))) (@Logic.eq_refl nat m) (@esym nat (addn n1 (addn n2 n3)) (addn (addn n1 n2) n3) (addnA n1 n2 n3)) in @eq (matrix R m (addn n1 (addn n2 n3))) (@row_mx m n1 (addn n2 n3) A1 (@row_mx m n2 n3 A2 A3)) (@castmx m (addn (addn n1 n2) n3) m (addn n1 (addn n2 n3)) cast (@row_mx m (addn n1 n2) n3 (@row_mx m n1 n2 A1 A2) A3)) *)
apply: (canRL (castmxKV _ _)); apply/matrixP=> i j.
(* Goal: @eq R (@fun_of_matrix R m (addn (addn n1 n2) n3) (@castmx m (addn n1 (addn n2 n3)) m (addn (addn n1 n2) n3) (@pair (@eq nat m m) (@eq nat (addn n1 (addn n2 n3)) (addn (addn n1 n2) n3)) (@esym nat m m (@Logic.eq_refl nat m)) (@esym nat (addn (addn n1 n2) n3) (addn n1 (addn n2 n3)) (@esym nat (addn n1 (addn n2 n3)) (addn (addn n1 n2) n3) (addnA n1 n2 n3)))) (@row_mx m n1 (addn n2 n3) A1 (@row_mx m n2 n3 A2 A3))) i j) (@fun_of_matrix R m (addn (addn n1 n2) n3) (@row_mx m (addn n1 n2) n3 (@row_mx m n1 n2 A1 A2) A3) i j) *)
rewrite castmxE !mxE cast_ord_id; case: splitP => j1 /= def_j.
(* Goal: @eq R (@fun_of_matrix R m (addn n2 n3) (@row_mx m n2 n3 A2 A3) i j1) match @split (addn n1 n2) n3 j with | inl j1 => @fun_of_matrix R m (addn n1 n2) (@row_mx m n1 n2 A1 A2) i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end *)
(* Goal: @eq R (@fun_of_matrix R m n1 A1 i j1) match @split (addn n1 n2) n3 j with | inl j1 => @fun_of_matrix R m (addn n1 n2) (@row_mx m n1 n2 A1 A2) i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end *)
have: (j < n1 + n2) && (j < n1) by rewrite def_j lshift_subproof /=.
(* Goal: @eq R (@fun_of_matrix R m (addn n2 n3) (@row_mx m n2 n3 A2 A3) i j1) match @split (addn n1 n2) n3 j with | inl j1 => @fun_of_matrix R m (addn n1 n2) (@row_mx m n1 n2 A1 A2) i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end *)
(* Goal: forall _ : is_true (andb (leq (S (@nat_of_ord (addn (addn n1 n2) n3) j)) (addn n1 n2)) (leq (S (@nat_of_ord (addn (addn n1 n2) n3) j)) n1)), @eq R (@fun_of_matrix R m n1 A1 i j1) match @split (addn n1 n2) n3 j with | inl j1 => @fun_of_matrix R m (addn n1 n2) (@row_mx m n1 n2 A1 A2) i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end *)
by move: def_j; do 2![case: splitP => // ? ->; rewrite ?mxE] => /ord_inj->.
(* Goal: @eq R (@fun_of_matrix R m (addn n2 n3) (@row_mx m n2 n3 A2 A3) i j1) match @split (addn n1 n2) n3 j with | inl j1 => @fun_of_matrix R m (addn n1 n2) (@row_mx m n1 n2 A1 A2) i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end *)
case: splitP def_j => j2 ->{j} def_j; rewrite !mxE.
(* Goal: @eq R match @split n2 n3 j1 with | inl j1 => @fun_of_matrix R m n2 A2 i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end (@fun_of_matrix R m n3 A3 i j2) *)
(* Goal: @eq R match @split n2 n3 j1 with | inl j1 => @fun_of_matrix R m n2 A2 i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end match @split n1 n2 j2 with | inl j1 => @fun_of_matrix R m n1 A1 i j1 | inr j2 => @fun_of_matrix R m n2 A2 i j2 end *)
have: ~~ (j2 < n1) by rewrite -leqNgt def_j leq_addr.
(* Goal: @eq R match @split n2 n3 j1 with | inl j1 => @fun_of_matrix R m n2 A2 i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end (@fun_of_matrix R m n3 A3 i j2) *)
(* Goal: forall _ : is_true (negb (leq (S (@nat_of_ord (addn n1 n2) j2)) n1)), @eq R match @split n2 n3 j1 with | inl j1 => @fun_of_matrix R m n2 A2 i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end match @split n1 n2 j2 with | inl j1 => @fun_of_matrix R m n1 A1 i j1 | inr j2 => @fun_of_matrix R m n2 A2 i j2 end *)
have: j1 < n2 by rewrite -(ltn_add2l n1) -def_j.
(* Goal: @eq R match @split n2 n3 j1 with | inl j1 => @fun_of_matrix R m n2 A2 i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end (@fun_of_matrix R m n3 A3 i j2) *)
(* Goal: forall (_ : is_true (leq (S (@nat_of_ord (addn n2 n3) j1)) n2)) (_ : is_true (negb (leq (S (@nat_of_ord (addn n1 n2) j2)) n1))), @eq R match @split n2 n3 j1 with | inl j1 => @fun_of_matrix R m n2 A2 i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end match @split n1 n2 j2 with | inl j1 => @fun_of_matrix R m n1 A1 i j1 | inr j2 => @fun_of_matrix R m n2 A2 i j2 end *)
by move: def_j; do 2![case: splitP => // ? ->] => /addnI/val_inj->.
(* Goal: @eq R match @split n2 n3 j1 with | inl j1 => @fun_of_matrix R m n2 A2 i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end (@fun_of_matrix R m n3 A3 i j2) *)
have: ~~ (j1 < n2) by rewrite -leqNgt -(leq_add2l n1) -def_j leq_addr.
(* Goal: forall _ : is_true (negb (leq (S (@nat_of_ord (addn n2 n3) j1)) n2)), @eq R match @split n2 n3 j1 with | inl j1 => @fun_of_matrix R m n2 A2 i j1 | inr j2 => @fun_of_matrix R m n3 A3 i j2 end (@fun_of_matrix R m n3 A3 i j2) *)
by case: splitP def_j => // ? ->; rewrite addnA => /addnI/val_inj->.
Qed.
Definition row_mxAx := row_mxA.
Lemma col_mxA m1 m2 m3 n (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) (A3 : 'M_(m3, n)) :
let cast := (esym (addnA m1 m2 m3), erefl n) in
col_mx A1 (col_mx A2 A3) = castmx cast (col_mx (col_mx A1 A2) A3).
Proof.
(* Goal: let cast : prod (@eq nat (addn (addn m1 m2) m3) (addn m1 (addn m2 m3))) (@eq nat n n) := @pair (@eq nat (addn (addn m1 m2) m3) (addn m1 (addn m2 m3))) (@eq nat n n) (@esym nat (addn m1 (addn m2 m3)) (addn (addn m1 m2) m3) (addnA m1 m2 m3)) (@Logic.eq_refl nat n) in @eq (matrix R (addn m1 (addn m2 m3)) n) (@col_mx m1 (addn m2 m3) n A1 (@col_mx m2 m3 n A2 A3)) (@castmx (addn (addn m1 m2) m3) n (addn m1 (addn m2 m3)) n cast (@col_mx (addn m1 m2) m3 n (@col_mx m1 m2 n A1 A2) A3)) *)
by apply: trmx_inj; rewrite trmx_cast !tr_col_mx -row_mxA.
Qed.
Definition col_mxAx := col_mxA.
Lemma row_row_mx m n1 n2 i0 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
row i0 (row_mx A1 A2) = row_mx (row i0 A1) (row i0 A2).
Proof.
(* Goal: @eq (matrix R (S O) (addn n1 n2)) (@row m (addn n1 n2) i0 (@row_mx m n1 n2 A1 A2)) (@row_mx (S O) n1 n2 (@row m n1 i0 A1) (@row m n2 i0 A2)) *)
by apply/matrixP=> i j; rewrite !mxE; case: (split j) => j'; rewrite mxE.
Qed.
Lemma col_col_mx m1 m2 n j0 (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
col j0 (col_mx A1 A2) = col_mx (col j0 A1) (col j0 A2).
Proof.
(* Goal: @eq (matrix R (addn m1 m2) (S O)) (@col (addn m1 m2) n j0 (@col_mx m1 m2 n A1 A2)) (@col_mx m1 m2 (S O) (@col m1 n j0 A1) (@col m2 n j0 A2)) *)
by apply: trmx_inj; rewrite !(tr_col, tr_col_mx, row_row_mx).
Qed.
Lemma row'_row_mx m n1 n2 i0 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
row' i0 (row_mx A1 A2) = row_mx (row' i0 A1) (row' i0 A2).
Proof.
(* Goal: @eq (matrix R (Nat.pred m) (addn n1 n2)) (@row' m (addn n1 n2) i0 (@row_mx m n1 n2 A1 A2)) (@row_mx (Nat.pred m) n1 n2 (@row' m n1 i0 A1) (@row' m n2 i0 A2)) *)
by apply/matrixP=> i j; rewrite !mxE; case: (split j) => j'; rewrite mxE.
Qed.
Lemma col'_col_mx m1 m2 n j0 (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
col' j0 (col_mx A1 A2) = col_mx (col' j0 A1) (col' j0 A2).
Proof.
(* Goal: @eq (matrix R (addn m1 m2) (Nat.pred n)) (@col' (addn m1 m2) n j0 (@col_mx m1 m2 n A1 A2)) (@col_mx m1 m2 (Nat.pred n) (@col' m1 n j0 A1) (@col' m2 n j0 A2)) *)
by apply: trmx_inj; rewrite !(tr_col', tr_col_mx, row'_row_mx).
Qed.
Lemma colKl m n1 n2 j1 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
col (lshift n2 j1) (row_mx A1 A2) = col j1 A1.
Proof.
(* Goal: @eq (matrix R m (S O)) (@col m (addn n1 n2) (@lshift n1 n2 j1) (@row_mx m n1 n2 A1 A2)) (@col m n1 j1 A1) *)
by apply/matrixP=> i j; rewrite !(row_mxEl, mxE).
Qed.
Lemma colKr m n1 n2 j2 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
col (rshift n1 j2) (row_mx A1 A2) = col j2 A2.
Proof.
(* Goal: @eq (matrix R m (S O)) (@col m (addn n1 n2) (@rshift n1 n2 j2) (@row_mx m n1 n2 A1 A2)) (@col m n2 j2 A2) *)
by apply/matrixP=> i j; rewrite !(row_mxEr, mxE).
Qed.
Lemma rowKu m1 m2 n i1 (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
row (lshift m2 i1) (col_mx A1 A2) = row i1 A1.
Proof.
(* Goal: @eq (matrix R (S O) n) (@row (addn m1 m2) n (@lshift m1 m2 i1) (@col_mx m1 m2 n A1 A2)) (@row m1 n i1 A1) *)
by apply/matrixP=> i j; rewrite !(col_mxEu, mxE).
Qed.
Lemma rowKd m1 m2 n i2 (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
row (rshift m1 i2) (col_mx A1 A2) = row i2 A2.
Proof.
(* Goal: @eq (matrix R (S O) n) (@row (addn m1 m2) n (@rshift m1 m2 i2) (@col_mx m1 m2 n A1 A2)) (@row m2 n i2 A2) *)
by apply/matrixP=> i j; rewrite !(col_mxEd, mxE).
Qed.
Lemma col'Kl m n1 n2 j1 (A1 : 'M_(m, n1.+1)) (A2 : 'M_(m, n2)) :
Lemma row'Ku m1 m2 n i1 (A1 : 'M_(m1.+1, n)) (A2 : 'M_(m2, n)) :
Proof.
(* Goal: @eq (matrix R (Nat.pred (addn (S m1) m2)) n) (@row' (addn (S m1) m2) n (@lshift (S m1) m2 i1) (@col_mx (S m1) m2 n A1 A2)) (@col_mx (Nat.pred (S m1)) m2 n (@row' (S m1) n i1 A1) A2) *)
by apply: trmx_inj; rewrite tr_col_mx !(@tr_row' _.+1) (@tr_col_mx _.+1) col'Kl.
Qed.
Lemma mx'_cast m n : 'I_n -> (m + n.-1)%N = (m + n).-1.
Proof.
(* Goal: forall _ : ordinal n, @eq nat (addn m (Nat.pred n)) (Nat.pred (addn m n)) *)
by case=> j /ltn_predK <-; rewrite addnS.
Qed.
Lemma col'Kr m n1 n2 j2 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
col' (rshift n1 j2) (@row_mx m n1 n2 A1 A2)
= castmx (erefl m, mx'_cast n1 j2) (row_mx A1 (col' j2 A2)).
Lemma row'Kd m1 m2 n i2 (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
row' (rshift m1 i2) (col_mx A1 A2)
= castmx (mx'_cast m1 i2, erefl n) (col_mx A1 (row' i2 A2)).
Proof.
(* Goal: @eq (matrix R (Nat.pred (addn m1 m2)) n) (@row' (addn m1 m2) n (@rshift m1 m2 i2) (@col_mx m1 m2 n A1 A2)) (@castmx (addn m1 (Nat.pred m2)) n (Nat.pred (addn m1 m2)) n (@pair (@eq nat (addn m1 (Nat.pred m2)) (Nat.pred (addn m1 m2))) (@eq nat n n) (@mx'_cast m1 m2 i2) (@Logic.eq_refl nat n)) (@col_mx m1 (Nat.pred m2) n A1 (@row' m2 n i2 A2))) *)
by apply: trmx_inj; rewrite trmx_cast !(tr_row', tr_col_mx) col'Kr.
Qed.
Section Block.
Variables m1 m2 n1 n2 : nat.
Definition block_mx Aul Aur Adl Adr : 'M_(m1 + m2, n1 + n2) :=
col_mx (row_mx Aul Aur) (row_mx Adl Adr).
Lemma eq_block_mx Aul Aur Adl Adr Bul Bur Bdl Bdr :
block_mx Aul Aur Adl Adr = block_mx Bul Bur Bdl Bdr ->
[/\ Aul = Bul, Aur = Bur, Adl = Bdl & Adr = Bdr].
Proof.
(* Goal: forall _ : @eq (matrix R (addn m1 m2) (addn n1 n2)) (block_mx Aul Aur Adl Adr) (block_mx Bul Bur Bdl Bdr), and4 (@eq (matrix R m1 n1) Aul Bul) (@eq (matrix R m1 n2) Aur Bur) (@eq (matrix R m2 n1) Adl Bdl) (@eq (matrix R m2 n2) Adr Bdr) *)
by case/eq_col_mx; do 2!case/eq_row_mx=> -> ->.
Qed.
Lemma block_mx_const a :
block_mx (const_mx a) (const_mx a) (const_mx a) (const_mx a) = const_mx a.
Proof.
(* Goal: @eq (matrix R (addn m1 m2) (addn n1 n2)) (block_mx (@const_mx m1 n1 a) (@const_mx m1 n2 a) (@const_mx m2 n1 a) (@const_mx m2 n2 a)) (@const_mx (addn m1 m2) (addn n1 n2) a) *)
by split_mxE.
Qed.
Section CutBlock.
Variable A : matrix R (m1 + m2) (n1 + n2).
Definition ulsubmx := lsubmx (usubmx A).
Definition ursubmx := rsubmx (usubmx A).
Definition dlsubmx := lsubmx (dsubmx A).
Definition drsubmx := rsubmx (dsubmx A).
Lemma submxK : block_mx ulsubmx ursubmx dlsubmx drsubmx = A.
Proof.
(* Goal: @eq (matrix R (addn m1 m2) (addn n1 n2)) (block_mx ulsubmx ursubmx dlsubmx drsubmx) A *)
by rewrite /block_mx !hsubmxK vsubmxK.
Qed.
End CutBlock.
Section CatBlock.
Variables (Aul : 'M[R]_(m1, n1)) (Aur : 'M[R]_(m1, n2)).
Variables (Adl : 'M[R]_(m2, n1)) (Adr : 'M[R]_(m2, n2)).
Let A := block_mx Aul Aur Adl Adr.
Lemma block_mxEul i j : A (lshift m2 i) (lshift n2 j) = Aul i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R (addn m1 m2) (addn n1 n2) A (@lshift m1 m2 i) (@lshift n1 n2 j)) (@fun_of_matrix R m1 n1 Aul i j) *)
by rewrite col_mxEu row_mxEl.
Qed.
Lemma block_mxKul : ulsubmx A = Aul.
Proof.
(* Goal: @eq (matrix R m1 n1) (ulsubmx A) Aul *)
by rewrite /ulsubmx col_mxKu row_mxKl.
Qed.
Lemma block_mxEur i j : A (lshift m2 i) (rshift n1 j) = Aur i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R (addn m1 m2) (addn n1 n2) A (@lshift m1 m2 i) (@rshift n1 n2 j)) (@fun_of_matrix R m1 n2 Aur i j) *)
by rewrite col_mxEu row_mxEr.
Qed.
Lemma block_mxKur : ursubmx A = Aur.
Proof.
(* Goal: @eq (matrix R m1 n2) (ursubmx A) Aur *)
by rewrite /ursubmx col_mxKu row_mxKr.
Qed.
Lemma block_mxEdl i j : A (rshift m1 i) (lshift n2 j) = Adl i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R (addn m1 m2) (addn n1 n2) A (@rshift m1 m2 i) (@lshift n1 n2 j)) (@fun_of_matrix R m2 n1 Adl i j) *)
by rewrite col_mxEd row_mxEl.
Qed.
Lemma block_mxKdl : dlsubmx A = Adl.
Proof.
(* Goal: @eq (matrix R m2 n1) (dlsubmx A) Adl *)
by rewrite /dlsubmx col_mxKd row_mxKl.
Qed.
Lemma block_mxEdr i j : A (rshift m1 i) (rshift n1 j) = Adr i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R (addn m1 m2) (addn n1 n2) A (@rshift m1 m2 i) (@rshift n1 n2 j)) (@fun_of_matrix R m2 n2 Adr i j) *)
by rewrite col_mxEd row_mxEr.
Qed.
Lemma block_mxKdr : drsubmx A = Adr.
Proof.
(* Goal: @eq (matrix R m2 n2) (drsubmx A) Adr *)
by rewrite /drsubmx col_mxKd row_mxKr.
Qed.
Lemma block_mxEv : A = col_mx (row_mx Aul Aur) (row_mx Adl Adr).
Proof.
(* Goal: @eq (matrix R (addn m1 m2) (addn n1 n2)) A (@col_mx m1 m2 (addn n1 n2) (@row_mx m1 n1 n2 Aul Aur) (@row_mx m2 n1 n2 Adl Adr)) *)
by [].
Qed.
End CatBlock.
End Block.
Section TrCutBlock.
Variables m1 m2 n1 n2 : nat.
Variable A : 'M[R]_(m1 + m2, n1 + n2).
Lemma trmx_ulsub : (ulsubmx A)^T = ulsubmx A^T.
Proof.
(* Goal: @eq (matrix R n1 m1) (@trmx m1 n1 (@ulsubmx m1 m2 n1 n2 A)) (@ulsubmx n1 n2 m1 m2 (@trmx (addn m1 m2) (addn n1 n2) A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma trmx_ursub : (ursubmx A)^T = dlsubmx A^T.
Proof.
(* Goal: @eq (matrix R n2 m1) (@trmx m1 n2 (@ursubmx m1 m2 n1 n2 A)) (@dlsubmx n1 n2 m1 m2 (@trmx (addn m1 m2) (addn n1 n2) A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma trmx_dlsub : (dlsubmx A)^T = ursubmx A^T.
Proof.
(* Goal: @eq (matrix R n1 m2) (@trmx m2 n1 (@dlsubmx m1 m2 n1 n2 A)) (@ursubmx n1 n2 m1 m2 (@trmx (addn m1 m2) (addn n1 n2) A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma trmx_drsub : (drsubmx A)^T = drsubmx A^T.
Proof.
(* Goal: @eq (matrix R n2 m2) (@trmx m2 n2 (@drsubmx m1 m2 n1 n2 A)) (@drsubmx n1 n2 m1 m2 (@trmx (addn m1 m2) (addn n1 n2) A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
End TrCutBlock.
Section TrBlock.
Variables m1 m2 n1 n2 : nat.
Variables (Aul : 'M[R]_(m1, n1)) (Aur : 'M[R]_(m1, n2)).
Variables (Adl : 'M[R]_(m2, n1)) (Adr : 'M[R]_(m2, n2)).
Lemma tr_block_mx :
(block_mx Aul Aur Adl Adr)^T = block_mx Aul^T Adl^T Aur^T Adr^T.
Proof.
(* Goal: @eq (matrix R (addn n1 n2) (addn m1 m2)) (@trmx (addn m1 m2) (addn n1 n2) (@block_mx m1 m2 n1 n2 Aul Aur Adl Adr)) (@block_mx n1 n2 m1 m2 (@trmx m1 n1 Aul) (@trmx m2 n1 Adl) (@trmx m1 n2 Aur) (@trmx m2 n2 Adr)) *)
rewrite -[_^T]submxK -trmx_ulsub -trmx_ursub -trmx_dlsub -trmx_drsub.
(* Goal: @eq (matrix R (addn n1 n2) (addn m1 m2)) (@block_mx n1 n2 m1 m2 (@trmx m1 n1 (@ulsubmx m1 m2 n1 n2 (@block_mx m1 m2 n1 n2 Aul Aur Adl Adr))) (@trmx m2 n1 (@dlsubmx m1 m2 n1 n2 (@block_mx m1 m2 n1 n2 Aul Aur Adl Adr))) (@trmx m1 n2 (@ursubmx m1 m2 n1 n2 (@block_mx m1 m2 n1 n2 Aul Aur Adl Adr))) (@trmx m2 n2 (@drsubmx m1 m2 n1 n2 (@block_mx m1 m2 n1 n2 Aul Aur Adl Adr)))) (@block_mx n1 n2 m1 m2 (@trmx m1 n1 Aul) (@trmx m2 n1 Adl) (@trmx m1 n2 Aur) (@trmx m2 n2 Adr)) *)
by rewrite block_mxKul block_mxKur block_mxKdl block_mxKdr.
Qed.
Lemma block_mxEh :
block_mx Aul Aur Adl Adr = row_mx (col_mx Aul Adl) (col_mx Aur Adr).
Proof.
(* Goal: @eq (matrix R (addn m1 m2) (addn n1 n2)) (@block_mx m1 m2 n1 n2 Aul Aur Adl Adr) (@row_mx (addn m1 m2) n1 n2 (@col_mx m1 m2 n1 Aul Adl) (@col_mx m1 m2 n2 Aur Adr)) *)
by apply: trmx_inj; rewrite tr_block_mx tr_row_mx 2!tr_col_mx.
Qed.
End TrBlock.
Lemma block_mxA m1 m2 m3 n1 n2 n3
(A11 : 'M_(m1, n1)) (A12 : 'M_(m1, n2)) (A13 : 'M_(m1, n3))
(A21 : 'M_(m2, n1)) (A22 : 'M_(m2, n2)) (A23 : 'M_(m2, n3))
(A31 : 'M_(m3, n1)) (A32 : 'M_(m3, n2)) (A33 : 'M_(m3, n3)) :
let cast := (esym (addnA m1 m2 m3), esym (addnA n1 n2 n3)) in
let row1 := row_mx A12 A13 in let col1 := col_mx A21 A31 in
let row3 := row_mx A31 A32 in let col3 := col_mx A13 A23 in
block_mx A11 row1 col1 (block_mx A22 A23 A32 A33)
= castmx cast (block_mx (block_mx A11 A12 A21 A22) col3 row3 A33).
Proof.
(* Goal: let cast : prod (@eq nat (addn (addn m1 m2) m3) (addn m1 (addn m2 m3))) (@eq nat (addn (addn n1 n2) n3) (addn n1 (addn n2 n3))) := @pair (@eq nat (addn (addn m1 m2) m3) (addn m1 (addn m2 m3))) (@eq nat (addn (addn n1 n2) n3) (addn n1 (addn n2 n3))) (@esym nat (addn m1 (addn m2 m3)) (addn (addn m1 m2) m3) (addnA m1 m2 m3)) (@esym nat (addn n1 (addn n2 n3)) (addn (addn n1 n2) n3) (addnA n1 n2 n3)) in let row1 := @row_mx m1 n2 n3 A12 A13 in let col1 := @col_mx m2 m3 n1 A21 A31 in let row3 := @row_mx m3 n1 n2 A31 A32 in let col3 := @col_mx m1 m2 n3 A13 A23 in @eq (matrix R (addn m1 (addn m2 m3)) (addn n1 (addn n2 n3))) (@block_mx m1 (addn m2 m3) n1 (addn n2 n3) A11 row1 col1 (@block_mx m2 m3 n2 n3 A22 A23 A32 A33)) (@castmx (addn (addn m1 m2) m3) (addn (addn n1 n2) n3) (addn m1 (addn m2 m3)) (addn n1 (addn n2 n3)) cast (@block_mx (addn m1 m2) m3 (addn n1 n2) n3 (@block_mx m1 m2 n1 n2 A11 A12 A21 A22) col3 row3 A33)) *)
rewrite /= block_mxEh !col_mxA -cast_row_mx -block_mxEv -block_mxEh.
(* Goal: @eq (matrix R (addn m1 (addn m2 m3)) (addn n1 (addn n2 n3))) (@castmx (addn (addn m1 m2) m3) (addn n1 (addn n2 n3)) (addn m1 (addn m2 m3)) (addn n1 (addn n2 n3)) (@pair (@eq nat (addn (addn m1 m2) m3) (addn m1 (addn m2 m3))) (@eq nat (addn n1 (addn n2 n3)) (addn n1 (addn n2 n3))) (@esym nat (addn m1 (addn m2 m3)) (addn (addn m1 m2) m3) (addnA m1 m2 m3)) (@Logic.eq_refl nat (addn n1 (addn n2 n3)))) (@block_mx (addn m1 m2) m3 n1 (addn n2 n3) (@col_mx m1 m2 n1 A11 A21) (@block_mx m1 m2 n2 n3 A12 A13 A22 A23) A31 (@row_mx m3 n2 n3 A32 A33))) (@castmx (addn (addn m1 m2) m3) (addn (addn n1 n2) n3) (addn m1 (addn m2 m3)) (addn n1 (addn n2 n3)) (@pair (@eq nat (addn (addn m1 m2) m3) (addn m1 (addn m2 m3))) (@eq nat (addn (addn n1 n2) n3) (addn n1 (addn n2 n3))) (@esym nat (addn m1 (addn m2 m3)) (addn (addn m1 m2) m3) (addnA m1 m2 m3)) (@esym nat (addn n1 (addn n2 n3)) (addn (addn n1 n2) n3) (addnA n1 n2 n3))) (@block_mx (addn m1 m2) m3 (addn n1 n2) n3 (@block_mx m1 m2 n1 n2 A11 A12 A21 A22) (@col_mx m1 m2 n3 A13 A23) (@row_mx m3 n1 n2 A31 A32) A33)) *)
rewrite block_mxEv block_mxEh !row_mxA -cast_col_mx -block_mxEh -block_mxEv.
(* Goal: @eq (matrix R (addn m1 (addn m2 m3)) (addn n1 (addn n2 n3))) (@castmx (addn (addn m1 m2) m3) (addn n1 (addn n2 n3)) (addn m1 (addn m2 m3)) (addn n1 (addn n2 n3)) (@pair (@eq nat (addn (addn m1 m2) m3) (addn m1 (addn m2 m3))) (@eq nat (addn n1 (addn n2 n3)) (addn n1 (addn n2 n3))) (@esym nat (addn m1 (addn m2 m3)) (addn (addn m1 m2) m3) (addnA m1 m2 m3)) (@Logic.eq_refl nat (addn n1 (addn n2 n3)))) (@castmx (addn (addn m1 m2) m3) (addn (addn n1 n2) n3) (addn (addn m1 m2) m3) (addn n1 (addn n2 n3)) (@pair (@eq nat (addn (addn m1 m2) m3) (addn (addn m1 m2) m3)) (@eq nat (addn (addn n1 n2) n3) (addn n1 (addn n2 n3))) (@Logic.eq_refl nat (addn (addn m1 m2) m3)) (@esym nat (addn n1 (addn n2 n3)) (addn (addn n1 n2) n3) (addnA n1 n2 n3))) (@block_mx (addn m1 m2) m3 (addn n1 n2) n3 (@block_mx m1 m2 n1 n2 A11 A12 A21 A22) (@col_mx m1 m2 n3 A13 A23) (@row_mx m3 n1 n2 A31 A32) A33))) (@castmx (addn (addn m1 m2) m3) (addn (addn n1 n2) n3) (addn m1 (addn m2 m3)) (addn n1 (addn n2 n3)) (@pair (@eq nat (addn (addn m1 m2) m3) (addn m1 (addn m2 m3))) (@eq nat (addn (addn n1 n2) n3) (addn n1 (addn n2 n3))) (@esym nat (addn m1 (addn m2 m3)) (addn (addn m1 m2) m3) (addnA m1 m2 m3)) (@esym nat (addn n1 (addn n2 n3)) (addn (addn n1 n2) n3) (addnA n1 n2 n3))) (@block_mx (addn m1 m2) m3 (addn n1 n2) n3 (@block_mx m1 m2 n1 n2 A11 A12 A21 A22) (@col_mx m1 m2 n3 A13 A23) (@row_mx m3 n1 n2 A31 A32) A33)) *)
by rewrite castmx_comp etrans_id.
Qed.
Definition block_mxAx := block_mxA.
Section VecMatrix.
Variables m n : nat.
Lemma mxvec_cast : #|{:'I_m * 'I_n}| = (m * n)%N.
Proof.
(* Goal: @eq nat (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n) : predArgType)) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n) : predArgType) (pred_of_argType (prod (ordinal m) (ordinal n) : predArgType))))) (muln m n) *)
by rewrite card_prod !card_ord.
Qed.
Definition mxvec_index (i : 'I_m) (j : 'I_n) :=
cast_ord mxvec_cast (enum_rank (i, j)).
Variant is_mxvec_index : 'I_(m * n) -> Type :=
IsMxvecIndex i j : is_mxvec_index (mxvec_index i j).
Lemma mxvec_indexP k : is_mxvec_index k.
Proof.
(* Goal: is_mxvec_index k *)
rewrite -[k](cast_ordK (esym mxvec_cast)) esymK.
(* Goal: is_mxvec_index (@cast_ord (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (muln m n) mxvec_cast (@cast_ord (muln m n) (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (@esym nat (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (muln m n) mxvec_cast) k)) *)
by rewrite -[_ k]enum_valK; case: (enum_val _).
Qed.
Coercion pair_of_mxvec_index k (i_k : is_mxvec_index k) :=
let: IsMxvecIndex i j := i_k in (i, j).
Definition mxvec (A : 'M[R]_(m, n)) :=
castmx (erefl _, mxvec_cast) (\row_k A (enum_val k).1 (enum_val k).2).
Definition vec_mx (u : 'rV[R]_(m * n)) :=
\matrix[vec_mx_key]_(i, j) u 0 (mxvec_index i j).
Lemma mxvecE A i j : mxvec A 0 (mxvec_index i j) = A i j.
Proof.
(* Goal: @eq R (@fun_of_matrix R (S O) (muln m n) (mxvec A) (GRing.zero (Zp_zmodType O)) (mxvec_index i j)) (@fun_of_matrix R m n A i j) *)
by rewrite castmxE mxE cast_ordK enum_rankK.
Qed.
Lemma mxvecK : cancel mxvec vec_mx.
Proof.
(* Goal: @cancel (matrix R (S O) (muln m n)) (matrix R m n) mxvec vec_mx *)
by move=> A; apply/matrixP=> i j; rewrite mxE mxvecE.
Qed.
Lemma vec_mxK : cancel vec_mx mxvec.
Proof.
(* Goal: @cancel (matrix R m n) (matrix R (S O) (muln m n)) vec_mx mxvec *)
by move=> u; apply/rowP=> k; case/mxvec_indexP: k => i j; rewrite mxvecE mxE.
Qed.
Lemma curry_mxvec_bij : {on 'I_(m * n), bijective (prod_curry mxvec_index)}.
Proof.
(* Goal: @bijective_on (prod (ordinal m) (ordinal n)) (ordinal (muln m n)) (@mem (ordinal (muln m n)) (predPredType (ordinal (muln m n))) (@sort_of_simpl_pred (ordinal (muln m n)) (pred_of_argType (ordinal (muln m n))))) (@prod_curry (ordinal m) (ordinal n) (ordinal (muln m n)) mxvec_index) *)
exists (enum_val \o cast_ord (esym mxvec_cast)) => [[i j] _ | k _] /=.
(* Goal: @eq (ordinal (muln m n)) (@prod_curry (ordinal m) (ordinal n) (ordinal (muln m n)) mxvec_index (@enum_val (prod_finType (ordinal_finType m) (ordinal_finType n)) (fun _ : prod (ordinal m) (ordinal n) => true) (@cast_ord (muln m n) (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (@esym nat (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (muln m n) mxvec_cast) k))) k *)
(* Goal: @eq (prod (ordinal m) (ordinal n)) (@enum_val (prod_finType (ordinal_finType m) (ordinal_finType n)) (fun _ : prod (ordinal m) (ordinal n) => true) (@cast_ord (muln m n) (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (@esym nat (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (muln m n) mxvec_cast) (mxvec_index i j))) (@pair (ordinal m) (ordinal n) i j) *)
by rewrite cast_ordK enum_rankK.
(* Goal: @eq (ordinal (muln m n)) (@prod_curry (ordinal m) (ordinal n) (ordinal (muln m n)) mxvec_index (@enum_val (prod_finType (ordinal_finType m) (ordinal_finType n)) (fun _ : prod (ordinal m) (ordinal n) => true) (@cast_ord (muln m n) (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (@esym nat (@card (prod_finType (ordinal_finType m) (ordinal_finType n)) (@mem (prod (ordinal m) (ordinal n)) (predPredType (prod (ordinal m) (ordinal n))) (@sort_of_simpl_pred (prod (ordinal m) (ordinal n)) (pred_of_argType (prod (ordinal m) (ordinal n)))))) (muln m n) mxvec_cast) k))) k *)
by case/mxvec_indexP: k => i j /=; rewrite cast_ordK enum_rankK.
Qed.
Definition map_mx m n (A : 'M_(m, n)) := \matrix[map_mx_key]_(i, j) f (A i j).
Notation "A ^f" := (map_mx A) : ring_scope.
Section OneMatrix.
Variables (m n : nat) (A : 'M[aT]_(m, n)).
Lemma map_trmx : A^f^T = A^T^f.
Proof.
(* Goal: @eq (matrix rT n m) (@trmx rT m n (@map_mx m n A)) (@map_mx n m (@trmx aT m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_const_mx a : (const_mx a)^f = const_mx (f a) :> 'M_(m, n).
Proof.
(* Goal: @eq (matrix rT m n) (@map_mx m n (@const_mx aT m n a)) (@const_mx rT m n (f a)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_row i : (row i A)^f = row i A^f.
Proof.
(* Goal: @eq (matrix rT (S O) n) (@map_mx (S O) n (@row aT m n i A)) (@row rT m n i (@map_mx m n A)) *)
by apply/rowP=> j; rewrite !mxE.
Qed.
Lemma map_col j : (col j A)^f = col j A^f.
Proof.
(* Goal: @eq (matrix rT m (S O)) (@map_mx m (S O) (@col aT m n j A)) (@col rT m n j (@map_mx m n A)) *)
by apply/colP=> i; rewrite !mxE.
Qed.
Lemma map_row' i0 : (row' i0 A)^f = row' i0 A^f.
Proof.
(* Goal: @eq (matrix rT (Nat.pred m) n) (@map_mx (Nat.pred m) n (@row' aT m n i0 A)) (@row' rT m n i0 (@map_mx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_col' j0 : (col' j0 A)^f = col' j0 A^f.
Proof.
(* Goal: @eq (matrix rT m (Nat.pred n)) (@map_mx m (Nat.pred n) (@col' aT m n j0 A)) (@col' rT m n j0 (@map_mx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_row_perm s : (row_perm s A)^f = row_perm s A^f.
Proof.
(* Goal: @eq (matrix rT m n) (@map_mx m n (@row_perm aT m n s A)) (@row_perm rT m n s (@map_mx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_col_perm s : (col_perm s A)^f = col_perm s A^f.
Proof.
(* Goal: @eq (matrix rT m n) (@map_mx m n (@col_perm aT m n s A)) (@col_perm rT m n s (@map_mx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_xrow i1 i2 : (xrow i1 i2 A)^f = xrow i1 i2 A^f.
Proof.
(* Goal: @eq (matrix rT m n) (@map_mx m n (@xrow aT m n i1 i2 A)) (@xrow rT m n i1 i2 (@map_mx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_xcol j1 j2 : (xcol j1 j2 A)^f = xcol j1 j2 A^f.
Proof.
(* Goal: @eq (matrix rT m n) (@map_mx m n (@xcol aT m n j1 j2 A)) (@xcol rT m n j1 j2 (@map_mx m n A)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_castmx m' n' c : (castmx c A)^f = castmx c A^f :> 'M_(m', n').
Proof.
(* Goal: @eq (matrix rT m' n') (@map_mx m' n' (@castmx aT m n m' n' c A)) (@castmx rT m n m' n' c (@map_mx m n A)) *)
by apply/matrixP=> i j; rewrite !(castmxE, mxE).
Qed.
Lemma map_conform_mx m' n' (B : 'M_(m', n')) :
(conform_mx B A)^f = conform_mx B^f A^f.
Proof.
(* Goal: @eq (matrix rT m' n') (@map_mx m' n' (@conform_mx aT m n m' n' B A)) (@conform_mx rT m n m' n' (@map_mx m' n' B) (@map_mx m n A)) *)
move: B; have [[<- <-] B|] := eqVneq (m, n) (m', n').
(* Goal: forall (_ : is_true (negb (@eq_op (prod_eqType nat_eqType nat_eqType) (@pair nat nat m n) (@pair nat nat m' n')))) (B : matrix aT m' n'), @eq (matrix rT m' n') (@map_mx m' n' (@conform_mx aT m n m' n' B A)) (@conform_mx rT m n m' n' (@map_mx m' n' B) (@map_mx m n A)) *)
(* Goal: @eq (matrix rT m n) (@map_mx m n (@conform_mx aT m n m n B A)) (@conform_mx rT m n m n (@map_mx m n B) (@map_mx m n A)) *)
by rewrite !conform_mx_id.
(* Goal: forall (_ : is_true (negb (@eq_op (prod_eqType nat_eqType nat_eqType) (@pair nat nat m n) (@pair nat nat m' n')))) (B : matrix aT m' n'), @eq (matrix rT m' n') (@map_mx m' n' (@conform_mx aT m n m' n' B A)) (@conform_mx rT m n m' n' (@map_mx m' n' B) (@map_mx m n A)) *)
by rewrite negb_and => neq_mn B; rewrite !nonconform_mx.
Qed.
Lemma map_mxvec : (mxvec A)^f = mxvec A^f.
Proof.
(* Goal: @eq (matrix rT (S O) (muln m n)) (@map_mx (S O) (muln m n) (@mxvec aT m n A)) (@mxvec rT m n (@map_mx m n A)) *)
by apply/rowP=> i; rewrite !(castmxE, mxE).
Qed.
Lemma map_vec_mx (v : 'rV_(m * n)) : (vec_mx v)^f = vec_mx v^f.
Proof.
(* Goal: @eq (matrix rT m n) (@map_mx m n (@vec_mx aT m n v)) (@vec_mx rT m n (@map_mx (S O) (muln m n) v)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
End OneMatrix.
Section Block.
Variables m1 m2 n1 n2 : nat.
Variables (Aul : 'M[aT]_(m1, n1)) (Aur : 'M[aT]_(m1, n2)).
Variables (Adl : 'M[aT]_(m2, n1)) (Adr : 'M[aT]_(m2, n2)).
Variables (Bh : 'M[aT]_(m1, n1 + n2)) (Bv : 'M[aT]_(m1 + m2, n1)).
Variable B : 'M[aT]_(m1 + m2, n1 + n2).
Lemma map_row_mx : (row_mx Aul Aur)^f = row_mx Aul^f Aur^f.
Proof.
(* Goal: @eq (matrix rT m1 (addn n1 n2)) (@map_mx m1 (addn n1 n2) (@row_mx aT m1 n1 n2 Aul Aur)) (@row_mx rT m1 n1 n2 (@map_mx m1 n1 Aul) (@map_mx m1 n2 Aur)) *)
by apply/matrixP=> i j; do 2![rewrite !mxE //; case: split => ?].
Qed.
Lemma map_col_mx : (col_mx Aul Adl)^f = col_mx Aul^f Adl^f.
Proof.
(* Goal: @eq (matrix rT (addn m1 m2) n1) (@map_mx (addn m1 m2) n1 (@col_mx aT m1 m2 n1 Aul Adl)) (@col_mx rT m1 m2 n1 (@map_mx m1 n1 Aul) (@map_mx m2 n1 Adl)) *)
by apply/matrixP=> i j; do 2![rewrite !mxE //; case: split => ?].
Qed.
Lemma map_block_mx :
(block_mx Aul Aur Adl Adr)^f = block_mx Aul^f Aur^f Adl^f Adr^f.
Proof.
(* Goal: @eq (matrix rT (addn m1 m2) (addn n1 n2)) (@map_mx (addn m1 m2) (addn n1 n2) (@block_mx aT m1 m2 n1 n2 Aul Aur Adl Adr)) (@block_mx rT m1 m2 n1 n2 (@map_mx m1 n1 Aul) (@map_mx m1 n2 Aur) (@map_mx m2 n1 Adl) (@map_mx m2 n2 Adr)) *)
by apply/matrixP=> i j; do 3![rewrite !mxE //; case: split => ?].
Qed.
Lemma map_lsubmx : (lsubmx Bh)^f = lsubmx Bh^f.
Proof.
(* Goal: @eq (matrix rT m1 n1) (@map_mx m1 n1 (@lsubmx aT m1 n1 n2 Bh)) (@lsubmx rT m1 n1 n2 (@map_mx m1 (addn n1 n2) Bh)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_rsubmx : (rsubmx Bh)^f = rsubmx Bh^f.
Proof.
(* Goal: @eq (matrix rT m1 n2) (@map_mx m1 n2 (@rsubmx aT m1 n1 n2 Bh)) (@rsubmx rT m1 n1 n2 (@map_mx m1 (addn n1 n2) Bh)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_usubmx : (usubmx Bv)^f = usubmx Bv^f.
Proof.
(* Goal: @eq (matrix rT m1 n1) (@map_mx m1 n1 (@usubmx aT m1 m2 n1 Bv)) (@usubmx rT m1 m2 n1 (@map_mx (addn m1 m2) n1 Bv)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_dsubmx : (dsubmx Bv)^f = dsubmx Bv^f.
Proof.
(* Goal: @eq (matrix rT m2 n1) (@map_mx m2 n1 (@dsubmx aT m1 m2 n1 Bv)) (@dsubmx rT m1 m2 n1 (@map_mx (addn m1 m2) n1 Bv)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_ulsubmx : (ulsubmx B)^f = ulsubmx B^f.
Proof.
(* Goal: @eq (matrix rT m1 n1) (@map_mx m1 n1 (@ulsubmx aT m1 m2 n1 n2 B)) (@ulsubmx rT m1 m2 n1 n2 (@map_mx (addn m1 m2) (addn n1 n2) B)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_ursubmx : (ursubmx B)^f = ursubmx B^f.
Proof.
(* Goal: @eq (matrix rT m1 n2) (@map_mx m1 n2 (@ursubmx aT m1 m2 n1 n2 B)) (@ursubmx rT m1 m2 n1 n2 (@map_mx (addn m1 m2) (addn n1 n2) B)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_dlsubmx : (dlsubmx B)^f = dlsubmx B^f.
Proof.
(* Goal: @eq (matrix rT m2 n1) (@map_mx m2 n1 (@dlsubmx aT m1 m2 n1 n2 B)) (@dlsubmx rT m1 m2 n1 n2 (@map_mx (addn m1 m2) (addn n1 n2) B)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma map_drsubmx : (drsubmx B)^f = drsubmx B^f.
Proof.
(* Goal: @eq (matrix rT m2 n2) (@map_mx m2 n2 (@drsubmx aT m1 m2 n1 n2 B)) (@drsubmx rT m1 m2 n1 n2 (@map_mx (addn m1 m2) (addn n1 n2) B)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
End Block.
End MapMatrix.
Arguments map_mx {aT rT} f {m n} A.
Section MatrixZmodule.
Variable V : zmodType.
Section FixedDim.
Variables m n : nat.
Implicit Types A B : 'M[V]_(m, n).
Fact oppmx_key : unit. Proof. by []. Qed.
Proof.
(* Goal: unit *)
by [].
Qed.
Definition oppmx A := \matrix[oppmx_key]_(i, j) (- A i j).
Definition addmx A B := \matrix[addmx_key]_(i, j) (A i j + B i j).
Lemma addmxA : associative addmx.
Proof.
(* Goal: @associative (matrix (GRing.Zmodule.sort V) m n) addmx *)
by move=> A B C; apply/matrixP=> i j; rewrite !mxE addrA.
Qed.
Lemma addmxC : commutative addmx.
Proof.
(* Goal: @commutative (matrix (GRing.Zmodule.sort V) m n) (matrix (GRing.Zmodule.sort V) m n) addmx *)
by move=> A B; apply/matrixP=> i j; rewrite !mxE addrC.
Qed.
Lemma add0mx : left_id (const_mx 0) addmx.
Proof.
(* Goal: @left_id (matrix (GRing.Zmodule.sort V) m n) (matrix (GRing.Zmodule.sort V) m n) (@const_mx (GRing.Zmodule.sort V) m n (GRing.zero V)) addmx *)
by move=> A; apply/matrixP=> i j; rewrite !mxE add0r.
Qed.
Lemma addNmx : left_inverse (const_mx 0) oppmx addmx.
Proof.
(* Goal: @left_inverse (matrix (GRing.Zmodule.sort V) m n) (matrix (GRing.Zmodule.sort V) m n) (matrix (GRing.Zmodule.sort V) m n) (@const_mx (GRing.Zmodule.sort V) m n (GRing.zero V)) oppmx addmx *)
by move=> A; apply/matrixP=> i j; rewrite !mxE addNr.
Qed.
Definition matrix_zmodMixin := ZmodMixin addmxA addmxC add0mx addNmx.
Canonical matrix_zmodType := Eval hnf in ZmodType 'M[V]_(m, n) matrix_zmodMixin.
Lemma mulmxnE A d i j : (A *+ d) i j = A i j *+ d.
Proof.
(* Goal: @eq (GRing.Zmodule.sort V) (@fun_of_matrix (GRing.Zmodule.sort V) m n (@GRing.natmul matrix_zmodType A d) i j) (@GRing.natmul V (@fun_of_matrix (GRing.Zmodule.sort V) m n A i j) d) *)
by elim: d => [|d IHd]; rewrite ?mulrS mxE ?IHd.
Qed.
Lemma summxE I r (P : pred I) (E : I -> 'M_(m, n)) i j :
(\sum_(k <- r | P k) E k) i j = \sum_(k <- r | P k) E k i j.
Proof.
(* Goal: @eq (GRing.Zmodule.sort V) (@fun_of_matrix (GRing.Zmodule.sort V) m n (@BigOp.bigop (GRing.Zmodule.sort matrix_zmodType) I (GRing.zero matrix_zmodType) r (fun k : I => @BigBody (GRing.Zmodule.sort matrix_zmodType) I k (@GRing.add matrix_zmodType) (P k) (E k))) i j) (@BigOp.bigop (GRing.Zmodule.sort V) I (GRing.zero V) r (fun k : I => @BigBody (GRing.Zmodule.sort V) I k (@GRing.add V) (P k) (@fun_of_matrix (GRing.Zmodule.sort V) m n (E k) i j))) *)
by apply: (big_morph (fun A => A i j)) => [A B|]; rewrite mxE.
Qed.
Lemma const_mx_is_additive : additive const_mx.
Proof.
(* Goal: @GRing.Additive.axiom V matrix_zmodType (@const_mx (GRing.Zmodule.sort V) m n) *)
by move=> a b; apply/matrixP=> i j; rewrite !mxE.
Qed.
Canonical const_mx_additive := Additive const_mx_is_additive.
End FixedDim.
Section Additive.
Variables (m n p q : nat) (f : 'I_p -> 'I_q -> 'I_m) (g : 'I_p -> 'I_q -> 'I_n).
Definition swizzle_mx k (A : 'M[V]_(m, n)) :=
\matrix[k]_(i, j) A (f i j) (g i j).
Lemma swizzle_mx_is_additive k : additive (swizzle_mx k).
Proof.
(* Goal: @GRing.Additive.axiom (matrix_zmodType m n) (matrix_zmodType p q) (swizzle_mx k) *)
by move=> A B; apply/matrixP=> i j; rewrite !mxE.
Qed.
Canonical swizzle_mx_additive k := Additive (swizzle_mx_is_additive k).
End Additive.
Local Notation SwizzleAdd op := [additive of op as swizzle_mx _ _ _].
Canonical trmx_additive m n := SwizzleAdd (@trmx V m n).
Canonical row_additive m n i := SwizzleAdd (@row V m n i).
Canonical col_additive m n j := SwizzleAdd (@col V m n j).
Canonical row'_additive m n i := SwizzleAdd (@row' V m n i).
Canonical col'_additive m n j := SwizzleAdd (@col' V m n j).
Canonical row_perm_additive m n s := SwizzleAdd (@row_perm V m n s).
Canonical col_perm_additive m n s := SwizzleAdd (@col_perm V m n s).
Canonical xrow_additive m n i1 i2 := SwizzleAdd (@xrow V m n i1 i2).
Canonical xcol_additive m n j1 j2 := SwizzleAdd (@xcol V m n j1 j2).
Canonical lsubmx_additive m n1 n2 := SwizzleAdd (@lsubmx V m n1 n2).
Canonical rsubmx_additive m n1 n2 := SwizzleAdd (@rsubmx V m n1 n2).
Canonical usubmx_additive m1 m2 n := SwizzleAdd (@usubmx V m1 m2 n).
Canonical dsubmx_additive m1 m2 n := SwizzleAdd (@dsubmx V m1 m2 n).
Canonical vec_mx_additive m n := SwizzleAdd (@vec_mx V m n).
Canonical mxvec_additive m n :=
Additive (can2_additive (@vec_mxK V m n) mxvecK).
Lemma flatmx0 n : all_equal_to (0 : 'M_(0, n)).
Proof.
(* Goal: @all_equal_to (matrix (GRing.Zmodule.sort V) O n) (GRing.zero (matrix_zmodType O n) : matrix (GRing.Zmodule.sort V) O n) *)
by move=> A; apply/matrixP=> [] [].
Qed.
Lemma thinmx0 n : all_equal_to (0 : 'M_(n, 0)).
Proof.
(* Goal: @all_equal_to (matrix (GRing.Zmodule.sort V) n O) (GRing.zero (matrix_zmodType n O) : matrix (GRing.Zmodule.sort V) n O) *)
by move=> A; apply/matrixP=> i [].
Qed.
Lemma trmx0 m n : (0 : 'M_(m, n))^T = 0.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort V) n m) (@trmx (GRing.Zmodule.sort V) m n (GRing.zero (matrix_zmodType m n) : matrix (GRing.Zmodule.sort V) m n)) (GRing.zero (matrix_zmodType n m)) *)
exact: trmx_const.
Qed.
Lemma row0 m n i0 : row i0 (0 : 'M_(m, n)) = 0.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort V) (S O) n) (@row (GRing.Zmodule.sort V) m n i0 (GRing.zero (matrix_zmodType m n) : matrix (GRing.Zmodule.sort V) m n)) (GRing.zero (matrix_zmodType (S O) n)) *)
exact: row_const.
Qed.
Lemma col0 m n j0 : col j0 (0 : 'M_(m, n)) = 0.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort V) m (S O)) (@col (GRing.Zmodule.sort V) m n j0 (GRing.zero (matrix_zmodType m n) : matrix (GRing.Zmodule.sort V) m n)) (GRing.zero (matrix_zmodType m (S O))) *)
exact: col_const.
Qed.
Lemma mxvec_eq0 m n (A : 'M_(m, n)) : (mxvec A == 0) = (A == 0).
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) (S O) (muln m n)) (@mxvec (Equality.sort (GRing.Zmodule.eqType V)) m n A) (GRing.zero (matrix_zmodType (S O) (muln m n)))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m n) A (GRing.zero (matrix_zmodType m n))) *)
by rewrite (can2_eq mxvecK vec_mxK) raddf0.
Qed.
Lemma vec_mx_eq0 m n (v : 'rV_(m * n)) : (vec_mx v == 0) = (v == 0).
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m n) (@vec_mx (Equality.sort (GRing.Zmodule.eqType V)) m n v) (GRing.zero (matrix_zmodType m n))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) (S O) (muln m n)) v (GRing.zero (matrix_zmodType (S O) (muln m n)))) *)
by rewrite (can2_eq vec_mxK mxvecK) raddf0.
Qed.
Lemma row_mx0 m n1 n2 : row_mx 0 0 = 0 :> 'M_(m, n1 + n2).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort V) m (addn n1 n2)) (@row_mx (GRing.Zmodule.sort V) m n1 n2 (GRing.zero (matrix_zmodType m n1)) (GRing.zero (matrix_zmodType m n2))) (GRing.zero (matrix_zmodType m (addn n1 n2))) *)
exact: row_mx_const.
Qed.
Lemma col_mx0 m1 m2 n : col_mx 0 0 = 0 :> 'M_(m1 + m2, n).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort V) (addn m1 m2) n) (@col_mx (GRing.Zmodule.sort V) m1 m2 n (GRing.zero (matrix_zmodType m1 n)) (GRing.zero (matrix_zmodType m2 n))) (GRing.zero (matrix_zmodType (addn m1 m2) n)) *)
exact: col_mx_const.
Qed.
Lemma block_mx0 m1 m2 n1 n2 : block_mx 0 0 0 0 = 0 :> 'M_(m1 + m2, n1 + n2).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort V) (addn m1 m2) (addn n1 n2)) (@block_mx (GRing.Zmodule.sort V) m1 m2 n1 n2 (GRing.zero (matrix_zmodType m1 n1)) (GRing.zero (matrix_zmodType m1 n2)) (GRing.zero (matrix_zmodType m2 n1)) (GRing.zero (matrix_zmodType m2 n2))) (GRing.zero (matrix_zmodType (addn m1 m2) (addn n1 n2))) *)
exact: block_mx_const.
Qed.
Ltac split_mxE := apply/matrixP=> i j; do ![rewrite mxE | case: split => ?].
Lemma opp_row_mx m n1 n2 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
- row_mx A1 A2 = row_mx (- A1) (- A2).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType m (addn n1 n2))) (@GRing.opp (matrix_zmodType m (addn n1 n2)) (@row_mx (GRing.Zmodule.sort V) m n1 n2 A1 A2)) (@row_mx (GRing.Zmodule.sort V) m n1 n2 (@GRing.opp (matrix_zmodType m n1) A1) (@GRing.opp (matrix_zmodType m n2) A2)) *)
by split_mxE.
Qed.
Lemma opp_col_mx m1 m2 n (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
- col_mx A1 A2 = col_mx (- A1) (- A2).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (addn m1 m2) n)) (@GRing.opp (matrix_zmodType (addn m1 m2) n) (@col_mx (GRing.Zmodule.sort V) m1 m2 n A1 A2)) (@col_mx (GRing.Zmodule.sort V) m1 m2 n (@GRing.opp (matrix_zmodType m1 n) A1) (@GRing.opp (matrix_zmodType m2 n) A2)) *)
by split_mxE.
Qed.
Lemma opp_block_mx m1 m2 n1 n2 (Aul : 'M_(m1, n1)) Aur Adl (Adr : 'M_(m2, n2)) :
- block_mx Aul Aur Adl Adr = block_mx (- Aul) (- Aur) (- Adl) (- Adr).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (addn m1 m2) (addn n1 n2))) (@GRing.opp (matrix_zmodType (addn m1 m2) (addn n1 n2)) (@block_mx (GRing.Zmodule.sort V) m1 m2 n1 n2 Aul Aur Adl Adr)) (@block_mx (GRing.Zmodule.sort V) m1 m2 n1 n2 (@GRing.opp (matrix_zmodType m1 n1) Aul) (@GRing.opp (matrix_zmodType m1 n2) Aur) (@GRing.opp (matrix_zmodType m2 n1) Adl) (@GRing.opp (matrix_zmodType m2 n2) Adr)) *)
by rewrite opp_col_mx !opp_row_mx.
Qed.
Lemma add_row_mx m n1 n2 (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) B1 B2 :
row_mx A1 A2 + row_mx B1 B2 = row_mx (A1 + B1) (A2 + B2).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType m (addn n1 n2))) (@GRing.add (matrix_zmodType m (addn n1 n2)) (@row_mx (GRing.Zmodule.sort V) m n1 n2 A1 A2) (@row_mx (GRing.Zmodule.sort V) m n1 n2 B1 B2)) (@row_mx (GRing.Zmodule.sort V) m n1 n2 (@GRing.add (matrix_zmodType m n1) A1 B1) (@GRing.add (matrix_zmodType m n2) A2 B2)) *)
by split_mxE.
Qed.
Lemma add_col_mx m1 m2 n (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) B1 B2 :
col_mx A1 A2 + col_mx B1 B2 = col_mx (A1 + B1) (A2 + B2).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (matrix_zmodType (addn m1 m2) n)) (@GRing.add (matrix_zmodType (addn m1 m2) n) (@col_mx (GRing.Zmodule.sort V) m1 m2 n A1 A2) (@col_mx (GRing.Zmodule.sort V) m1 m2 n B1 B2)) (@col_mx (GRing.Zmodule.sort V) m1 m2 n (@GRing.add (matrix_zmodType m1 n) A1 B1) (@GRing.add (matrix_zmodType m2 n) A2 B2)) *)
by split_mxE.
Qed.
Lemma add_block_mx m1 m2 n1 n2 (Aul : 'M_(m1, n1)) Aur Adl (Adr : 'M_(m2, n2))
Bul Bur Bdl Bdr :
let A := block_mx Aul Aur Adl Adr in let B := block_mx Bul Bur Bdl Bdr in
A + B = block_mx (Aul + Bul) (Aur + Bur) (Adl + Bdl) (Adr + Bdr).
Proof.
(* Goal: let A := @block_mx (GRing.Zmodule.sort V) m1 m2 n1 n2 Aul Aur Adl Adr in let B := @block_mx (GRing.Zmodule.sort V) m1 m2 n1 n2 Bul Bur Bdl Bdr in @eq (GRing.Zmodule.sort (matrix_zmodType (addn m1 m2) (addn n1 n2))) (@GRing.add (matrix_zmodType (addn m1 m2) (addn n1 n2)) A B) (@block_mx (GRing.Zmodule.sort V) m1 m2 n1 n2 (@GRing.add (matrix_zmodType m1 n1) Aul Bul) (@GRing.add (matrix_zmodType m1 n2) Aur Bur) (@GRing.add (matrix_zmodType m2 n1) Adl Bdl) (@GRing.add (matrix_zmodType m2 n2) Adr Bdr)) *)
by rewrite /= add_col_mx !add_row_mx.
Qed.
Lemma row_mx_eq0 (m n1 n2 : nat) (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)):
(row_mx A1 A2 == 0) = (A1 == 0) && (A2 == 0).
Lemma col_mx_eq0 (m1 m2 n : nat) (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)):
(col_mx A1 A2 == 0) = (A1 == 0) && (A2 == 0).
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) (addn m1 m2) n) (@col_mx (Equality.sort (GRing.Zmodule.eqType V)) m1 m2 n A1 A2) (GRing.zero (matrix_zmodType (addn m1 m2) n))) (andb (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m1 n) A1 (GRing.zero (matrix_zmodType m1 n))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m2 n) A2 (GRing.zero (matrix_zmodType m2 n)))) *)
by rewrite -![_ == 0](inj_eq trmx_inj) !trmx0 tr_col_mx row_mx_eq0.
Qed.
Lemma block_mx_eq0 m1 m2 n1 n2 (Aul : 'M_(m1, n1)) Aur Adl (Adr : 'M_(m2, n2)) :
(block_mx Aul Aur Adl Adr == 0) =
[&& Aul == 0, Aur == 0, Adl == 0 & Adr == 0].
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) (addn m1 m2) (addn n1 n2)) (@block_mx (Equality.sort (GRing.Zmodule.eqType V)) m1 m2 n1 n2 Aul Aur Adl Adr) (GRing.zero (matrix_zmodType (addn m1 m2) (addn n1 n2)))) (andb (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m1 n1) Aul (GRing.zero (matrix_zmodType m1 n1))) (andb (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m1 n2) Aur (GRing.zero (matrix_zmodType m1 n2))) (andb (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m2 n1) Adl (GRing.zero (matrix_zmodType m2 n1))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m2 n2) Adr (GRing.zero (matrix_zmodType m2 n2)))))) *)
by rewrite col_mx_eq0 !row_mx_eq0 !andbA.
Qed.
Definition nz_row m n (A : 'M_(m, n)) :=
oapp (fun i => row i A) 0 [pick i | row i A != 0].
Lemma nz_row_eq0 m n (A : 'M_(m, n)) : (nz_row A == 0) = (A == 0).
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) (S O) n) (@nz_row m n A) (GRing.zero (matrix_zmodType (S O) n))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m n) A (GRing.zero (matrix_zmodType m n))) *)
rewrite /nz_row; symmetry; case: pickP => [i /= nzAi | Ai0].
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m n) A (GRing.zero (matrix_zmodType m n))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) (S O) n) (@Option.apply (ordinal m) (matrix (GRing.Zmodule.sort V) (S O) n) (fun i : ordinal m => @row (GRing.Zmodule.sort V) m n i A) (GRing.zero (matrix_zmodType (S O) n)) (@None (Finite.sort (ordinal_finType m)))) (GRing.zero (matrix_zmodType (S O) n))) *)
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m n) A (GRing.zero (matrix_zmodType m n))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) (S O) n) (@row (GRing.Zmodule.sort V) m n i A) (GRing.zero (matrix_zmodType (S O) n))) *)
by rewrite (negbTE nzAi); apply: contraTF nzAi => /eqP->; rewrite row0 eqxx.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) m n) A (GRing.zero (matrix_zmodType m n))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType V) (S O) n) (@Option.apply (ordinal m) (matrix (GRing.Zmodule.sort V) (S O) n) (fun i : ordinal m => @row (GRing.Zmodule.sort V) m n i A) (GRing.zero (matrix_zmodType (S O) n)) (@None (Finite.sort (ordinal_finType m)))) (GRing.zero (matrix_zmodType (S O) n))) *)
by rewrite eqxx; apply/eqP/row_matrixP=> i; move/eqP: (Ai0 i) ->; rewrite row0.
Qed.
End MatrixZmodule.
Section FinZmodMatrix.
Variables (V : finZmodType) (m n : nat).
Local Notation MV := 'M[V]_(m, n).
Canonical matrix_finZmodType := Eval hnf in [finZmodType of MV].
Canonical matrix_baseFinGroupType :=
Eval hnf in [baseFinGroupType of MV for +%R].
Canonical matrix_finGroupType := Eval hnf in [finGroupType of MV for +%R].
End FinZmodMatrix.
Section MapZmodMatrix.
Variables (aR rR : zmodType) (f : {additive aR -> rR}) (m n : nat).
Local Notation "A ^f" := (map_mx f A) : ring_scope.
Implicit Type A : 'M[aR]_(m, n).
Lemma map_mx0 : 0^f = 0 :> 'M_(m, n).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort rR) m n) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n (GRing.zero (matrix_zmodType aR m n))) (GRing.zero (matrix_zmodType rR m n)) *)
by rewrite map_const_mx raddf0.
Qed.
Lemma map_mxN A : (- A)^f = - A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort rR) m n) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n (@GRing.opp (matrix_zmodType aR m n) A)) (@GRing.opp (matrix_zmodType rR m n) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n A)) *)
by apply/matrixP=> i j; rewrite !mxE raddfN.
Qed.
Lemma map_mxD A B : (A + B)^f = A^f + B^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort rR) m n) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n (@GRing.add (matrix_zmodType aR m n) A B)) (@GRing.add (matrix_zmodType rR m n) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n A) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n B)) *)
by apply/matrixP=> i j; rewrite !mxE raddfD.
Qed.
Lemma map_mx_sub A B : (A - B)^f = A^f - B^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort rR) m n) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n (@GRing.add (matrix_zmodType aR m n) A (@GRing.opp (matrix_zmodType aR m n) B))) (@GRing.add (matrix_zmodType rR m n) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n A) (@GRing.opp (matrix_zmodType rR m n) (@map_mx (GRing.Zmodule.sort aR) (GRing.Zmodule.sort rR) (@GRing.Additive.apply aR rR (Phant (forall _ : GRing.Zmodule.sort aR, GRing.Zmodule.sort rR)) f) m n B))) *)
by rewrite map_mxD map_mxN.
Qed.
Definition map_mx_sum := big_morph _ map_mxD map_mx0.
Definition scalemx x A := \matrix[scalemx_key]_(i, j) (x * A i j).
Definition delta_mx i0 j0 : 'M[R]_(m, n) :=
\matrix[delta_mx_key]_(i, j) ((i == i0) && (j == j0))%:R.
Local Notation "x *m: A" := (scalemx x A) (at level 40) : ring_scope.
Lemma scale1mx A : 1 *m: A = A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (scalemx (GRing.one R) A) A *)
by apply/matrixP=> i j; rewrite !mxE mul1r.
Qed.
Lemma scalemxDl A x y : (x + y) *m: A = x *m: A + y *m: A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (scalemx (@GRing.add (GRing.Ring.zmodType R) x y) A) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m n) (scalemx x A) (scalemx y A)) *)
by apply/matrixP=> i j; rewrite !mxE mulrDl.
Qed.
Lemma scalemxDr x A B : x *m: (A + B) = x *m: A + x *m: B.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (scalemx x (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m n) A B)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m n) (scalemx x A) (scalemx x B)) *)
by apply/matrixP=> i j; rewrite !mxE mulrDr.
Qed.
Lemma scalemxA x y A : x *m: (y *m: A) = (x * y) *m: A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (scalemx x (scalemx y A)) (scalemx (@GRing.mul R x y) A) *)
by apply/matrixP=> i j; rewrite !mxE mulrA.
Qed.
Definition matrix_lmodMixin :=
LmodMixin scalemxA scale1mx scalemxDr scalemxDl.
Canonical matrix_lmodType :=
Eval hnf in LmodType R 'M[R]_(m, n) matrix_lmodMixin.
Lemma scalemx_const a b : a *: const_mx b = const_mx (a * b).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (@GRing.scale R matrix_lmodType a (@const_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m n b)) (@const_mx (GRing.Ring.sort R) m n (@GRing.mul R a b)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma matrix_sum_delta A :
A = \sum_(i < m) \sum_(j < n) A i j *: delta_mx i j.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) A (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (ordinal m) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) true (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (ordinal n) j (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) true (@GRing.scale R matrix_lmodType (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (delta_mx i j)))))) *)
apply/matrixP=> i j.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) m n (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (ordinal m) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) true (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) (ordinal n) j (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) matrix_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) matrix_lmodType)))) true (@GRing.scale R matrix_lmodType (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (delta_mx i j)))))) i j) *)
rewrite summxE (bigD1 i) // summxE (bigD1 j) //= !mxE !eqxx mulr1.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@GRing.add (GRing.Ring.zmodType R) (@GRing.add (GRing.Ring.zmodType R) (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) (negb (@eq_op (Finite.eqType (ordinal_finType n)) i0 j)) (@fun_of_matrix (GRing.Ring.sort R) m n (@GRing.scale R matrix_lmodType (@fun_of_matrix (GRing.Ring.sort R) m n A i i0) (delta_mx i i0)) i j)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal m) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType m)) (fun i0 : ordinal m => @BigBody (GRing.Ring.sort R) (ordinal m) i0 (@GRing.add (GRing.Ring.zmodType R)) (negb (@eq_op (Finite.eqType (ordinal_finType m)) i0 i)) (@fun_of_matrix (GRing.Ring.sort R) m n (@BigOp.bigop (matrix (GRing.Ring.sort R) m n) (ordinal n) (GRing.zero (@GRing.Zmodule.Pack (matrix (GRing.Ring.sort R) m n) (@GRing.Zmodule.Class (matrix (GRing.Ring.sort R) m n) (@Choice.Class (matrix (GRing.Ring.sort R) m n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType R))) m n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType R)) m n)) (matrix_zmodMixin (GRing.Ring.zmodType R) m n)))) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (matrix (GRing.Ring.sort R) m n) (ordinal n) j (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Ring.sort R) m n) (@GRing.Zmodule.Class (matrix (GRing.Ring.sort R) m n) (@Choice.Class (matrix (GRing.Ring.sort R) m n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType R))) m n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType R)) m n)) (matrix_zmodMixin (GRing.Ring.zmodType R) m n)))) true (@GRing.scale R matrix_lmodType (@fun_of_matrix (GRing.Ring.sort R) m n A i0 j) (delta_mx i0 j)))) i j)))) *)
rewrite !big1 ?addr0 //= => [i' | j']; rewrite eq_sym => /negbTE diff.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) m n (@GRing.scale R matrix_lmodType (@fun_of_matrix (GRing.Ring.sort R) m n A i j') (delta_mx i j')) i j) (GRing.zero (GRing.Ring.zmodType R)) *)
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) m n (@BigOp.bigop (matrix (GRing.Ring.sort R) m n) (ordinal n) (GRing.zero (@GRing.Zmodule.Pack (matrix (GRing.Ring.sort R) m n) (@GRing.Zmodule.Class (matrix (GRing.Ring.sort R) m n) (@Choice.Class (matrix (GRing.Ring.sort R) m n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType R))) m n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType R)) m n)) (matrix_zmodMixin (GRing.Ring.zmodType R) m n)))) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (matrix (GRing.Ring.sort R) m n) (ordinal n) j (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Ring.sort R) m n) (@GRing.Zmodule.Class (matrix (GRing.Ring.sort R) m n) (@Choice.Class (matrix (GRing.Ring.sort R) m n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType R))) m n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType R)) m n)) (matrix_zmodMixin (GRing.Ring.zmodType R) m n)))) true (@GRing.scale R matrix_lmodType (@fun_of_matrix (GRing.Ring.sort R) m n A i' j) (delta_mx i' j)))) i j) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite summxE big1 // => j' _; rewrite !mxE diff mulr0.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) m n (@GRing.scale R matrix_lmodType (@fun_of_matrix (GRing.Ring.sort R) m n A i j') (delta_mx i j')) i j) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite !mxE eqxx diff mulr0.
Qed.
End RingModule.
Section StructuralLinear.
Lemma swizzle_mx_is_scalable m n p q f g k :
scalable (@swizzle_mx R m n p q f g k).
Proof.
(* Goal: @GRing.Linear.mixin_of R (matrix_lmodType m n) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType p q)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType p q)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType p q)))) (@GRing.scale R (matrix_lmodType p q)) (@swizzle_mx (GRing.Ring.zmodType R) m n p q f g k) *)
by move=> a A; apply/matrixP=> i j; rewrite !mxE.
Qed.
Canonical swizzle_mx_scalable m n p q f g k :=
AddLinear (@swizzle_mx_is_scalable m n p q f g k).
Local Notation SwizzleLin op := [linear of op as swizzle_mx _ _ _].
Canonical trmx_linear m n := SwizzleLin (@trmx R m n).
Canonical row_linear m n i := SwizzleLin (@row R m n i).
Canonical col_linear m n j := SwizzleLin (@col R m n j).
Canonical row'_linear m n i := SwizzleLin (@row' R m n i).
Canonical col'_linear m n j := SwizzleLin (@col' R m n j).
Canonical row_perm_linear m n s := SwizzleLin (@row_perm R m n s).
Canonical col_perm_linear m n s := SwizzleLin (@col_perm R m n s).
Canonical xrow_linear m n i1 i2 := SwizzleLin (@xrow R m n i1 i2).
Canonical xcol_linear m n j1 j2 := SwizzleLin (@xcol R m n j1 j2).
Canonical lsubmx_linear m n1 n2 := SwizzleLin (@lsubmx R m n1 n2).
Canonical rsubmx_linear m n1 n2 := SwizzleLin (@rsubmx R m n1 n2).
Canonical usubmx_linear m1 m2 n := SwizzleLin (@usubmx R m1 m2 n).
Canonical dsubmx_linear m1 m2 n := SwizzleLin (@dsubmx R m1 m2 n).
Canonical vec_mx_linear m n := SwizzleLin (@vec_mx R m n).
Definition mxvec_is_linear m n := can2_linear (@vec_mxK R m n) mxvecK.
Canonical mxvec_linear m n := AddLinear (@mxvec_is_linear m n).
End StructuralLinear.
Lemma trmx_delta m n i j : (delta_mx i j)^T = delta_mx j i :> 'M[R]_(n, m).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n m) (@trmx (GRing.Ring.sort R) m n (@delta_mx m n i j)) (@delta_mx n m j i) *)
by apply/matrixP=> i' j'; rewrite !mxE andbC.
Qed.
Lemma row_sum_delta n (u : 'rV_n) : u = \sum_(j < n) u 0 j *: delta_mx 0 j.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) n) u (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (ordinal n) j (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) true (@GRing.scale R (matrix_lmodType (S O) n) (@fun_of_matrix (GRing.Ring.sort R) (S O) n u (GRing.zero (Zp_zmodType O)) j) (@delta_mx (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) j)))) *)
by rewrite {1}[u]matrix_sum_delta big_ord1.
Qed.
Lemma delta_mx_lshift m n1 n2 i j :
delta_mx i (lshift n2 j) = row_mx (delta_mx i j) 0 :> 'M_(m, n1 + n2).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m (addn n1 n2)) (@delta_mx m (addn n1 n2) i (@lshift n1 n2 j)) (@row_mx (GRing.Ring.sort R) m n1 n2 (@delta_mx m n1 i j) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n2))) *)
apply/matrixP=> i' j'; rewrite !mxE -(can_eq splitK) (unsplitK (inl _ _)).
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op (Finite.eqType (ordinal_finType m)) i' i) (@eq_op (sum_eqType (ordinal_eqType n1) (ordinal_eqType n2)) (@split n1 n2 j') (@inl (ordinal n1) (ordinal n2) j))))) match @split n1 n2 j' with | inl j1 => @fun_of_matrix (GRing.Ring.sort R) m n1 (@delta_mx m n1 i j) i' j1 | inr j2 => @fun_of_matrix (GRing.Ring.sort R) m n2 (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n2)) i' j2 end *)
by case: split => ?; rewrite mxE ?andbF.
Qed.
Lemma delta_mx_rshift m n1 n2 i j :
delta_mx i (rshift n1 j) = row_mx 0 (delta_mx i j) :> 'M_(m, n1 + n2).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m (addn n1 n2)) (@delta_mx m (addn n1 n2) i (@rshift n1 n2 j)) (@row_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m n1 n2 (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n1)) (@delta_mx m n2 i j)) *)
apply/matrixP=> i' j'; rewrite !mxE -(can_eq splitK) (unsplitK (inr _ _)).
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op (Finite.eqType (ordinal_finType m)) i' i) (@eq_op (sum_eqType (ordinal_eqType n1) (ordinal_eqType n2)) (@split n1 n2 j') (@inr (ordinal n1) (ordinal n2) j))))) match @split n1 n2 j' with | inl j1 => @fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m n1 (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n1)) i' j1 | inr j2 => @fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m n2 (@delta_mx m n2 i j) i' j2 end *)
by case: split => ?; rewrite mxE ?andbF.
Qed.
Lemma delta_mx_ushift m1 m2 n i j :
delta_mx (lshift m2 i) j = col_mx (delta_mx i j) 0 :> 'M_(m1 + m2, n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn m1 m2) n) (@delta_mx (addn m1 m2) n (@lshift m1 m2 i) j) (@col_mx (GRing.Ring.sort R) m1 m2 n (@delta_mx m1 n i j) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m2 n))) *)
apply/matrixP=> i' j'; rewrite !mxE -(can_eq splitK) (unsplitK (inl _ _)).
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op (sum_eqType (ordinal_eqType m1) (ordinal_eqType m2)) (@split m1 m2 i') (@inl (ordinal m1) (ordinal m2) i)) (@eq_op (Finite.eqType (ordinal_finType n)) j' j)))) match @split m1 m2 i' with | inl i1 => @fun_of_matrix (GRing.Ring.sort R) m1 n (@delta_mx m1 n i j) i1 j' | inr i2 => @fun_of_matrix (GRing.Ring.sort R) m2 n (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m2 n)) i2 j' end *)
by case: split => ?; rewrite mxE.
Qed.
Lemma delta_mx_dshift m1 m2 n i j :
delta_mx (rshift m1 i) j = col_mx 0 (delta_mx i j) :> 'M_(m1 + m2, n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn m1 m2) n) (@delta_mx (addn m1 m2) n (@rshift m1 m2 i) j) (@col_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m1 m2 n (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m1 n)) (@delta_mx m2 n i j)) *)
apply/matrixP=> i' j'; rewrite !mxE -(can_eq splitK) (unsplitK (inr _ _)).
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op (sum_eqType (ordinal_eqType m1) (ordinal_eqType m2)) (@split m1 m2 i') (@inr (ordinal m1) (ordinal m2) i)) (@eq_op (Finite.eqType (ordinal_finType n)) j' j)))) match @split m1 m2 i' with | inl i1 => @fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m1 n (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m1 n)) i1 j' | inr i2 => @fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m2 n (@delta_mx m2 n i j) i2 j' end *)
by case: split => ?; rewrite mxE.
Qed.
Lemma vec_mx_delta m n i j :
vec_mx (delta_mx 0 (mxvec_index i j)) = delta_mx i j :> 'M_(m, n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@vec_mx (GRing.Ring.sort R) m n (@delta_mx (S O) (muln m n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (@mxvec_index m n i j))) (@delta_mx m n i j) *)
by apply/matrixP=> i' j'; rewrite !mxE /= [_ == _](inj_eq enum_rank_inj).
Qed.
Lemma mxvec_delta m n i j :
mxvec (delta_mx i j) = delta_mx 0 (mxvec_index i j) :> 'rV_(m * n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) (muln m n)) (@mxvec (GRing.Ring.sort R) m n (@delta_mx m n i j)) (@delta_mx (S O) (muln m n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) (@mxvec_index m n i j)) *)
by rewrite -vec_mx_delta vec_mxK.
Qed.
Ltac split_mxE := apply/matrixP=> i j; do ![rewrite mxE | case: split => ?].
Lemma scale_row_mx m n1 n2 a (A1 : 'M_(m, n1)) (A2 : 'M_(m, n2)) :
a *: row_mx A1 A2 = row_mx (a *: A1) (a *: A2).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m (addn n1 n2))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m (addn n1 n2))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m (addn n1 n2)))))) (@GRing.scale R (matrix_lmodType m (addn n1 n2)) a (@row_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m n1 n2 A1 A2)) (@row_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m n1 n2 (@GRing.scale R (matrix_lmodType m n1) a A1) (@GRing.scale R (matrix_lmodType m n2) a A2)) *)
by split_mxE.
Qed.
Lemma scale_col_mx m1 m2 n a (A1 : 'M_(m1, n)) (A2 : 'M_(m2, n)) :
a *: col_mx A1 A2 = col_mx (a *: A1) (a *: A2).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (addn m1 m2) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (addn m1 m2) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (addn m1 m2) n))))) (@GRing.scale R (matrix_lmodType (addn m1 m2) n) a (@col_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m1 m2 n A1 A2)) (@col_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m1 m2 n (@GRing.scale R (matrix_lmodType m1 n) a A1) (@GRing.scale R (matrix_lmodType m2 n) a A2)) *)
by split_mxE.
Qed.
Lemma scale_block_mx m1 m2 n1 n2 a (Aul : 'M_(m1, n1)) (Aur : 'M_(m1, n2))
(Adl : 'M_(m2, n1)) (Adr : 'M_(m2, n2)) :
a *: block_mx Aul Aur Adl Adr
= block_mx (a *: Aul) (a *: Aur) (a *: Adl) (a *: Adr).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (addn m1 m2) (addn n1 n2))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (addn m1 m2) (addn n1 n2))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (addn m1 m2) (addn n1 n2)))))) (@GRing.scale R (matrix_lmodType (addn m1 m2) (addn n1 n2)) a (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m1 m2 n1 n2 Aul Aur Adl Adr)) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m1 m2 n1 n2 (@GRing.scale R (matrix_lmodType m1 n1) a Aul) (@GRing.scale R (matrix_lmodType m1 n2) a Aur) (@GRing.scale R (matrix_lmodType m2 n1) a Adl) (@GRing.scale R (matrix_lmodType m2 n2) a Adr)) *)
by rewrite scale_col_mx !scale_row_mx.
Qed.
Definition diag_mx n (d : 'rV[R]_n) :=
\matrix[diag_mx_key]_(i, j) (d 0 i *+ (i == j)).
Lemma tr_diag_mx n (d : 'rV_n) : (diag_mx d)^T = diag_mx d.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) n n) (@trmx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) n n (@diag_mx n d)) (@diag_mx n d) *)
by apply/matrixP=> i j; rewrite !mxE eq_sym; case: eqP => // ->.
Qed.
Lemma diag_mx_is_linear n : linear (@diag_mx n).
Proof.
(* Goal: @GRing.Linear.axiom R (matrix_lmodType (S O) n) (matrix_zmodType (GRing.Ring.zmodType R) n n) (@GRing.scale R (matrix_lmodType n n)) (@diag_mx n) (@GRing.Scale.scale_law R (matrix_lmodType n n)) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) (@GRing.scale R (matrix_lmodType n n))) *)
by move=> a A B; apply/matrixP=> i j; rewrite !mxE mulrnAr mulrnDl.
Qed.
Canonical diag_mx_additive n := Additive (@diag_mx_is_linear n).
Canonical diag_mx_linear n := Linear (@diag_mx_is_linear n).
Lemma diag_mx_sum_delta n (d : 'rV_n) :
diag_mx d = \sum_i d 0 i *: delta_mx i i.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) n n) (@diag_mx n d) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) true (@GRing.scale R (matrix_lmodType n n) (@fun_of_matrix (GRing.Ring.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) i) (@delta_mx n n i i)))) *)
apply/matrixP=> i j; rewrite summxE (bigD1 i) //= !mxE eqxx /=.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (@fun_of_matrix (GRing.Ring.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) i) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType n)) i j))) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) i) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType n)) j i)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) (negb (@eq_op (Finite.eqType (ordinal_finType n)) i0 i)) (@fun_of_matrix (GRing.Ring.sort R) n n (@GRing.scale R (matrix_lmodType n n) (@fun_of_matrix (GRing.Ring.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) i0) (@delta_mx n n i0 i0)) i j)))) *)
rewrite eq_sym mulr_natr big1 ?addr0 // => i' ne_i'i.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) n n (@GRing.scale R (matrix_lmodType n n) (@fun_of_matrix (GRing.Ring.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) i') (@delta_mx n n i' i')) i j) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite !mxE eq_sym (negbTE ne_i'i) mulr0.
Qed.
Definition scalar_mx x : 'M[R]_n :=
\matrix[scalar_mx_key]_(i , j) (x *+ (i == j)).
Notation "x %:M" := (scalar_mx x) : ring_scope.
Lemma diag_const_mx a : diag_mx (const_mx a) = a%:M :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) n n) (@diag_mx n (@const_mx (GRing.Ring.sort R) (S O) n a)) (scalar_mx a) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma tr_scalar_mx a : (a%:M)^T = a%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (@trmx (GRing.Ring.sort R) n n (scalar_mx a)) (scalar_mx a) *)
by apply/matrixP=> i j; rewrite !mxE eq_sym.
Qed.
Lemma scalar_mx_is_additive : additive scalar_mx.
Proof.
(* Goal: @GRing.Additive.axiom (GRing.Ring.zmodType R) (matrix_zmodType (GRing.Ring.zmodType R) n n) scalar_mx *)
by move=> a b; rewrite -!diag_const_mx !raddfB.
Qed.
Canonical scalar_mx_additive := Additive scalar_mx_is_additive.
Lemma scale_scalar_mx a1 a2 : a1 *: a2%:M = (a1 * a2)%:M :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) n n) (@GRing.scale R (matrix_lmodType n n) a1 (scalar_mx a2)) (scalar_mx (@GRing.mul R a1 a2)) *)
by apply/matrixP=> i j; rewrite !mxE mulrnAr.
Qed.
Lemma scalemx1 a : a *: 1%:M = a%:M.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) (@GRing.scale R (matrix_lmodType n n) a (scalar_mx (GRing.one R))) (scalar_mx a) *)
by rewrite scale_scalar_mx mulr1.
Qed.
Lemma scalar_mx_sum_delta a : a%:M = \sum_i a *: delta_mx i i.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (scalar_mx a) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) (Finite.sort (ordinal_finType n)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n n))))) true (@GRing.scale R (matrix_lmodType n n) a (@delta_mx n n i i)))) *)
by rewrite -diag_const_mx diag_mx_sum_delta; apply: eq_bigr => i _; rewrite mxE.
Qed.
Lemma mx1_sum_delta : 1%:M = \sum_i delta_mx i i.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (scalar_mx (GRing.one R)) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) n n)) (Finite.sort (ordinal_finType n)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n n)) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) n n)) (Finite.sort (ordinal_finType n)) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) n n)) true (@delta_mx n n i i))) *)
by rewrite [1%:M]scalar_mx_sum_delta -scaler_sumr scale1r.
Qed.
Lemma row1 i : row i 1%:M = delta_mx 0 i.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) n) (@row (GRing.Ring.sort R) n n i (scalar_mx (GRing.one R))) (@delta_mx (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i) *)
by apply/rowP=> j; rewrite !mxE eq_sym.
Qed.
Definition is_scalar_mx (A : 'M[R]_n) :=
if insub 0%N is Some i then A == (A i i)%:M else true.
Lemma is_scalar_mxP A : reflect (exists a, A = a%:M) (is_scalar_mx A).
Proof.
(* Goal: Bool.reflect (@ex (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (fun a : GRing.Zmodule.sort (GRing.Ring.zmodType R) => @eq (matrix (GRing.Ring.sort R) n n) A (scalar_mx a))) (is_scalar_mx A) *)
rewrite /is_scalar_mx; case: insubP => [i _ _ | ].
(* Goal: forall _ : is_true (negb (leq (S O) n)), Bool.reflect (@ex (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (fun a : GRing.Zmodule.sort (GRing.Ring.zmodType R) => @eq (matrix (GRing.Ring.sort R) n n) A (scalar_mx a))) true *)
(* Goal: Bool.reflect (@ex (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (fun a : GRing.Zmodule.sort (GRing.Ring.zmodType R) => @eq (matrix (GRing.Ring.sort R) n n) A (scalar_mx a))) (@eq_op (matrix_eqType (GRing.Ring.eqType R) n n) A (scalar_mx (@fun_of_matrix (GRing.Ring.sort R) n n A i i))) *)
by apply: (iffP eqP) => [|[a ->]]; [exists (A i i) | rewrite mxE eqxx].
(* Goal: forall _ : is_true (negb (leq (S O) n)), Bool.reflect (@ex (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (fun a : GRing.Zmodule.sort (GRing.Ring.zmodType R) => @eq (matrix (GRing.Ring.sort R) n n) A (scalar_mx a))) true *)
rewrite -eqn0Ngt => /eqP n0; left; exists 0.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) A (scalar_mx (GRing.zero (GRing.Ring.zmodType R))) *)
by rewrite raddf0; rewrite n0 in A *; rewrite [A]flatmx0.
Qed.
Lemma scalar_mx_is_scalar a : is_scalar_mx a%:M.
Proof.
(* Goal: is_true (is_scalar_mx (scalar_mx a)) *)
by apply/is_scalar_mxP; exists a.
Qed.
Lemma mx0_is_scalar : is_scalar_mx 0.
Proof.
(* Goal: is_true (is_scalar_mx (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n n))) *)
by apply/is_scalar_mxP; exists 0; rewrite raddf0.
Qed.
End ScalarMx.
Notation "x %:M" := (scalar_mx _ x) : ring_scope.
Lemma mx11_scalar (A : 'M_1) : A = (A 0 0)%:M.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S O) (S O)) A (scalar_mx (S O) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S O) (S O) A (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O)))) *)
by apply/rowP=> j; rewrite ord1 mxE.
Qed.
Lemma scalar_mx_block n1 n2 a : a%:M = block_mx a%:M 0 0 a%:M :> 'M_(n1 + n2).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn n1 n2) (addn n1 n2)) (scalar_mx (addn n1 n2) a) (@block_mx (GRing.Ring.sort R) n1 n2 n1 n2 (scalar_mx n1 a) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n1 n2)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n2 n1)) (scalar_mx n2 a)) *)
apply/matrixP=> i j; rewrite !mxE -val_eqE /=.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) a (nat_of_bool (@eq_op (Choice.eqType nat_choiceType) (@nat_of_ord (addn n1 n2) i) (@nat_of_ord (addn n1 n2) j)))) match @split n1 n2 i with | inl i1 => @fun_of_matrix (GRing.Ring.sort R) n1 (addn n1 n2) (@row_mx (GRing.Ring.sort R) n1 n1 n2 (scalar_mx n1 a) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n1 n2))) i1 j | inr i2 => @fun_of_matrix (GRing.Ring.sort R) n2 (addn n1 n2) (@row_mx (GRing.Ring.sort R) n2 n1 n2 (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n2 n1)) (scalar_mx n2 a)) i2 j end *)
by do 2![case: splitP => ? ->; rewrite !mxE]; rewrite ?eqn_add2l // -?(eq_sym (n1 + _)%N) eqn_leq leqNgt lshift_subproof.
Qed.
Definition mulmx {m n p} (A : 'M_(m, n)) (B : 'M_(n, p)) : 'M[R]_(m, p) :=
\matrix[mulmx_key]_(i, k) \sum_j (A i j * B j k).
Local Notation "A *m B" := (mulmx A B) : ring_scope.
Lemma mulmxA m n p q (A : 'M_(m, n)) (B : 'M_(n, p)) (C : 'M_(p, q)) :
A *m (B *m C) = A *m B *m C.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m q) (@mulmx m n q A (@mulmx n p q B C)) (@mulmx m p q (@mulmx m n p A B) C) *)
apply/matrixP=> i l; rewrite !mxE.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) n q (@mulmx n p q B C) j l)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType p)) (fun j : Finite.sort (ordinal_finType p) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m p (@mulmx m n p A B) i j) (@fun_of_matrix (GRing.Ring.sort R) p q C j l)))) *)
transitivity (\sum_j (\sum_k (A i j * (B j k * C k l)))).
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType p)) (fun k : Finite.sort (ordinal_finType p) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) k (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) n p B j k) (@fun_of_matrix (GRing.Ring.sort R) p q C k l))))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType p)) (fun j : Finite.sort (ordinal_finType p) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m p (@mulmx m n p A B) i j) (@fun_of_matrix (GRing.Ring.sort R) p q C j l)))) *)
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) n q (@mulmx n p q B C) j l)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType p)) (fun k : Finite.sort (ordinal_finType p) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) k (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) n p B j k) (@fun_of_matrix (GRing.Ring.sort R) p q C k l))))))) *)
by apply: eq_bigr => j _; rewrite mxE big_distrr.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType p)) (fun k : Finite.sort (ordinal_finType p) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) k (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) n p B j k) (@fun_of_matrix (GRing.Ring.sort R) p q C k l))))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType p)) (fun j : Finite.sort (ordinal_finType p) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType p)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m p (@mulmx m n p A B) i j) (@fun_of_matrix (GRing.Ring.sort R) p q C j l)))) *)
rewrite exchange_big; apply: eq_bigr => j _; rewrite mxE big_distrl /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i i0) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) n p B i0 j) (@fun_of_matrix (GRing.Ring.sort R) p q C j l))))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i i0) (@fun_of_matrix (GRing.Ring.sort R) n p B i0 j)) (@fun_of_matrix (GRing.Ring.sort R) p q C j l)))) *)
by apply: eq_bigr => k _; rewrite mulrA.
Qed.
Lemma mul0mx m n p (A : 'M_(n, p)) : 0 *m A = 0 :> 'M_(m, p).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n)) A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m p)) *)
by apply/matrixP=> i k; rewrite !mxE big1 //= => j _; rewrite mxE mul0r.
Qed.
Lemma mulmx0 m n p (A : 'M_(m, n)) : A *m 0 = 0 :> 'M_(m, p).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p A (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n p))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m p)) *)
by apply/matrixP=> i k; rewrite !mxE big1 // => j _; rewrite mxE mulr0.
Qed.
Lemma mulmxN m n p (A : 'M_(m, n)) (B : 'M_(n, p)) : A *m (- B) = - (A *m B).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p A (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) n p) B)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p A B)) *)
apply/matrixP=> i k; rewrite !mxE -sumrN.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) n p) B) j k)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.opp (GRing.Ring.zmodType R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i i0) (@fun_of_matrix (GRing.Ring.sort R) n p B i0 k))))) *)
by apply: eq_bigr => j _; rewrite mxE mulrN.
Qed.
Lemma mulNmx m n p (A : 'M_(m, n)) (B : 'M_(n, p)) : - A *m B = - (A *m B).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) m n) A) B) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p A B)) *)
apply/matrixP=> i k; rewrite !mxE -sumrN.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) m n) A) i j) (@fun_of_matrix (GRing.Ring.sort R) n p B j k)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.opp (GRing.Ring.zmodType R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i i0) (@fun_of_matrix (GRing.Ring.sort R) n p B i0 k))))) *)
by apply: eq_bigr => j _; rewrite mxE mulNr.
Qed.
Lemma mulmxDl m n p (A1 A2 : 'M_(m, n)) (B : 'M_(n, p)) :
(A1 + A2) *m B = A1 *m B + A2 *m B.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m n) A1 A2) B) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p A1 B) (@mulmx m n p A2 B)) *)
apply/matrixP=> i k; rewrite !mxE -big_split /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m n) A1 A2) i j) (@fun_of_matrix (GRing.Ring.sort R) n p B j k)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A1 i i0) (@fun_of_matrix (GRing.Ring.sort R) n p B i0 k)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A2 i i0) (@fun_of_matrix (GRing.Ring.sort R) n p B i0 k))))) *)
by apply: eq_bigr => j _; rewrite !mxE -mulrDl.
Qed.
Lemma mulmxDr m n p (A : 'M_(m, n)) (B1 B2 : 'M_(n, p)) :
A *m (B1 + B2) = A *m B1 + A *m B2.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p A (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) n p) B1 B2)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p A B1) (@mulmx m n p A B2)) *)
apply/matrixP=> i k; rewrite !mxE -big_split /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) n p) B1 B2) j k)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i i0) (@fun_of_matrix (GRing.Ring.sort R) n p B1 i0 k)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i i0) (@fun_of_matrix (GRing.Ring.sort R) n p B2 i0 k))))) *)
by apply: eq_bigr => j _; rewrite mxE mulrDr.
Qed.
Lemma mulmxBl m n p (A1 A2 : 'M_(m, n)) (B : 'M_(n, p)) :
(A1 - A2) *m B = A1 *m B - A2 *m B.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m n) A1 (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) m n) A2)) B) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p A1 B) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p A2 B))) *)
by rewrite mulmxDl mulNmx.
Qed.
Lemma mulmxBr m n p (A : 'M_(m, n)) (B1 B2 : 'M_(n, p)) :
A *m (B1 - B2) = A *m B1 - A *m B2.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p A (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) n p) B1 (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) n p) B2))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p A B1) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p A B2))) *)
by rewrite mulmxDr mulmxN.
Qed.
Lemma mulmx_suml m n p (A : 'M_(n, p)) I r P (B_ : I -> 'M_(m, n)) :
(\sum_(i <- r | P i) B_ i) *m A = \sum_(i <- r | P i) B_ i *m A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) m n)) I (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n)) r (fun i : I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) m n)) I i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m n)) (P i) (B_ i))) A) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) m p)) I (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m p)) r (fun i : I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) m p)) I i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p)) (P i) (@mulmx m n p (B_ i) A))) *)
by apply: (big_morph (mulmx^~ A)) => [B C|]; rewrite ?mul0mx ?mulmxDl.
Qed.
Lemma mulmx_sumr m n p (A : 'M_(m, n)) I r P (B_ : I -> 'M_(n, p)) :
A *m (\sum_(i <- r | P i) B_ i) = \sum_(i <- r | P i) A *m B_ i.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p A (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) n p)) I (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n p)) r (fun i : I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) n p)) I i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) n p)) (P i) (B_ i)))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) m p)) I (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m p)) r (fun i : I => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) m p)) I i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p)) (P i) (@mulmx m n p A (B_ i)))) *)
by apply: (big_morph (mulmx A)) => [B C|]; rewrite ?mulmx0 ?mulmxDr.
Qed.
Lemma scalemxAl m n p a (A : 'M_(m, n)) (B : 'M_(n, p)) :
a *: (A *m B) = (a *: A) *m B.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p))))) (@GRing.scale R (matrix_lmodType m p) a (@mulmx m n p A B)) (@mulmx m n p (@GRing.scale R (matrix_lmodType m n) a A) B) *)
apply/matrixP=> i k; rewrite !mxE big_distrr /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R a (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i i0) (@fun_of_matrix (GRing.Ring.sort R) n p B i0 k))))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@GRing.scale R (matrix_lmodType m n) a A) i j) (@fun_of_matrix (GRing.Ring.sort R) n p B j k)))) *)
by apply: eq_bigr => j _; rewrite mulrA mxE.
Qed.
Lemma rowE m n i (A : 'M_(m, n)) : row i A = delta_mx 0 i *m A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) n) (@row (GRing.Ring.sort R) m n i A) (@mulmx (S O) m n (@delta_mx (S O) m (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i) A) *)
apply/rowP=> j; rewrite !mxE (bigD1 i) //= mxE !eqxx mul1r.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@GRing.add (GRing.Ring.zmodType R) (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@BigOp.bigop (GRing.Ring.sort R) (ordinal m) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType m)) (fun i0 : ordinal m => @BigBody (GRing.Ring.sort R) (ordinal m) i0 (@GRing.add (GRing.Ring.zmodType R)) (negb (@eq_op (Finite.eqType (ordinal_finType m)) i0 i)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) (S O) m (@delta_mx (S O) m (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i) (GRing.zero (Zp_zmodType O)) i0) (@fun_of_matrix (GRing.Ring.sort R) m n A i0 j))))) *)
by rewrite big1 ?addr0 // => i' ne_i'i; rewrite mxE /= (negbTE ne_i'i) mul0r.
Qed.
Lemma row_mul m n p (i : 'I_m) A (B : 'M_(n, p)) :
row i (A *m B) = row i A *m B.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) p) (@row (GRing.Ring.sort R) m p i (@mulmx m n p A B)) (@mulmx (S O) n p (@row (GRing.Ring.sort R) m n i A) B) *)
by rewrite !rowE mulmxA.
Qed.
Lemma mulmx_sum_row m n (u : 'rV_m) (A : 'M_(m, n)) :
u *m A = \sum_i u 0 i *: row i A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) n) (@mulmx (S O) m n u A) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (Finite.sort (ordinal_finType m)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) true (@GRing.scale R (matrix_lmodType (S O) n) (@fun_of_matrix (GRing.Ring.sort R) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort R) m n i A)))) *)
by apply/rowP=> j; rewrite mxE summxE; apply: eq_bigr => i _; rewrite !mxE.
Qed.
Lemma mul_delta_mx_cond m n p (j1 j2 : 'I_n) (i1 : 'I_m) (k2 : 'I_p) :
delta_mx i1 j1 *m delta_mx j2 k2 = delta_mx i1 k2 *+ (j1 == j2).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@delta_mx m n i1 j1) (@delta_mx n p j2 k2)) (@GRing.natmul (matrix_zmodType (GRing.Ring.zmodType R) m p) (@delta_mx m p i1 k2) (nat_of_bool (@eq_op (ordinal_eqType n) j1 j2))) *)
apply/matrixP=> i k; rewrite !mxE (bigD1 j1) //=.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@delta_mx m n i1 j1) i j1) (@fun_of_matrix (GRing.Ring.sort R) n p (@delta_mx n p j2 k2) j1 k)) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) (negb (@eq_op (Finite.eqType (ordinal_finType n)) i0 j1)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@delta_mx m n i1 j1) i i0) (@fun_of_matrix (GRing.Ring.sort R) n p (@delta_mx n p j2 k2) i0 k))))) (@fun_of_matrix (GRing.Ring.sort R) m p (@GRing.natmul (matrix_zmodType (GRing.Ring.zmodType R) m p) (@delta_mx m p i1 k2) (nat_of_bool (@eq_op (ordinal_eqType n) j1 j2))) i k) *)
rewrite mulmxnE !mxE !eqxx andbT -natrM -mulrnA !mulnb !andbA andbAC.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.add (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (andb (@eq_op (Finite.eqType (ordinal_finType m)) i i1) (@eq_op (Finite.eqType (ordinal_finType p)) k k2)) (@eq_op (Finite.eqType (ordinal_finType n)) j1 j2)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Ring.sort R) (ordinal n) i0 (@GRing.add (GRing.Ring.zmodType R)) (negb (@eq_op (Finite.eqType (ordinal_finType n)) i0 j1)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@delta_mx m n i1 j1) i i0) (@fun_of_matrix (GRing.Ring.sort R) n p (@delta_mx n p j2 k2) i0 k))))) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (andb (@eq_op (Finite.eqType (ordinal_finType m)) i i1) (@eq_op (Finite.eqType (ordinal_finType p)) k k2)) (@eq_op (ordinal_eqType n) j1 j2)))) *)
by rewrite big1 ?addr0 // => j; rewrite !mxE andbC -natrM; move/negbTE->.
Qed.
Lemma mul_delta_mx m n p (j : 'I_n) (i : 'I_m) (k : 'I_p) :
delta_mx i j *m delta_mx j k = delta_mx i k.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@delta_mx m n i j) (@delta_mx n p j k)) (@delta_mx m p i k) *)
by rewrite mul_delta_mx_cond eqxx.
Qed.
Lemma mul_delta_mx_0 m n p (j1 j2 : 'I_n) (i1 : 'I_m) (k2 : 'I_p) :
j1 != j2 -> delta_mx i1 j1 *m delta_mx j2 k2 = 0.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (ordinal_eqType n) j1 j2)), @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@delta_mx m n i1 j1) (@delta_mx n p j2 k2)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m p)) *)
by rewrite mul_delta_mx_cond => /negbTE->.
Qed.
Lemma mul_diag_mx m n d (A : 'M_(m, n)) :
diag_mx d *m A = \matrix_(i, j) (d 0 i * A i j).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@mulmx m m n (@diag_mx m d) A) (@matrix_of_fun (GRing.Ring.sort R) m n matrix_key (fun (i : Finite.sort (ordinal_finType m)) (j : Finite.sort (ordinal_finType n)) => @GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) (S O) m d (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.Ring.sort R) m n A i j))) *)
apply/matrixP=> i j; rewrite !mxE (bigD1 i) //= mxE eqxx big1 ?addr0 // => i'.
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType m)) i' i)), @eq (GRing.Ring.sort R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m m (@diag_mx m d) i i') (@fun_of_matrix (GRing.Ring.sort R) m n A i' j)) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite mxE eq_sym mulrnAl => /negbTE->.
Qed.
Lemma mul_mx_diag m n (A : 'M_(m, n)) d :
A *m diag_mx d = \matrix_(i, j) (A i j * d 0 j).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@mulmx m n n A (@diag_mx n d)) (@matrix_of_fun (GRing.Ring.sort R) m n matrix_key (fun (i : Finite.sort (ordinal_finType m)) (j : Finite.sort (ordinal_finType n)) => @GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) j))) *)
apply/matrixP=> i j; rewrite !mxE (bigD1 j) //= mxE eqxx big1 ?addr0 // => i'.
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType n)) i' j)), @eq (GRing.Ring.sort R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i i') (@fun_of_matrix (GRing.Ring.sort R) n n (@diag_mx n d) i' j)) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite mxE eq_sym mulrnAr; move/negbTE->.
Qed.
Lemma mulmx_diag n (d e : 'rV_n) :
diag_mx d *m diag_mx e = diag_mx (\row_j (d 0 j * e 0 j)).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (@mulmx n n n (@diag_mx n d) (@diag_mx n e)) (@diag_mx n (@matrix_of_fun (GRing.Ring.sort R) (S O) n matrix_key (fun (_ : Finite.sort (ordinal_finType (S O))) (j : Finite.sort (ordinal_finType n)) => @GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) j) (@fun_of_matrix (GRing.Ring.sort R) (S O) n e (GRing.zero (Zp_zmodType O)) j)))) *)
by apply/matrixP=> i j; rewrite mul_diag_mx !mxE mulrnAr.
Qed.
Lemma mul_scalar_mx m n a (A : 'M_(m, n)) : a%:M *m A = a *: A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@mulmx m m n (scalar_mx m a) A) (@GRing.scale R (matrix_lmodType m n) a A) *)
by rewrite -diag_const_mx mul_diag_mx; apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma scalar_mxM n a b : (a * b)%:M = a%:M *m b%:M :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (scalar_mx n (@GRing.mul R a b)) (@mulmx n n n (scalar_mx n a) (scalar_mx n b)) *)
by rewrite mul_scalar_mx scale_scalar_mx.
Qed.
Lemma mul1mx m n (A : 'M_(m, n)) : 1%:M *m A = A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@mulmx m m n (scalar_mx m (GRing.one R)) A) A *)
by rewrite mul_scalar_mx scale1r.
Qed.
Lemma mulmx1 m n (A : 'M_(m, n)) : A *m 1%:M = A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@mulmx m n n A (scalar_mx n (GRing.one R))) A *)
rewrite -diag_const_mx mul_mx_diag.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@matrix_of_fun (GRing.Ring.sort R) m n matrix_key (fun (i : Finite.sort (ordinal_finType m)) (j : Finite.sort (ordinal_finType n)) => @GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) (S O) n (@const_mx (GRing.Ring.sort R) (S O) n (GRing.one R)) (GRing.zero (Zp_zmodType O)) j))) A *)
by apply/matrixP=> i j; rewrite !mxE mulr1.
Qed.
Lemma mul_col_perm m n p s (A : 'M_(m, n)) (B : 'M_(n, p)) :
col_perm s A *m B = A *m row_perm s^-1 B.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@col_perm (GRing.Ring.sort R) m n s A) B) (@mulmx m n p A (@row_perm (GRing.Ring.sort R) n p (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s) B)) *)
apply/matrixP=> i k; rewrite !mxE (reindex_perm s^-1).
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@Monoid.operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@Monoid.com_operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (GRing.add_comoid (GRing.Ring.zmodType R)))) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@col_perm (GRing.Ring.sort R) m n s A) i (@PermDef.fun_of_perm (ordinal_finType n) (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s) j)) (@fun_of_matrix (GRing.Ring.sort R) n p B (@PermDef.fun_of_perm (ordinal_finType n) (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s) j) k)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@row_perm (GRing.Ring.sort R) n p (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s) B) j k)))) *)
by apply: eq_bigr => j _ /=; rewrite !mxE permKV.
Qed.
Lemma mul_row_perm m n p s (A : 'M_(m, n)) (B : 'M_(n, p)) :
A *m row_perm s B = col_perm s^-1 A *m B.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p A (@row_perm (GRing.Ring.sort R) n p s B)) (@mulmx m n p (@col_perm (GRing.Ring.sort R) m n (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s) A) B) *)
by rewrite mul_col_perm invgK.
Qed.
Lemma mul_xcol m n p j1 j2 (A : 'M_(m, n)) (B : 'M_(n, p)) :
xcol j1 j2 A *m B = A *m xrow j1 j2 B.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@xcol (GRing.Ring.sort R) m n j1 j2 A) B) (@mulmx m n p A (@xrow (GRing.Ring.sort R) n p j1 j2 B)) *)
by rewrite mul_col_perm tpermV.
Qed.
Definition perm_mx n s : 'M_n := row_perm s 1%:M.
Definition tperm_mx n i1 i2 : 'M_n := perm_mx (tperm i1 i2).
Lemma col_permE m n s (A : 'M_(m, n)) : col_perm s A = A *m perm_mx s^-1.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@col_perm (GRing.Ring.sort R) m n s A) (@mulmx m n n A (@perm_mx n (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s))) *)
by rewrite mul_row_perm mulmx1 invgK.
Qed.
Lemma row_permE m n s (A : 'M_(m, n)) : row_perm s A = perm_mx s *m A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@row_perm (GRing.Ring.sort R) m n s A) (@mulmx m m n (@perm_mx m s) A) *)
by rewrite -[perm_mx _]mul1mx mul_row_perm mulmx1 -mul_row_perm mul1mx.
Qed.
Lemma xcolE m n j1 j2 (A : 'M_(m, n)) : xcol j1 j2 A = A *m tperm_mx j1 j2.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@xcol (GRing.Ring.sort R) m n j1 j2 A) (@mulmx m n n A (@tperm_mx n j1 j2)) *)
by rewrite /xcol col_permE tpermV.
Qed.
Lemma xrowE m n i1 i2 (A : 'M_(m, n)) : xrow i1 i2 A = tperm_mx i1 i2 *m A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@xrow (GRing.Ring.sort R) m n i1 i2 A) (@mulmx m m n (@tperm_mx m i1 i2) A) *)
exact: row_permE.
Qed.
Lemma tr_perm_mx n (s : 'S_n) : (perm_mx s)^T = perm_mx s^-1.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (@trmx (GRing.Ring.sort R) n n (@perm_mx n s)) (@perm_mx n (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s)) *)
by rewrite -[_^T]mulmx1 tr_row_perm mul_col_perm trmx1 mul1mx.
Qed.
Lemma tr_tperm_mx n i1 i2 : (tperm_mx i1 i2)^T = tperm_mx i1 i2 :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (@trmx (GRing.Ring.sort R) n n (@tperm_mx n i1 i2)) (@tperm_mx n i1 i2) *)
by rewrite tr_perm_mx tpermV.
Qed.
Lemma perm_mx1 n : perm_mx 1 = 1%:M :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (@perm_mx n (oneg (perm_of_baseFinGroupType (ordinal_finType n)))) (scalar_mx n (GRing.one R)) *)
exact: row_perm1.
Qed.
Lemma perm_mxM n (s t : 'S_n) : perm_mx (s * t) = perm_mx s *m perm_mx t.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (@perm_mx n (@mulg (perm_of_baseFinGroupType (ordinal_finType n)) s t)) (@mulmx n n n (@perm_mx n s) (@perm_mx n t)) *)
by rewrite -row_permE -row_permM.
Qed.
Definition is_perm_mx n (A : 'M_n) := [exists s, A == perm_mx s].
Lemma is_perm_mxP n (A : 'M_n) :
reflect (exists s, A = perm_mx s) (is_perm_mx A).
Proof.
(* Goal: Bool.reflect (@ex (@perm_of (ordinal_finType n) (Phant (ordinal n))) (fun s : @perm_of (ordinal_finType n) (Phant (ordinal n)) => @eq (matrix (GRing.Ring.sort R) n n) A (@perm_mx n s))) (@is_perm_mx n A) *)
by apply: (iffP existsP) => [] [s /eqP]; exists s.
Qed.
Lemma perm_mx_is_perm n (s : 'S_n) : is_perm_mx (perm_mx s).
Proof.
(* Goal: is_true (@is_perm_mx n (@perm_mx n s)) *)
by apply/is_perm_mxP; exists s.
Qed.
Lemma is_perm_mx1 n : is_perm_mx (1%:M : 'M_n).
Proof.
(* Goal: is_true (@is_perm_mx n (scalar_mx n (GRing.one R) : matrix (GRing.Ring.sort R) n n)) *)
by rewrite -perm_mx1 perm_mx_is_perm.
Qed.
Lemma is_perm_mxMl n (A B : 'M_n) :
is_perm_mx A -> is_perm_mx (A *m B) = is_perm_mx B.
Proof.
(* Goal: forall _ : is_true (@is_perm_mx n A), @eq bool (@is_perm_mx n (@mulmx n n n A B)) (@is_perm_mx n B) *)
case/is_perm_mxP=> s ->.
(* Goal: @eq bool (@is_perm_mx n (@mulmx n n n (@perm_mx n s) B)) (@is_perm_mx n B) *)
apply/is_perm_mxP/is_perm_mxP=> [[t def_t] | [t ->]]; last first.
(* Goal: @ex (@perm_of (ordinal_finType n) (Phant (ordinal n))) (fun s : @perm_of (ordinal_finType n) (Phant (ordinal n)) => @eq (matrix (GRing.Ring.sort R) n n) B (@perm_mx n s)) *)
(* Goal: @ex (@perm_of (ordinal_finType n) (Phant (ordinal n))) (fun s0 : @perm_of (ordinal_finType n) (Phant (ordinal n)) => @eq (matrix (GRing.Ring.sort R) n n) (@mulmx n n n (@perm_mx n s) (@perm_mx n t)) (@perm_mx n s0)) *)
by exists (s * t)%g; rewrite perm_mxM.
(* Goal: @ex (@perm_of (ordinal_finType n) (Phant (ordinal n))) (fun s : @perm_of (ordinal_finType n) (Phant (ordinal n)) => @eq (matrix (GRing.Ring.sort R) n n) B (@perm_mx n s)) *)
exists (s^-1 * t)%g.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) B (@perm_mx n (@mulg (perm_of_baseFinGroupType (ordinal_finType n)) (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s) t)) *)
by rewrite perm_mxM -def_t -!row_permE -row_permM mulVg row_perm1.
Qed.
Lemma is_perm_mx_tr n (A : 'M_n) : is_perm_mx A^T = is_perm_mx A.
Proof.
(* Goal: @eq bool (@is_perm_mx n (@trmx (Equality.sort (GRing.Ring.eqType R)) n n A)) (@is_perm_mx n A) *)
apply/is_perm_mxP/is_perm_mxP=> [[t def_t] | [t ->]]; exists t^-1%g.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (@trmx (Equality.sort (GRing.Ring.eqType R)) n n (@perm_mx n t)) (@perm_mx n (@invg (perm_of_baseFinGroupType (ordinal_finType n)) t)) *)
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) A (@perm_mx n (@invg (perm_of_baseFinGroupType (ordinal_finType n)) t)) *)
by rewrite -tr_perm_mx -def_t trmxK.
(* Goal: @eq (matrix (GRing.Ring.sort R) n n) (@trmx (Equality.sort (GRing.Ring.eqType R)) n n (@perm_mx n t)) (@perm_mx n (@invg (perm_of_baseFinGroupType (ordinal_finType n)) t)) *)
by rewrite tr_perm_mx.
Qed.
Lemma is_perm_mxMr n (A B : 'M_n) :
is_perm_mx B -> is_perm_mx (A *m B) = is_perm_mx A.
Proof.
(* Goal: forall _ : is_true (@is_perm_mx n B), @eq bool (@is_perm_mx n (@mulmx n n n A B)) (@is_perm_mx n A) *)
case/is_perm_mxP=> s ->.
(* Goal: @eq bool (@is_perm_mx n (@mulmx n n n A (@perm_mx n s))) (@is_perm_mx n A) *)
rewrite -[s]invgK -col_permE -is_perm_mx_tr tr_col_perm row_permE.
(* Goal: @eq bool (@is_perm_mx n (@mulmx n n n (@perm_mx n (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s)) (@trmx (Equality.sort (GRing.Ring.eqType R)) n n A))) (@is_perm_mx n A) *)
by rewrite is_perm_mxMl (perm_mx_is_perm, is_perm_mx_tr).
Qed.
Definition pid_mx {m n} r : 'M[R]_(m, n) :=
\matrix[pid_mx_key]_(i, j) ((i == j :> nat) && (i < r))%:R.
Lemma pid_mx_0 m n : pid_mx 0 = 0 :> 'M_(m, n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@pid_mx m n O) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n)) *)
by apply/matrixP=> i j; rewrite !mxE andbF.
Qed.
Lemma pid_mx_1 r : pid_mx r = 1%:M :> 'M_r.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) r r) (@pid_mx r r r) (scalar_mx r (GRing.one R)) *)
by apply/matrixP=> i j; rewrite !mxE ltn_ord andbT.
Qed.
Lemma pid_mx_row n r : pid_mx r = row_mx 1%:M 0 :> 'M_(r, r + n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) r (addn r n)) (@pid_mx r (addn r n) r) (@row_mx (GRing.Ring.sort R) r r n (scalar_mx r (GRing.one R)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) r n))) *)
apply/matrixP=> i j; rewrite !mxE ltn_ord andbT.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (@nat_of_ord r i) (@nat_of_ord (addn r n) j)))) match @split r n j with | inl j1 => @fun_of_matrix (GRing.Ring.sort R) r r (scalar_mx r (GRing.one R)) i j1 | inr j2 => @fun_of_matrix (GRing.Ring.sort R) r n (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) r n)) i j2 end *)
case: splitP => j' ->; rewrite !mxE // .
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (@nat_of_ord r i) (addn r (@nat_of_ord n j'))))) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite eqn_leq andbC leqNgt lshift_subproof.
Qed.
Lemma pid_mx_col m r : pid_mx r = col_mx 1%:M 0 :> 'M_(r + m, r).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn r m) r) (@pid_mx (addn r m) r r) (@col_mx (GRing.Ring.sort R) r m r (scalar_mx r (GRing.one R)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m r))) *)
apply/matrixP=> i j; rewrite !mxE andbC.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (leq (S (@nat_of_ord (addn r m) i)) r) (@eq_op nat_eqType (@nat_of_ord (addn r m) i) (@nat_of_ord r j))))) match @split r m i with | inl i1 => @fun_of_matrix (GRing.Ring.sort R) r r (scalar_mx r (GRing.one R)) i1 j | inr i2 => @fun_of_matrix (GRing.Ring.sort R) m r (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m r)) i2 j end *)
by case: splitP => i' ->; rewrite !mxE // eq_sym.
Qed.
Lemma pid_mx_block m n r : pid_mx r = block_mx 1%:M 0 0 0 :> 'M_(r + m, r + n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn r m) (addn r n)) (@pid_mx (addn r m) (addn r n) r) (@block_mx (GRing.Ring.sort R) r m r n (scalar_mx r (GRing.one R)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) r n)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m r)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n))) *)
apply/matrixP=> i j; rewrite !mxE row_mx0 andbC.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (leq (S (@nat_of_ord (addn r m) i)) r) (@eq_op nat_eqType (@nat_of_ord (addn r m) i) (@nat_of_ord (addn r n) j))))) match @split r m i with | inl i1 => @fun_of_matrix (GRing.Ring.sort R) r (addn r n) (@row_mx (GRing.Ring.sort R) r r n (scalar_mx r (GRing.one R)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) r n))) i1 j | inr i2 => @fun_of_matrix (GRing.Ring.sort R) m (addn r n) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m (addn r n))) i2 j end *)
case: splitP => i' ->; rewrite !mxE //; case: splitP => j' ->; rewrite !mxE //=.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (@nat_of_ord r i') (addn r (@nat_of_ord n j'))))) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite eqn_leq andbC leqNgt lshift_subproof.
Qed.
Lemma tr_pid_mx m n r : (pid_mx r)^T = pid_mx r :> 'M_(n, m).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) n m) (@trmx (GRing.Ring.sort R) m n (@pid_mx m n r)) (@pid_mx n m r) *)
by apply/matrixP=> i j; rewrite !mxE eq_sym; case: eqP => // ->.
Qed.
Lemma pid_mx_minv m n r : pid_mx (minn m r) = pid_mx r :> 'M_(m, n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@pid_mx m n (minn m r)) (@pid_mx m n r) *)
by apply/matrixP=> i j; rewrite !mxE leq_min ltn_ord.
Qed.
Lemma pid_mx_minh m n r : pid_mx (minn n r) = pid_mx r :> 'M_(m, n).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m n) (@pid_mx m n (minn n r)) (@pid_mx m n r) *)
by apply: trmx_inj; rewrite !tr_pid_mx pid_mx_minv.
Qed.
Lemma mul_pid_mx m n p q r :
(pid_mx q : 'M_(m, n)) *m (pid_mx r : 'M_(n, p)) = pid_mx (minn n (minn q r)).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@pid_mx m n q : matrix (GRing.Ring.sort R) m n) (@pid_mx n p r : matrix (GRing.Ring.sort R) n p)) (@pid_mx m p (minn n (minn q r))) *)
apply/matrixP=> i k; rewrite !mxE !leq_min.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) j k)))) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op nat_eqType (@nat_of_ord m i) (@nat_of_ord p k)) (andb (leq (S (@nat_of_ord m i)) n) (andb (leq (S (@nat_of_ord m i)) q) (leq (S (@nat_of_ord m i)) r)))))) *)
have [le_n_i | lt_i_n] := leqP n i.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) j k)))) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op nat_eqType (@nat_of_ord m i) (@nat_of_ord p k)) (andb true (andb (leq (S (@nat_of_ord m i)) q) (leq (S (@nat_of_ord m i)) r)))))) *)
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) j k)))) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op nat_eqType (@nat_of_ord m i) (@nat_of_ord p k)) (andb false (andb (leq (S (@nat_of_ord m i)) q) (leq (S (@nat_of_ord m i)) r)))))) *)
rewrite andbF big1 // => j _.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) j k)))) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op nat_eqType (@nat_of_ord m i) (@nat_of_ord p k)) (andb true (andb (leq (S (@nat_of_ord m i)) q) (leq (S (@nat_of_ord m i)) r)))))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) j k)) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite -pid_mx_minh !mxE leq_min ltnNge le_n_i andbF mul0r.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) j k)))) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op nat_eqType (@nat_of_ord m i) (@nat_of_ord p k)) (andb true (andb (leq (S (@nat_of_ord m i)) q) (leq (S (@nat_of_ord m i)) r)))))) *)
rewrite (bigD1 (Ordinal lt_i_n)) //= big1 ?addr0 => [|j].
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType n)) j (@Ordinal n (@nat_of_ord m i) lt_i_n))), @eq (GRing.Ring.sort R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) j k)) (GRing.zero (GRing.Ring.zmodType R)) *)
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i (@Ordinal n (@nat_of_ord m i) lt_i_n)) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) (@Ordinal n (@nat_of_ord m i) lt_i_n) k)) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (andb (@eq_op nat_eqType (@nat_of_ord m i) (@nat_of_ord p k)) (andb (leq (S (@nat_of_ord m i)) q) (leq (S (@nat_of_ord m i)) r))))) *)
by rewrite !mxE eqxx /= -natrM mulnb andbCA.
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType n)) j (@Ordinal n (@nat_of_ord m i) lt_i_n))), @eq (GRing.Ring.sort R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n (@pid_mx m n q) i j) (@fun_of_matrix (GRing.Ring.sort R) n p (@pid_mx n p r) j k)) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite -val_eqE /= !mxE eq_sym -natrM => /negbTE->.
Qed.
Lemma pid_mx_id m n p r :
r <= n -> (pid_mx r : 'M_(m, n)) *m (pid_mx r : 'M_(n, p)) = pid_mx r.
Proof.
(* Goal: forall _ : is_true (leq r n), @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m n p (@pid_mx m n r : matrix (GRing.Ring.sort R) m n) (@pid_mx n p r : matrix (GRing.Ring.sort R) n p)) (@pid_mx m p r) *)
by move=> le_r_n; rewrite mul_pid_mx minnn (minn_idPr _).
Qed.
Definition copid_mx {n} r : 'M_n := 1%:M - pid_mx r.
Lemma mul_copid_mx_pid m n r :
r <= m -> copid_mx r *m pid_mx r = 0 :> 'M_(m, n).
Proof.
(* Goal: forall _ : is_true (leq r m), @eq (matrix (GRing.Ring.sort R) m n) (@mulmx m m n (@copid_mx m r) (@pid_mx m n r)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n)) *)
by move=> le_r_m; rewrite mulmxBl mul1mx pid_mx_id ?subrr.
Qed.
Lemma mul_pid_mx_copid m n r :
r <= n -> pid_mx r *m copid_mx r = 0 :> 'M_(m, n).
Proof.
(* Goal: forall _ : is_true (leq r n), @eq (matrix (GRing.Ring.sort R) m n) (@mulmx m n n (@pid_mx m n r) (@copid_mx n r)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) m n)) *)
by move=> le_r_n; rewrite mulmxBr mulmx1 pid_mx_id ?subrr.
Qed.
Lemma copid_mx_id n r :
r <= n -> copid_mx r *m copid_mx r = copid_mx r :> 'M_n.
Proof.
(* Goal: forall _ : is_true (leq r n), @eq (matrix (GRing.Ring.sort R) n n) (@mulmx n n n (@copid_mx n r) (@copid_mx n r)) (@copid_mx n r) *)
by move=> le_r_n; rewrite mulmxBl mul1mx mul_pid_mx_copid // oppr0 addr0.
Qed.
Lemma mul_mx_row m n p1 p2 (A : 'M_(m, n)) (Bl : 'M_(n, p1)) (Br : 'M_(n, p2)) :
A *m row_mx Bl Br = row_mx (A *m Bl) (A *m Br).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m (addn p1 p2)) (@mulmx m n (addn p1 p2) A (@row_mx (GRing.Ring.sort R) n p1 p2 Bl Br)) (@row_mx (GRing.Ring.sort R) m p1 p2 (@mulmx m n p1 A Bl) (@mulmx m n p2 A Br)) *)
apply/matrixP=> i k; rewrite !mxE.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n A i j) (@fun_of_matrix (GRing.Ring.sort R) n (addn p1 p2) (@row_mx (GRing.Ring.sort R) n p1 p2 Bl Br) j k)))) match @split p1 p2 k with | inl j1 => @fun_of_matrix (GRing.Ring.sort R) m p1 (@mulmx m n p1 A Bl) i j1 | inr j2 => @fun_of_matrix (GRing.Ring.sort R) m p2 (@mulmx m n p2 A Br) i j2 end *)
by case defk: (split k); rewrite mxE; apply: eq_bigr => j _; rewrite mxE defk.
Qed.
Lemma mul_col_mx m1 m2 n p (Au : 'M_(m1, n)) (Ad : 'M_(m2, n)) (B : 'M_(n, p)) :
col_mx Au Ad *m B = col_mx (Au *m B) (Ad *m B).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn m1 m2) p) (@mulmx (addn m1 m2) n p (@col_mx (GRing.Ring.sort R) m1 m2 n Au Ad) B) (@col_mx (GRing.Ring.sort R) m1 m2 p (@mulmx m1 n p Au B) (@mulmx m2 n p Ad B)) *)
apply/matrixP=> i k; rewrite !mxE.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) (addn m1 m2) n (@col_mx (GRing.Ring.sort R) m1 m2 n Au Ad) i j) (@fun_of_matrix (GRing.Ring.sort R) n p B j k)))) match @split m1 m2 i with | inl i1 => @fun_of_matrix (GRing.Ring.sort R) m1 p (@mulmx m1 n p Au B) i1 k | inr i2 => @fun_of_matrix (GRing.Ring.sort R) m2 p (@mulmx m2 n p Ad B) i2 k end *)
by case defi: (split i); rewrite mxE; apply: eq_bigr => j _; rewrite mxE defi.
Qed.
Lemma mul_row_col m n1 n2 p (Al : 'M_(m, n1)) (Ar : 'M_(m, n2))
(Bu : 'M_(n1, p)) (Bd : 'M_(n2, p)) :
row_mx Al Ar *m col_mx Bu Bd = Al *m Bu + Ar *m Bd.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m p) (@mulmx m (addn n1 n2) p (@row_mx (GRing.Ring.sort R) m n1 n2 Al Ar) (@col_mx (GRing.Ring.sort R) n1 n2 p Bu Bd)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n1 p Al Bu) (@mulmx m n2 p Ar Bd)) *)
apply/matrixP=> i k; rewrite !mxE big_split_ord /=.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.add (GRing.Ring.zmodType R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n1) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n1)) (fun i0 : ordinal n1 => @BigBody (GRing.Ring.sort R) (ordinal n1) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m (addn n1 n2) (@row_mx (GRing.Ring.sort R) m n1 n2 Al Ar) i (@lshift n1 n2 i0)) (@fun_of_matrix (GRing.Ring.sort R) (addn n1 n2) p (@col_mx (GRing.Ring.sort R) n1 n2 p Bu Bd) (@lshift n1 n2 i0) k)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n2) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n2)) (fun i0 : ordinal n2 => @BigBody (GRing.Ring.sort R) (ordinal n2) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m (addn n1 n2) (@row_mx (GRing.Ring.sort R) m n1 n2 Al Ar) i (@rshift n1 n2 i0)) (@fun_of_matrix (GRing.Ring.sort R) (addn n1 n2) p (@col_mx (GRing.Ring.sort R) n1 n2 p Bu Bd) (@rshift n1 n2 i0) k))))) (@GRing.add (GRing.Ring.zmodType R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n1) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n1)) (fun j : ordinal n1 => @BigBody (GRing.Ring.sort R) (ordinal n1) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n1 Al i j) (@fun_of_matrix (GRing.Ring.sort R) n1 p Bu j k)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n2) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n2)) (fun j : ordinal n2 => @BigBody (GRing.Ring.sort R) (ordinal n2) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n2 Ar i j) (@fun_of_matrix (GRing.Ring.sort R) n2 p Bd j k))))) *)
congr (_ + _); apply: eq_bigr => j _; first by rewrite row_mxEl col_mxEu.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m (addn n1 n2) (@row_mx (GRing.Ring.sort R) m n1 n2 Al Ar) i (@rshift n1 n2 j)) (@fun_of_matrix (GRing.Ring.sort R) (addn n1 n2) p (@col_mx (GRing.Ring.sort R) n1 n2 p Bu Bd) (@rshift n1 n2 j) k)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) m n2 Ar i j) (@fun_of_matrix (GRing.Ring.sort R) n2 p Bd j k)) *)
by rewrite row_mxEr col_mxEd.
Qed.
Lemma mul_col_row m1 m2 n p1 p2 (Au : 'M_(m1, n)) (Ad : 'M_(m2, n))
(Bl : 'M_(n, p1)) (Br : 'M_(n, p2)) :
col_mx Au Ad *m row_mx Bl Br
= block_mx (Au *m Bl) (Au *m Br) (Ad *m Bl) (Ad *m Br).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn m1 m2) (addn p1 p2)) (@mulmx (addn m1 m2) n (addn p1 p2) (@col_mx (GRing.Ring.sort R) m1 m2 n Au Ad) (@row_mx (GRing.Ring.sort R) n p1 p2 Bl Br)) (@block_mx (GRing.Ring.sort R) m1 m2 p1 p2 (@mulmx m1 n p1 Au Bl) (@mulmx m1 n p2 Au Br) (@mulmx m2 n p1 Ad Bl) (@mulmx m2 n p2 Ad Br)) *)
by rewrite mul_col_mx !mul_mx_row.
Qed.
Lemma mul_row_block m n1 n2 p1 p2 (Al : 'M_(m, n1)) (Ar : 'M_(m, n2))
(Bul : 'M_(n1, p1)) (Bur : 'M_(n1, p2))
(Bdl : 'M_(n2, p1)) (Bdr : 'M_(n2, p2)) :
row_mx Al Ar *m block_mx Bul Bur Bdl Bdr
= row_mx (Al *m Bul + Ar *m Bdl) (Al *m Bur + Ar *m Bdr).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m (addn p1 p2)) (@mulmx m (addn n1 n2) (addn p1 p2) (@row_mx (GRing.Ring.sort R) m n1 n2 Al Ar) (@block_mx (GRing.Ring.sort R) n1 n2 p1 p2 Bul Bur Bdl Bdr)) (@row_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m p1 p2 (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p1) (@mulmx m n1 p1 Al Bul) (@mulmx m n2 p1 Ar Bdl)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p2) (@mulmx m n1 p2 Al Bur) (@mulmx m n2 p2 Ar Bdr))) *)
by rewrite block_mxEh mul_mx_row !mul_row_col.
Qed.
Lemma mul_block_col m1 m2 n1 n2 p (Aul : 'M_(m1, n1)) (Aur : 'M_(m1, n2))
(Adl : 'M_(m2, n1)) (Adr : 'M_(m2, n2))
(Bu : 'M_(n1, p)) (Bd : 'M_(n2, p)) :
block_mx Aul Aur Adl Adr *m col_mx Bu Bd
= col_mx (Aul *m Bu + Aur *m Bd) (Adl *m Bu + Adr *m Bd).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn m1 m2) p) (@mulmx (addn m1 m2) (addn n1 n2) p (@block_mx (GRing.Ring.sort R) m1 m2 n1 n2 Aul Aur Adl Adr) (@col_mx (GRing.Ring.sort R) n1 n2 p Bu Bd)) (@col_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m1 m2 p (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m1 p) (@mulmx m1 n1 p Aul Bu) (@mulmx m1 n2 p Aur Bd)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m2 p) (@mulmx m2 n1 p Adl Bu) (@mulmx m2 n2 p Adr Bd))) *)
by rewrite mul_col_mx !mul_row_col.
Qed.
Lemma mulmx_block m1 m2 n1 n2 p1 p2 (Aul : 'M_(m1, n1)) (Aur : 'M_(m1, n2))
(Adl : 'M_(m2, n1)) (Adr : 'M_(m2, n2))
(Bul : 'M_(n1, p1)) (Bur : 'M_(n1, p2))
(Bdl : 'M_(n2, p1)) (Bdr : 'M_(n2, p2)) :
block_mx Aul Aur Adl Adr *m block_mx Bul Bur Bdl Bdr
= block_mx (Aul *m Bul + Aur *m Bdl) (Aul *m Bur + Aur *m Bdr)
(Adl *m Bul + Adr *m Bdl) (Adl *m Bur + Adr *m Bdr).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn m1 m2) (addn p1 p2)) (@mulmx (addn m1 m2) (addn n1 n2) (addn p1 p2) (@block_mx (GRing.Ring.sort R) m1 m2 n1 n2 Aul Aur Adl Adr) (@block_mx (GRing.Ring.sort R) n1 n2 p1 p2 Bul Bur Bdl Bdr)) (@block_mx (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m1 m2 p1 p2 (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m1 p1) (@mulmx m1 n1 p1 Aul Bul) (@mulmx m1 n2 p1 Aur Bdl)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m1 p2) (@mulmx m1 n1 p2 Aul Bur) (@mulmx m1 n2 p2 Aur Bdr)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m2 p1) (@mulmx m2 n1 p1 Adl Bul) (@mulmx m2 n2 p1 Adr Bdl)) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m2 p2) (@mulmx m2 n1 p2 Adl Bur) (@mulmx m2 n2 p2 Adr Bdr))) *)
by rewrite mul_col_mx !mul_row_block.
Qed.
Definition lin1_mx (f : 'rV[R]_m -> 'rV[R]_n) :=
\matrix[lin1_mx_key]_(i, j) f (delta_mx 0 i) 0 j.
Variable f : {linear 'rV[R]_m -> 'rV[R]_n}.
Lemma mul_rV_lin1 u : u *m lin1_mx f = f u.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) n) (@mulmx (S O) m n u (lin1_mx (@GRing.Linear.apply R (matrix_lmodType (S O) m) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)))) (@GRing.scale R (matrix_lmodType (S O) n)) (Phant (forall _ : matrix (GRing.Ring.sort R) (S O) m, matrix (GRing.Ring.sort R) (S O) n)) f))) (@GRing.Linear.apply R (matrix_lmodType (S O) m) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)))) (@GRing.scale R (matrix_lmodType (S O) n)) (Phant (forall _ : matrix (GRing.Ring.sort R) (S O) m, matrix (GRing.Ring.sort R) (S O) n)) f u) *)
rewrite {2}[u]matrix_sum_delta big_ord1 linear_sum; apply/rowP=> i.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S O) n (@mulmx (S O) m n u (lin1_mx (@GRing.Linear.apply R (matrix_lmodType (S O) m) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)))) (@GRing.scale R (matrix_lmodType (S O) n)) (Phant (forall _ : matrix (GRing.Ring.sort R) (S O) m, matrix (GRing.Ring.sort R) (S O) n)) f))) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.Ring.sort R) (S O) n (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) (Finite.sort (ordinal_finType m)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n))))) true (@GRing.Linear.apply R (matrix_lmodType (S O) m) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)))) (@GRing.scale R (matrix_lmodType (S O) n)) (Phant (forall _ : @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) m), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (S O) n)))))) f (@GRing.scale R (matrix_lmodType (S O) m) (@fun_of_matrix (GRing.Ring.sort R) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@delta_mx (S O) m (GRing.zero (Zp_zmodType O)) i))))) (GRing.zero (Zp_zmodType O)) i) *)
by rewrite mxE summxE; apply: eq_bigr => j _; rewrite linearZ !mxE.
Qed.
End LinRowVector.
Section LinMatrix.
Variables m1 n1 m2 n2 : nat.
Definition lin_mx (f : 'M[R]_(m1, n1) -> 'M[R]_(m2, n2)) :=
lin1_mx (mxvec \o f \o vec_mx).
Variable f : {linear 'M[R]_(m1, n1) -> 'M[R]_(m2, n2)}.
Lemma mul_rV_lin u : u *m lin_mx f = mxvec (f (vec_mx u)).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) (muln m2 n2)) (@mulmx (S O) (muln m1 n1) (muln m2 n2) u (lin_mx (@GRing.Linear.apply R (matrix_lmodType m1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)))) (@GRing.scale R (matrix_lmodType m2 n2)) (Phant (forall _ : matrix (GRing.Ring.sort R) m1 n1, matrix (GRing.Ring.sort R) m2 n2)) f))) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m2 n2 (@GRing.Linear.apply R (matrix_lmodType m1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)))) (@GRing.scale R (matrix_lmodType m2 n2)) (Phant (forall _ : matrix (GRing.Ring.sort R) m1 n1, matrix (GRing.Ring.sort R) m2 n2)) f (@vec_mx (GRing.Ring.sort R) m1 n1 u))) *)
exact: mul_rV_lin1.
Qed.
Lemma mul_vec_lin A : mxvec A *m lin_mx f = mxvec (f A).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) (muln m2 n2)) (@mulmx (S O) (muln m1 n1) (muln m2 n2) (@mxvec (GRing.Ring.sort R) m1 n1 A) (lin_mx (@GRing.Linear.apply R (matrix_lmodType m1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)))) (@GRing.scale R (matrix_lmodType m2 n2)) (Phant (forall _ : matrix (GRing.Ring.sort R) m1 n1, matrix (GRing.Ring.sort R) m2 n2)) f))) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m2 n2 (@GRing.Linear.apply R (matrix_lmodType m1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)))) (@GRing.scale R (matrix_lmodType m2 n2)) (Phant (forall _ : matrix (GRing.Ring.sort R) m1 n1, matrix (GRing.Ring.sort R) m2 n2)) f A)) *)
by rewrite mul_rV_lin mxvecK.
Qed.
Lemma mx_rV_lin u : vec_mx (u *m lin_mx f) = f (vec_mx u).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m2 n2) (@vec_mx (GRing.Ring.sort R) m2 n2 (@mulmx (S O) (muln m1 n1) (muln m2 n2) u (lin_mx (@GRing.Linear.apply R (matrix_lmodType m1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)))) (@GRing.scale R (matrix_lmodType m2 n2)) (Phant (forall _ : matrix (GRing.Ring.sort R) m1 n1, matrix (GRing.Ring.sort R) m2 n2)) f)))) (@GRing.Linear.apply R (matrix_lmodType m1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)))) (@GRing.scale R (matrix_lmodType m2 n2)) (Phant (forall _ : matrix (GRing.Ring.sort R) m1 n1, matrix (GRing.Ring.sort R) m2 n2)) f (@vec_mx (GRing.Ring.sort R) m1 n1 u)) *)
by rewrite mul_rV_lin mxvecK.
Qed.
Lemma mx_vec_lin A : vec_mx (mxvec A *m lin_mx f) = f A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) m2 n2) (@vec_mx (GRing.Ring.sort R) m2 n2 (@mulmx (S O) (muln m1 n1) (muln m2 n2) (@mxvec (GRing.Ring.sort R) m1 n1 A) (lin_mx (@GRing.Linear.apply R (matrix_lmodType m1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)))) (@GRing.scale R (matrix_lmodType m2 n2)) (Phant (forall _ : matrix (GRing.Ring.sort R) m1 n1, matrix (GRing.Ring.sort R) m2 n2)) f)))) (@GRing.Linear.apply R (matrix_lmodType m1 n1) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m2 n2)))) (@GRing.scale R (matrix_lmodType m2 n2)) (Phant (forall _ : matrix (GRing.Ring.sort R) m1 n1, matrix (GRing.Ring.sort R) m2 n2)) f A) *)
by rewrite mul_rV_lin !mxvecK.
Qed.
End LinMatrix.
Canonical mulmx_additive m n p A := Additive (@mulmxBr m n p A).
Section Mulmxr.
Variables m n p : nat.
Implicit Type A : 'M[R]_(m, n).
Implicit Type B : 'M[R]_(n, p).
Definition mulmxr_head t B A := let: tt := t in A *m B.
Local Notation mulmxr := (mulmxr_head tt).
Definition lin_mulmxr B := lin_mx (mulmxr B).
Lemma mulmxr_is_linear B : linear (mulmxr B).
Proof.
(* Goal: @GRing.Linear.axiom R (matrix_lmodType m n) (matrix_zmodType (GRing.Ring.zmodType R) m p) (@GRing.scale R (matrix_lmodType m p)) (mulmxr_head tt B) (@GRing.Scale.scale_law R (matrix_lmodType m p)) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p))))) (@GRing.scale R (matrix_lmodType m p))) *)
by move=> a A1 A2; rewrite /= mulmxDl scalemxAl.
Qed.
Canonical mulmxr_additive B := Additive (mulmxr_is_linear B).
Canonical mulmxr_linear B := Linear (mulmxr_is_linear B).
Lemma lin_mulmxr_is_linear : linear lin_mulmxr.
Proof.
(* Goal: @GRing.Linear.axiom R (matrix_lmodType n p) (matrix_zmodType (GRing.Ring.zmodType R) (muln m n) (muln m p)) (@GRing.scale R (matrix_lmodType (muln m n) (muln m p))) lin_mulmxr (@GRing.Scale.scale_law R (matrix_lmodType (muln m n) (muln m p))) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (muln m n) (muln m p))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (muln m n) (muln m p))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (muln m n) (muln m p)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (muln m n) (muln m p))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType (muln m n) (muln m p))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType (muln m n) (muln m p)))))) (@GRing.scale R (matrix_lmodType (muln m n) (muln m p)))) *)
move=> a A B; apply/row_matrixP; case/mxvec_indexP=> i j.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S O) (muln m p)) (@row (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (muln m n) (muln m p) (@mxvec_index m n i j) (lin_mulmxr (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n p)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType n p)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType n p)))) (@GRing.scale R (matrix_lmodType n p) a A) B))) (@row (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (muln m n) (muln m p) (@mxvec_index m n i j) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) (muln m n) (muln m p)) (@GRing.scale R (matrix_lmodType (muln m n) (muln m p)) a (lin_mulmxr A)) (lin_mulmxr B))) *)
rewrite linearP /= !rowE !mul_rV_lin /= vec_mx_delta -linearP mulmxDr.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) (muln m p)) (@mxvec (GRing.Ring.sort R) m p (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) m p) (@mulmx m n p (@delta_mx m n i j) (@GRing.scale R (matrix_lmodType n p) a A)) (@mulmx m n p (@delta_mx m n i j) B))) (@GRing.Linear.apply R (matrix_lmodType m p) (matrix_zmodType (GRing.Ring.zmodType R) (S O) (muln m p)) (@GRing.scale R (matrix_lmodType (S O) (muln m p))) (Phant (forall _ : @GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType R) (S O) (muln m p)))) (mxvec_linear m p) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType m p)))) (@GRing.scale R (matrix_lmodType m p) a (@mulmx m n p (@delta_mx m n i j) A)) (@mulmx m n p (@delta_mx m n i j) B))) *)
congr (mxvec (_ + _)); apply/row_matrixP=> k.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S O) p) (@row (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m p k (@mulmx m n p (@delta_mx m n i j) (@GRing.scale R (matrix_lmodType n p) a A))) (@row (GRing.Zmodule.sort (GRing.Ring.zmodType R)) m p k (@GRing.scale R (matrix_lmodType m p) a (@mulmx m n p (@delta_mx m n i j) A))) *)
rewrite linearZ /= !row_mul rowE mul_delta_mx_cond.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) p) (@mulmx (S O) n p (@GRing.natmul (matrix_zmodType (GRing.Ring.zmodType R) (S O) n) (@delta_mx (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) j) (nat_of_bool (@eq_op (ordinal_eqType m) k i))) (@GRing.scale R (matrix_lmodType n p) a A)) (@GRing.scale R (matrix_lmodType (S O) p) a (@mulmx (S O) n p (@GRing.natmul (matrix_zmodType (GRing.Ring.zmodType R) (S O) n) (@delta_mx (S O) n (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) j) (nat_of_bool (@eq_op (ordinal_eqType m) k i))) A)) *)
by case: (k == i); [rewrite -!rowE linearZ | rewrite !mul0mx raddf0].
Qed.
Canonical lin_mulmxr_additive := Additive lin_mulmxr_is_linear.
Canonical lin_mulmxr_linear := Linear lin_mulmxr_is_linear.
End Mulmxr.
Section Trace.
Variable n : nat.
Definition mxtrace (A : 'M[R]_n) := \sum_i A i i.
Local Notation "'\tr' A" := (mxtrace A) : ring_scope.
Lemma mxtrace_tr A : \tr A^T = \tr A.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (mxtrace (@trmx (GRing.Ring.sort R) n n A)) (mxtrace A) *)
by apply: eq_bigr=> i _; rewrite mxE.
Qed.
Lemma mxtrace_is_scalar : scalar mxtrace.
Proof.
(* Goal: @GRing.Linear.axiom R (matrix_lmodType n n) (GRing.Ring.zmodType R) (@GRing.mul R) mxtrace (GRing.Scale.mul_law R) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Ring.sort R), GRing.Ring.sort R) (@GRing.mul R)) *)
move=> a A B; rewrite mulr_sumr -big_split /=; apply: eq_bigr=> i _.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) n n (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Ring.sort R) n n) (@GRing.Zmodule.Class (matrix (GRing.Ring.sort R) n n) (@Choice.Class (matrix (GRing.Ring.sort R) n n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType R))) n n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType R)) n n)) (matrix_zmodMixin (GRing.Ring.zmodType R) n n))) (@GRing.scale R (matrix_lmodType n n) a A) B) i i) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R a (@fun_of_matrix (GRing.Ring.sort R) n n A i i)) (@fun_of_matrix (GRing.Ring.sort R) n n B i i)) *)
by rewrite !mxE.
Qed.
Lemma mxtraceD A B : \tr (A + B) = \tr A + \tr B. Proof. exact: raddfD. Qed.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (mxtrace (@GRing.add (matrix_zmodType (GRing.Ring.zmodType R) n n) A B)) (@GRing.add (GRing.Ring.zmodType R) (mxtrace A) (mxtrace B)) *)
exact: raddfD.
Qed.
Lemma mxtrace_diag D : \tr (diag_mx D) = \sum_j D 0 j.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (mxtrace (@diag_mx n D)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@fun_of_matrix (GRing.Ring.sort R) (S O) n D (GRing.zero (Zp_zmodType O)) j))) *)
by apply: eq_bigr => j _; rewrite mxE eqxx.
Qed.
Lemma mxtrace_scalar a : \tr a%:M = a *+ n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (mxtrace (scalar_mx n a)) (@GRing.natmul (GRing.Ring.zmodType R) a n) *)
rewrite -diag_const_mx mxtrace_diag.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType R)) true (@fun_of_matrix (GRing.Ring.sort R) (S O) n (@const_mx (GRing.Ring.sort R) (S O) n a) (GRing.zero (Zp_zmodType O)) j))) (@GRing.natmul (GRing.Ring.zmodType R) a n) *)
by rewrite (eq_bigr _ (fun j _ => mxE _ _ 0 j)) sumr_const card_ord.
Qed.
End Trace.
Local Notation "'\tr' A" := (mxtrace A) : ring_scope.
Lemma trace_mx11 (A : 'M_1) : \tr A = A 0 0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@mxtrace (S O) A) (@fun_of_matrix (GRing.Ring.sort R) (S O) (S O) A (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) *)
by rewrite {1}[A]mx11_scalar mxtrace_scalar.
Qed.
Lemma mxtrace_block n1 n2 (Aul : 'M_n1) Aur Adl (Adr : 'M_n2) :
\tr (block_mx Aul Aur Adl Adr) = \tr Aul + \tr Adr.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@mxtrace (addn n1 n2) (@block_mx (GRing.Ring.sort R) n1 n2 n1 n2 Aul Aur Adl Adr)) (@GRing.add (GRing.Ring.zmodType R) (@mxtrace n1 Aul) (@mxtrace n2 Adr)) *)
rewrite /(\tr _) big_split_ord /=.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.add (GRing.Ring.zmodType R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n1) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n1)) (fun i : ordinal n1 => @BigBody (GRing.Ring.sort R) (ordinal n1) i (@GRing.add (GRing.Ring.zmodType R)) true (@fun_of_matrix (GRing.Ring.sort R) (addn n1 n2) (addn n1 n2) (@block_mx (GRing.Ring.sort R) n1 n2 n1 n2 Aul Aur Adl Adr) (@lshift n1 n2 i) (@lshift n1 n2 i)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal n2) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n2)) (fun i : ordinal n2 => @BigBody (GRing.Ring.sort R) (ordinal n2) i (@GRing.add (GRing.Ring.zmodType R)) true (@fun_of_matrix (GRing.Ring.sort R) (addn n1 n2) (addn n1 n2) (@block_mx (GRing.Ring.sort R) n1 n2 n1 n2 Aul Aur Adl Adr) (@rshift n1 n2 i) (@rshift n1 n2 i))))) (@GRing.add (GRing.Ring.zmodType R) (@mxtrace n1 Aul) (@mxtrace n2 Adr)) *)
by congr (_ + _); apply: eq_bigr => i _; rewrite (block_mxEul, block_mxEdr).
Qed.
Section MatrixRing.
Variable n' : nat.
Local Notation n := n'.+1.
Lemma matrix_nonzero1 : 1%:M != 0 :> 'M_n.
Proof.
(* Goal: is_true (negb (@eq_op (matrix_eqType (GRing.Ring.eqType R) (S n') (S n')) (scalar_mx (S n') (GRing.one R) : matrix (GRing.Ring.sort R) (S n') (S n')) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) (S n') (S n')) : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n')))) *)
by apply/eqP=> /matrixP/(_ 0 0)/eqP; rewrite !mxE oner_eq0.
Qed.
Definition matrix_ringMixin :=
RingMixin (@mulmxA n n n n) (@mul1mx n n) (@mulmx1 n n)
(@mulmxDl n n n) (@mulmxDr n n n) matrix_nonzero1.
Canonical matrix_ringType := Eval hnf in RingType 'M[R]_n matrix_ringMixin.
Canonical matrix_lAlgType := Eval hnf in LalgType R 'M[R]_n (@scalemxAl n n n).
Lemma mulmxE : mulmx = *%R. Proof. by []. Qed.
Proof.
(* Goal: @eq (forall (_ : matrix (GRing.Ring.sort R) (S n') (S n')) (_ : matrix (GRing.Ring.sort R) (S n') (S n')), matrix (GRing.Ring.sort R) (S n') (S n')) (@mulmx (S n') (S n') (S n')) (@GRing.mul matrix_ringType) *)
by [].
Qed.
Lemma scalar_mx_is_multiplicative : multiplicative (@scalar_mx n).
Proof.
(* Goal: @GRing.RMorphism.mixin_of R matrix_ringType (scalar_mx (S n')) *)
by split=> //; apply: scalar_mxM.
Qed.
Canonical scalar_mx_rmorphism := AddRMorphism scalar_mx_is_multiplicative.
End MatrixRing.
Section LiftPerm.
Variable n : nat.
Definition lift0_perm s : 'S_n.+1 := lift_perm 0 0 s.
Lemma lift0_perm0 s : lift0_perm s 0 = 0.
Proof.
(* Goal: @eq (Finite.sort (ordinal_finType (S n))) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm s) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n)))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) *)
exact: lift_perm_id.
Qed.
Lemma lift0_perm_lift s k' :
lift0_perm s (lift 0 k') = lift (0 : 'I_n.+1) (s k').
Proof.
(* Goal: @eq (Finite.sort (ordinal_finType (S n))) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm s) (@lift (S n) (GRing.zero (Zp_zmodType n)) k')) (@lift (S n) (GRing.zero (Zp_zmodType n) : ordinal (S n)) (@PermDef.fun_of_perm (ordinal_finType n) s k')) *)
exact: lift_perm_lift.
Qed.
Lemma lift0_permK s : cancel (lift0_perm s) (lift0_perm s^-1).
Proof.
(* Goal: @cancel (Finite.sort (ordinal_finType (S n))) (Finite.sort (ordinal_finType (S n))) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm s)) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm (@invg (perm_of_baseFinGroupType (ordinal_finType n)) s))) *)
by move=> i; rewrite /lift0_perm -lift_permV permK.
Qed.
Lemma lift0_perm_eq0 s i : (lift0_perm s i == 0) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op (Finite.eqType (ordinal_finType (S n))) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm s) i) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n)))) (@eq_op (Finite.eqType (ordinal_finType (S n))) i (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n)))) *)
by rewrite (canF_eq (lift0_permK s)) lift0_perm0.
Qed.
Definition lift0_mx A : 'M_(1 + n) := block_mx 1 0 0 A.
Lemma lift0_mx_perm s : lift0_mx (perm_mx s) = perm_mx (lift0_perm s).
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (addn (S O) n) (addn (S O) n)) (lift0_mx (@perm_mx n s)) (@perm_mx (S n) (lift0_perm s)) *)
apply/matrixP=> /= i j; rewrite !mxE split1 /=; case: unliftP => [i'|] -> /=.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S O) (addn (S O) n) (@row_mx (GRing.Ring.sort R) (S O) (S O) n (GRing.one (matrix_ringType O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) (S O) n))) (GRing.zero (Zp_zmodType O)) j) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S n))) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm s) (GRing.zero (Zp_zmodType n))) j))) *)
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) n (addn (S O) n) (@row_mx (GRing.Ring.sort R) n (S O) n (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n (S O))) (@perm_mx n s)) i' j) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S n))) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm s) (@lift (S n) (GRing.zero (Zp_zmodType n)) i')) j))) *)
rewrite lift0_perm_lift !mxE split1 /=.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S O) (addn (S O) n) (@row_mx (GRing.Ring.sort R) (S O) (S O) n (GRing.one (matrix_ringType O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) (S O) n))) (GRing.zero (Zp_zmodType O)) j) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S n))) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm s) (GRing.zero (Zp_zmodType n))) j))) *)
(* Goal: @eq (GRing.Ring.sort R) match @Option.apply (ordinal n) (sum (ordinal (S O)) (ordinal n)) (@inr (ordinal (S O)) (ordinal n)) (@inl (ordinal (S O)) (ordinal n) (GRing.zero (Zp_zmodType O))) (@unlift (S n) (GRing.zero (Zp_zmodType n)) j) with | inl j1 => @fun_of_matrix (GRing.Ring.sort R) n (S O) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) n (S O))) i' j1 | inr j2 => @fun_of_matrix (GRing.Ring.sort R) n n (@perm_mx n s) i' j2 end (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S n))) (@lift (S n) (GRing.zero (Zp_zmodType n)) (@PermDef.fun_of_perm (ordinal_finType n) s i')) j))) *)
by case: unliftP => [j'|] ->; rewrite ?(inj_eq (lift_inj _)) /= !mxE.
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S O) (addn (S O) n) (@row_mx (GRing.Ring.sort R) (S O) (S O) n (GRing.one (matrix_ringType O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) (S O) n))) (GRing.zero (Zp_zmodType O)) j) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S n))) (@PermDef.fun_of_perm (ordinal_finType (S n)) (lift0_perm s) (GRing.zero (Zp_zmodType n))) j))) *)
rewrite lift0_perm0 !mxE split1 /=.
(* Goal: @eq (GRing.Ring.sort R) match @Option.apply (ordinal n) (sum (ordinal (S O)) (ordinal n)) (@inr (ordinal (S O)) (ordinal n)) (@inl (ordinal (S O)) (ordinal n) (GRing.zero (Zp_zmodType O))) (@unlift (S n) (GRing.zero (Zp_zmodType n)) j) with | inl j1 => @fun_of_matrix (GRing.Ring.sort R) (S O) (S O) (GRing.one (matrix_ringType O)) (GRing.zero (Zp_zmodType O)) j1 | inr j2 => @fun_of_matrix (GRing.Ring.sort R) (S O) n (GRing.zero (matrix_zmodType (GRing.Ring.zmodType R) (S O) n)) (GRing.zero (Zp_zmodType O)) j2 end (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType n))) j))) *)
by case: unliftP => [j'|] ->; rewrite /= mxE.
Qed.
Lemma lift0_mx_is_perm s : is_perm_mx (lift0_mx (perm_mx s)).
Proof.
(* Goal: is_true (@is_perm_mx (addn (S O) n) (lift0_mx (@perm_mx n s))) *)
by rewrite lift0_mx_perm perm_mx_is_perm.
Qed.
End LiftPerm.
Definition determinant n (A : 'M_n) : R :=
\sum_(s : 'S_n) (-1) ^+ s * \prod_i A i (s i).
Definition cofactor n A (i j : 'I_n) : R :=
(-1) ^+ (i + j) * determinant (row' i (col' j A)).
Definition adjugate n (A : 'M_n) := \matrix[adjugate_key]_(i, j) cofactor A j i.
End MatrixAlgebra.
Arguments delta_mx {R m n}.
Arguments scalar_mx {R n}.
Arguments perm_mx {R n}.
Arguments tperm_mx {R n}.
Arguments pid_mx {R m n}.
Arguments copid_mx {R n}.
Arguments lin_mulmxr {R m n p}.
Prenex Implicits diag_mx is_scalar_mx.
Prenex Implicits mulmx mxtrace determinant cofactor adjugate.
Arguments is_scalar_mxP {R n A}.
Arguments mul_delta_mx {R m n p}.
Notation "a %:M" := (scalar_mx a) : ring_scope.
Notation "A *m B" := (mulmx A B) : ring_scope.
Notation mulmxr := (mulmxr_head tt).
Notation "\tr A" := (mxtrace A) : ring_scope.
Notation "'\det' A" := (determinant A) : ring_scope.
Notation "'\adj' A" := (adjugate A) : ring_scope.
Lemma trmx_mul_rev (R : ringType) m n p (A : 'M[R]_(m, n)) (B : 'M[R]_(n, p)) :
(A *m B)^T = (B : 'M[R^c]_(n, p))^T *m (A : 'M[R^c]_(m, n))^T.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) p m) (@trmx (GRing.Ring.sort R) m p (@mulmx R m n p A B)) (@mulmx (GRing.converse_ringType R) p n m (@trmx (GRing.converse (GRing.Ring.sort R)) n p (B : matrix (GRing.converse (GRing.Ring.sort R)) n p)) (@trmx (GRing.converse (GRing.Ring.sort R)) m n (A : matrix (GRing.converse (GRing.Ring.sort R)) m n))) *)
by apply/matrixP=> k i; rewrite !mxE; apply: eq_bigr => j _; rewrite !mxE.
Qed.
Canonical matrix_countZmodType (M : countZmodType) m n :=
[countZmodType of 'M[M]_(m, n)].
Canonical matrix_countRingType (R : countRingType) n :=
[countRingType of 'M[R]_n.+1].
Canonical matrix_finLmodType (R : finRingType) m n :=
[finLmodType R of 'M[R]_(m, n)].
Canonical matrix_finRingType (R : finRingType) n' :=
Eval hnf in [finRingType of 'M[R]_n'.+1].
Canonical matrix_finLalgType (R : finRingType) n' :=
[finLalgType R of 'M[R]_n'.+1].
Section MapRingMatrix.
Variables (aR rR : ringType) (f : {rmorphism aR -> rR}).
Local Notation "A ^f" := (map_mx f A) : ring_scope.
Section FixedSize.
Variables m n p : nat.
Implicit Type A : 'M[aR]_(m, n).
Lemma map_mxZ a A : (a *: A)^f = f a *: A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) m n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m n (@GRing.scale aR (matrix_lmodType aR m n) a A)) (@GRing.scale rR (matrix_lmodType rR m n) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f a) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m n A)) *)
by apply/matrixP=> i j; rewrite !mxE rmorphM.
Qed.
Lemma map_mxM A B : (A *m B)^f = A^f *m B^f :> 'M_(m, p).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) m p) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m p (@mulmx aR m n p A B)) (@mulmx rR m n p (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m n A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n p B)) *)
apply/matrixP=> i k; rewrite !mxE rmorph_sum //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType rR)) (index_enum (ordinal_finType n)) (fun i0 : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (Finite.sort (ordinal_finType n)) i0 (@GRing.add (GRing.Ring.zmodType rR)) true (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@GRing.mul aR (@fun_of_matrix (GRing.Ring.sort aR) m n A i i0) (@fun_of_matrix (GRing.Ring.sort aR) n p B i0 k))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType rR)) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType rR)) true (@GRing.mul rR (@fun_of_matrix (GRing.Ring.sort rR) m n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m n A) i j) (@fun_of_matrix (GRing.Ring.sort rR) n p (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n p B) j k)))) *)
by apply: eq_bigr => j; rewrite !mxE rmorphM.
Qed.
Lemma map_delta_mx i j : (delta_mx i j)^f = delta_mx i j :> 'M_(m, n).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) m n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m n (@delta_mx aR m n i j)) (@delta_mx rR m n i j) *)
by apply/matrixP=> i' j'; rewrite !mxE rmorph_nat.
Qed.
Lemma map_diag_mx d : (diag_mx d)^f = diag_mx d^f :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n (@diag_mx aR n d)) (@diag_mx rR n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (S O) n d)) *)
by apply/matrixP=> i j; rewrite !mxE rmorphMn.
Qed.
Lemma map_scalar_mx a : a%:M^f = (f a)%:M :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n (@scalar_mx aR n a)) (@scalar_mx rR n (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f a)) *)
by apply/matrixP=> i j; rewrite !mxE rmorphMn.
Qed.
Lemma map_mx1 : 1%:M^f = 1%:M :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n (@scalar_mx aR n (GRing.one aR))) (@scalar_mx rR n (GRing.one rR)) *)
by rewrite map_scalar_mx rmorph1.
Qed.
Lemma map_perm_mx (s : 'S_n) : (perm_mx s)^f = perm_mx s.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n (@perm_mx aR n s)) (@perm_mx rR n s) *)
by apply/matrixP=> i j; rewrite !mxE rmorph_nat.
Qed.
Lemma map_tperm_mx (i1 i2 : 'I_n) : (tperm_mx i1 i2)^f = tperm_mx i1 i2.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n (@tperm_mx aR n i1 i2)) (@tperm_mx rR n i1 i2) *)
exact: map_perm_mx.
Qed.
Lemma map_pid_mx r : (pid_mx r)^f = pid_mx r :> 'M_(m, n).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) m n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m n (@pid_mx aR m n r)) (@pid_mx rR m n r) *)
by apply/matrixP=> i j; rewrite !mxE rmorph_nat.
Qed.
Lemma trace_map_mx (A : 'M_n) : \tr A^f = f (\tr A).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@mxtrace rR n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n A)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@mxtrace aR n A)) *)
by rewrite rmorph_sum; apply: eq_bigr => i _; rewrite mxE.
Qed.
Lemma det_map_mx n' (A : 'M_n') : \det A^f = f (\det A).
Lemma cofactor_map_mx (A : 'M_n) i j : cofactor A^f i j = f (cofactor A i j).
Proof.
(* Goal: @eq (GRing.Ring.sort rR) (@cofactor rR n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n A) i j) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@cofactor aR n A i j)) *)
by rewrite rmorphM rmorph_sign -det_map_mx map_row' map_col'.
Qed.
Lemma map_mx_adj (A : 'M_n) : (\adj A)^f = \adj A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n (@adjugate aR n A)) (@adjugate rR n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n A)) *)
by apply/matrixP=> i j; rewrite !mxE cofactor_map_mx.
Qed.
End FixedSize.
Lemma map_copid_mx n r : (copid_mx r)^f = copid_mx r :> 'M_n.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n (@copid_mx aR n r)) (@copid_mx rR n r) *)
by rewrite map_mx_sub map_mx1 map_pid_mx.
Qed.
Lemma map_mx_is_multiplicative n' (n := n'.+1) :
Proof.
(* Goal: @GRing.RMorphism.mixin_of (matrix_ringType aR n') (matrix_ringType rR n') (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n : forall _ : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) n n, matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) n n) *)
by split; [apply: map_mxM | apply: map_mx1].
Qed.
Canonical map_mx_rmorphism n' := AddRMorphism (map_mx_is_multiplicative n').
Lemma map_lin1_mx m n (g : 'rV_m -> 'rV_n) gf :
(forall v, (g v)^f = gf v^f) -> (lin1_mx g)^f = lin1_mx gf.
Proof.
(* Goal: forall _ : forall v : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (S O) m, @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (S O) n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (S O) n (g v)) (gf (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (S O) m v)), @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) m n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m n (@lin1_mx aR m n g)) (@lin1_mx rR m n gf) *)
by move=> def_gf; apply/matrixP=> i j; rewrite !mxE -map_delta_mx -def_gf mxE.
Qed.
Lemma map_lin_mx m1 n1 m2 n2 (g : 'M_(m1, n1) -> 'M_(m2, n2)) gf :
(forall A, (g A)^f = gf A^f) -> (lin_mx g)^f = lin_mx gf.
Proof.
(* Goal: forall _ : forall A : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) m1 n1, @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) m2 n2) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m2 n2 (g A)) (gf (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) m1 n1 A)), @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (muln m1 n1) (muln m2 n2)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (muln m1 n1) (muln m2 n2) (@lin_mx aR m1 n1 m2 n2 g)) (@lin_mx rR m1 n1 m2 n2 gf) *)
move=> def_gf; apply: map_lin1_mx => A /=.
(* Goal: @eq (matrix (GRing.Ring.sort rR) (S O) (muln m2 n2)) (@map_mx (GRing.Ring.sort aR) (GRing.Ring.sort rR) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (S O) (muln m2 n2) (@mxvec (GRing.Ring.sort aR) m2 n2 (g (@vec_mx (GRing.Ring.sort aR) m1 n1 A)))) (@mxvec (GRing.Ring.sort rR) m2 n2 (gf (@vec_mx (GRing.Ring.sort rR) m1 n1 (@map_mx (GRing.Ring.sort aR) (GRing.Ring.sort rR) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (S O) (muln m1 n1) A)))) *)
by rewrite map_mxvec def_gf map_vec_mx.
Qed.
End MapRingMatrix.
Section ComMatrix.
Variable R : comRingType.
Section AssocLeft.
Variables m n p : nat.
Implicit Type A : 'M[R]_(m, n).
Implicit Type B : 'M[R]_(n, p).
Lemma trmx_mul A B : (A *m B)^T = B^T *m A^T.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) p m) (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) m p (@mulmx (GRing.ComRing.ringType R) m n p A B)) (@mulmx (GRing.ComRing.ringType R) p n m (@trmx (GRing.ComRing.sort R) n p B) (@trmx (GRing.ComRing.sort R) m n A)) *)
rewrite trmx_mul_rev; apply/matrixP=> k i; rewrite !mxE.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.converse_ringType (GRing.ComRing.ringType R)))) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType (GRing.converse_ringType (GRing.ComRing.ringType R)))) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.converse_ringType (GRing.ComRing.ringType R)))) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType (GRing.converse_ringType (GRing.ComRing.ringType R)))) true (@GRing.mul (GRing.converse_ringType (GRing.ComRing.ringType R)) (@fun_of_matrix (GRing.Ring.sort (GRing.converse_ringType (GRing.ComRing.ringType R))) p n (@trmx (GRing.converse (GRing.Ring.sort (GRing.ComRing.ringType R))) n p B) k j) (@fun_of_matrix (GRing.Ring.sort (GRing.converse_ringType (GRing.ComRing.ringType R))) n m (@trmx (GRing.converse (GRing.Ring.sort (GRing.ComRing.ringType R))) m n A) j i)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) p n (@trmx (GRing.ComRing.sort R) n p B) k j) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n m (@trmx (GRing.ComRing.sort R) m n A) j i)))) *)
by apply: eq_bigr => j _; rewrite mulrC.
Qed.
Lemma scalemxAr a A B : a *: (A *m B) = A *m (a *: B).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) m p)) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) m p)) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) m p))))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) m p) a (@mulmx (GRing.ComRing.ringType R) m n p A B)) (@mulmx (GRing.ComRing.ringType R) m n p A (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) n p) a B)) *)
by apply: trmx_inj; rewrite trmx_mul !linearZ /= trmx_mul scalemxAl.
Qed.
Lemma mulmx_is_scalable A : scalable (@mulmx _ m n p A).
Proof.
(* Goal: @GRing.Linear.mixin_of (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) n p) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) m p)) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) m p)) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) m p)))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) m p)) (@mulmx (GRing.ComRing.ringType R) m n p A) *)
by move=> a B; rewrite scalemxAr.
Qed.
Canonical mulmx_linear A := AddLinear (mulmx_is_scalable A).
Definition lin_mulmx A : 'M[R]_(n * p, m * p) := lin_mx (mulmx A).
Lemma lin_mulmx_is_linear : linear lin_mulmx.
Proof.
(* Goal: @GRing.Linear.axiom (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) m n) (matrix_zmodType (GRing.ComRing.zmodType R) (muln n p) (muln m p)) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p))) lin_mulmx (@GRing.Scale.scale_law (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p))) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.ComRing.ringType R)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p)))))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (muln n p) (muln m p)))) *)
move=> a A B; apply/row_matrixP=> i; rewrite linearP /= !rowE !mul_rV_lin /=.
(* Goal: @eq (matrix (GRing.ComRing.sort R) (S O) (muln m p)) (@mxvec (GRing.ComRing.sort R) m p (@mulmx (GRing.ComRing.ringType R) m n p (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) m n) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) m n) (@Choice.Class (matrix (GRing.ComRing.sort R) m n) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) m n) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) m n)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) m n))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) m n) a A) B) (@vec_mx (GRing.ComRing.sort R) n p (@delta_mx (GRing.ComRing.ringType R) (S O) (muln n p) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (muln m p)) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (muln m p)) a (@mxvec (GRing.ComRing.sort R) m p (@mulmx (GRing.ComRing.ringType R) m n p A (@vec_mx (GRing.ComRing.sort R) n p (@delta_mx (GRing.ComRing.ringType R) (S O) (muln n p) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i))))) (@mxvec (GRing.ComRing.sort R) m p (@mulmx (GRing.ComRing.ringType R) m n p B (@vec_mx (GRing.ComRing.sort R) n p (@delta_mx (GRing.ComRing.ringType R) (S O) (muln n p) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i))))) *)
by rewrite [_ *m _](linearP (mulmxr_linear _ _)) linearP.
Qed.
Canonical lin_mulmx_additive := Additive lin_mulmx_is_linear.
Canonical lin_mulmx_linear := Linear lin_mulmx_is_linear.
End AssocLeft.
Section LinMulRow.
Variables m n : nat.
Definition lin_mul_row u : 'M[R]_(m * n, n) := lin1_mx (mulmx u \o vec_mx).
Lemma lin_mul_row_is_linear : linear lin_mul_row.
Proof.
(* Goal: @GRing.Linear.axiom (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) m) (matrix_zmodType (GRing.ComRing.zmodType R) (muln m n) n) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n)) lin_mul_row (@GRing.Scale.scale_law (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n)) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.ComRing.ringType R)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n)) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n)) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n)) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n)) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n))))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (muln m n) n))) *)
move=> a u v; apply/row_matrixP=> i; rewrite linearP /= !rowE !mul_rV_lin1 /=.
(* Goal: @eq (matrix (GRing.ComRing.sort R) (S O) n) (@mulmx (GRing.ComRing.ringType R) (S O) m n (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (S O) m) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (S O) m) (@Choice.Class (matrix (GRing.ComRing.sort R) (S O) m) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (S O) m) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (S O) m)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) m))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) m) a u) v) (@vec_mx (GRing.ComRing.sort R) m n (@delta_mx (GRing.ComRing.ringType R) (S O) (muln m n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i))) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) n) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) n) a (@mulmx (GRing.ComRing.ringType R) (S O) m n u (@vec_mx (GRing.ComRing.sort R) m n (@delta_mx (GRing.ComRing.ringType R) (S O) (muln m n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))) (@mulmx (GRing.ComRing.ringType R) (S O) m n v (@vec_mx (GRing.ComRing.sort R) m n (@delta_mx (GRing.ComRing.ringType R) (S O) (muln m n) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))) *)
by rewrite [_ *m _](linearP (mulmxr_linear _ _)).
Qed.
Canonical lin_mul_row_additive := Additive lin_mul_row_is_linear.
Canonical lin_mul_row_linear := Linear lin_mul_row_is_linear.
Lemma mul_vec_lin_row A u : mxvec A *m lin_mul_row u = u *m A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n) (@mulmx (GRing.ComRing.ringType R) (S O) (muln m n) n (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) m n A) (lin_mul_row u)) (@mulmx (GRing.ComRing.ringType R) (S O) m n u A) *)
by rewrite mul_rV_lin1 /= mxvecK.
Qed.
End LinMulRow.
Lemma mxvec_dotmul m n (A : 'M[R]_(m, n)) u v :
mxvec (u^T *m v) *m (mxvec A)^T = u *m A *m v^T.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (S O)) (@mulmx (GRing.ComRing.ringType R) (S O) (muln m n) (S O) (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) m n (@mulmx (GRing.ComRing.ringType R) m (S O) n (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u) v)) (@trmx (GRing.ComRing.sort R) (S O) (muln m n) (@mxvec (GRing.ComRing.sort R) m n A))) (@mulmx (GRing.ComRing.ringType R) (S O) n (S O) (@mulmx (GRing.ComRing.ringType R) (S O) m n u A) (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v)) *)
transitivity (\sum_i \sum_j (u 0 i * A i j *: row j v^T)).
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (S O)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) j (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j)) (@row (GRing.Ring.sort (GRing.ComRing.ringType R)) n (S O) j (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v))))))) (@mulmx (GRing.ComRing.ringType R) (S O) n (S O) (@mulmx (GRing.ComRing.ringType R) (S O) m n u A) (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v)) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (S O)) (@mulmx (GRing.ComRing.ringType R) (S O) (muln m n) (S O) (@mxvec (GRing.Ring.sort (GRing.ComRing.ringType R)) m n (@mulmx (GRing.ComRing.ringType R) m (S O) n (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u) v)) (@trmx (GRing.ComRing.sort R) (S O) (muln m n) (@mxvec (GRing.ComRing.sort R) m n A))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) j (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j)) (@row (GRing.Ring.sort (GRing.ComRing.ringType R)) n (S O) j (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v))))))) *)
apply/rowP=> i; rewrite {i}ord1 mxE (reindex _ (curry_mxvec_bij _ _)) /=.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (S O)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) j (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j)) (@row (GRing.Ring.sort (GRing.ComRing.ringType R)) n (S O) j (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v))))))) (@mulmx (GRing.ComRing.ringType R) (S O) n (S O) (@mulmx (GRing.ComRing.ringType R) (S O) m n u A) (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v)) *)
(* Goal: @eq (GRing.ComRing.sort R) (@BigOp.bigop (GRing.ComRing.sort R) (prod (ordinal m) (ordinal n)) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (prod_finType (ordinal_finType m) (ordinal_finType n))) (fun j : prod (ordinal m) (ordinal n) => @BigBody (GRing.ComRing.sort R) (prod (ordinal m) (ordinal n)) j (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) (S O) (muln m n) (@mxvec (GRing.ComRing.sort R) m n (@mulmx (GRing.ComRing.ringType R) m (S O) n (@trmx (GRing.ComRing.sort R) (S O) m u) v)) (GRing.zero (Zp_zmodType O)) (@prod_curry (ordinal m) (ordinal n) (ordinal (muln m n)) (@mxvec_index m n) j)) (@fun_of_matrix (GRing.ComRing.sort R) (muln m n) (S O) (@trmx (GRing.ComRing.sort R) (S O) (muln m n) (@mxvec (GRing.ComRing.sort R) m n A)) (@prod_curry (ordinal m) (ordinal n) (ordinal (muln m n)) (@mxvec_index m n) j) (GRing.zero (Zp_zmodType O)))))) (@fun_of_matrix (GRing.ComRing.sort R) (S O) (S O) (@BigOp.bigop (matrix (GRing.ComRing.sort R) (S O) (S O)) (ordinal m) (GRing.zero (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (S O) (S O)) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (@Choice.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (S O) (S O)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (S O) (S O))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (S O))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (matrix (GRing.ComRing.sort R) (S O) (S O)) (ordinal m) i (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (S O) (S O)) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (@Choice.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (S O) (S O)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (S O) (S O))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (S O))))) true (@BigOp.bigop (matrix (GRing.ComRing.sort R) (S O) (S O)) (ordinal n) (GRing.zero (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (S O) (S O)) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (@Choice.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (S O) (S O)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (S O) (S O))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (S O))))) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (matrix (GRing.ComRing.sort R) (S O) (S O)) (ordinal n) j (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (S O) (S O)) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (@Choice.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (S O) (S O)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (S O) (S O))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (S O))))) true (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j)) (@row (GRing.ComRing.sort R) n (S O) j (@trmx (GRing.ComRing.sort R) (S O) n v))))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) *)
rewrite pair_bigA summxE; apply: eq_bigr => [[i j]] /= _.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (S O)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) j (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j)) (@row (GRing.Ring.sort (GRing.ComRing.ringType R)) n (S O) j (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v))))))) (@mulmx (GRing.ComRing.ringType R) (S O) n (S O) (@mulmx (GRing.ComRing.ringType R) (S O) m n u A) (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v)) *)
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) (S O) (muln m n) (@mxvec (GRing.ComRing.sort R) m n (@mulmx (GRing.ComRing.ringType R) m (S O) n (@trmx (GRing.ComRing.sort R) (S O) m u) v)) (GRing.zero (Zp_zmodType O)) (@mxvec_index m n i j)) (@fun_of_matrix (GRing.ComRing.sort R) (muln m n) (S O) (@trmx (GRing.ComRing.sort R) (S O) (muln m n) (@mxvec (GRing.ComRing.sort R) m n A)) (@mxvec_index m n i j) (GRing.zero (Zp_zmodType O)))) (@fun_of_matrix (GRing.ComRing.sort R) (S O) (S O) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j)) (@row (GRing.ComRing.sort R) n (S O) j (@trmx (GRing.ComRing.sort R) (S O) n v))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) *)
by rewrite !mxE !mxvecE mxE big_ord1 mxE mulrAC.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) (S O)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType m)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) (Finite.sort (ordinal_finType n)) j (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)))))) true (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j)) (@row (GRing.Ring.sort (GRing.ComRing.ringType R)) n (S O) j (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v))))))) (@mulmx (GRing.ComRing.ringType R) (S O) n (S O) (@mulmx (GRing.ComRing.ringType R) (S O) m n u A) (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) n v)) *)
rewrite mulmx_sum_row exchange_big; apply: eq_bigr => j _ /=.
(* Goal: @eq (matrix (GRing.ComRing.sort R) (S O) (S O)) (@BigOp.bigop (matrix (GRing.ComRing.sort R) (S O) (S O)) (ordinal m) (GRing.zero (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (S O) (S O)) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (@Choice.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (S O) (S O)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (S O) (S O))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (S O))))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (matrix (GRing.ComRing.sort R) (S O) (S O)) (ordinal m) i (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.ComRing.sort R) (S O) (S O)) (@GRing.Zmodule.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (@Choice.Class (matrix (GRing.ComRing.sort R) (S O) (S O)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R)))) (S O) (S O)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (S O) (S O))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S O) (S O))))) true (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j)) (@row (GRing.ComRing.sort R) n (S O) j (@trmx (GRing.ComRing.sort R) (S O) n v))))) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (S O)) (@fun_of_matrix (GRing.ComRing.sort R) (S O) n (@mulmx (GRing.ComRing.ringType R) (S O) m n u A) (GRing.zero (Zp_zmodType O)) j) (@row (GRing.ComRing.sort R) n (S O) j (@trmx (GRing.ComRing.sort R) (S O) n v))) *)
by rewrite mxE -scaler_suml.
Qed.
Section MatrixAlgType.
Variable n' : nat.
Local Notation n := n'.+1.
Canonical matrix_algType :=
Eval hnf in AlgType R 'M[R]_n (fun k => scalemxAr k).
End MatrixAlgType.
Lemma diag_mxC n (d e : 'rV[R]_n) :
diag_mx d *m diag_mx e = diag_mx e *m diag_mx d.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n n) (@mulmx (GRing.ComRing.ringType R) n n n (@diag_mx (GRing.ComRing.ringType R) n d) (@diag_mx (GRing.ComRing.ringType R) n e)) (@mulmx (GRing.ComRing.ringType R) n n n (@diag_mx (GRing.ComRing.ringType R) n e) (@diag_mx (GRing.ComRing.ringType R) n d)) *)
by rewrite !mulmx_diag; congr (diag_mx _); apply/rowP=> i; rewrite !mxE mulrC.
Qed.
Lemma diag_mx_comm n' (d e : 'rV[R]_n'.+1) : GRing.comm (diag_mx d) (diag_mx e).
Proof.
(* Goal: @GRing.comm (matrix_ringType (GRing.ComRing.ringType R) n') (@diag_mx (GRing.ComRing.ringType R) (S n') d) (@diag_mx (GRing.ComRing.ringType R) (S n') e) *)
exact: diag_mxC.
Qed.
Lemma scalar_mxC m n a (A : 'M[R]_(m, n)) : A *m a%:M = a%:M *m A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) m n) (@mulmx (GRing.ComRing.ringType R) m n n A (@scalar_mx (GRing.ComRing.ringType R) n a)) (@mulmx (GRing.ComRing.ringType R) m m n (@scalar_mx (GRing.ComRing.ringType R) m a) A) *)
by apply: trmx_inj; rewrite trmx_mul tr_scalar_mx !mul_scalar_mx linearZ.
Qed.
Lemma scalar_mx_comm n' a (A : 'M[R]_n'.+1) : GRing.comm A a%:M.
Proof.
(* Goal: @GRing.comm (matrix_ringType (GRing.ComRing.ringType R) n') A (@scalar_mx (GRing.ComRing.ringType R) (S n') a) *)
exact: scalar_mxC.
Qed.
Lemma mul_mx_scalar m n a (A : 'M[R]_(m, n)) : A *m a%:M = a *: A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) m n) (@mulmx (GRing.ComRing.ringType R) m n n A (@scalar_mx (GRing.ComRing.ringType R) n a)) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) m n) a A) *)
by rewrite scalar_mxC mul_scalar_mx.
Qed.
Lemma mxtrace_mulC m n (A : 'M[R]_(m, n)) B :
\tr (A *m B) = \tr (B *m A).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@mxtrace (GRing.ComRing.ringType R) m (@mulmx (GRing.ComRing.ringType R) m n m A B)) (@mxtrace (GRing.ComRing.ringType R) n (@mulmx (GRing.ComRing.ringType R) n m n B A)) *)
have expand_trM C D: \tr (C *m D) = \sum_i \sum_j C i j * D j i.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@mxtrace (GRing.ComRing.ringType R) m (@mulmx (GRing.ComRing.ringType R) m n m A B)) (@mxtrace (GRing.ComRing.ringType R) n (@mulmx (GRing.ComRing.ringType R) n m n B A)) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType _t_)) (@mxtrace _t_ _n_ (@mulmx _t_ _n_ _n1_ _n_ C D)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType _t_)) (Finite.sort (ordinal_finType _n_)) (GRing.zero (GRing.Ring.zmodType _t_)) (index_enum (ordinal_finType _n_)) (fun i : Finite.sort (ordinal_finType _n_) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType _t_)) (Finite.sort (ordinal_finType _n_)) i (@GRing.add (GRing.Ring.zmodType _t_)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType _t_)) (Finite.sort (ordinal_finType _n1_)) (GRing.zero (GRing.Ring.zmodType _t_)) (index_enum (ordinal_finType _n1_)) (fun j : Finite.sort (ordinal_finType _n1_) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType _t_)) (Finite.sort (ordinal_finType _n1_)) j (@GRing.add (GRing.Ring.zmodType _t_)) true (@GRing.mul _t_ (@fun_of_matrix (GRing.Ring.sort _t_) _n_ _n1_ C i j) (@fun_of_matrix (GRing.Ring.sort _t_) _n1_ _n_ D j i)))))) *)
by apply: eq_bigr => i _; rewrite mxE.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@mxtrace (GRing.ComRing.ringType R) m (@mulmx (GRing.ComRing.ringType R) m n m A B)) (@mxtrace (GRing.ComRing.ringType R) n (@mulmx (GRing.ComRing.ringType R) n m n B A)) *)
rewrite !{}expand_trM exchange_big /=.
(* Goal: @eq (GRing.ComRing.sort R) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) j (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@BigOp.bigop (GRing.ComRing.sort R) (ordinal m) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (GRing.ComRing.sort R) (ordinal m) i (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) m n A i j) (@fun_of_matrix (GRing.ComRing.sort R) n m B j i)))))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@BigOp.bigop (GRing.ComRing.sort R) (ordinal m) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType m)) (fun j : ordinal m => @BigBody (GRing.ComRing.sort R) (ordinal m) j (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) n m B i j) (@fun_of_matrix (GRing.ComRing.sort R) m n A j i)))))) *)
by do 2!apply: eq_bigr => ? _; apply: mulrC.
Qed.
Lemma determinant_multilinear n (A B C : 'M[R]_n) i0 b c :
row i0 A = b *: row i0 B + c *: row i0 C ->
row' i0 B = row' i0 A ->
row' i0 C = row' i0 A ->
\det A = b * \det B + c * \det C.
Lemma determinant_alternate n (A : 'M[R]_n) i1 i2 :
i1 != i2 -> A i1 =1 A i2 -> \det A = 0.
Lemma det_tr n (A : 'M[R]_n) : \det A^T = \det A.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) n (@trmx (GRing.ComRing.sort R) n n A)) (@determinant (GRing.ComRing.ringType R) n A) *)
rewrite [\det A^T](reindex_inj invg_inj) /=.
(* Goal: @eq (GRing.ComRing.sort R) (@BigOp.bigop (GRing.ComRing.sort R) (perm_type (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (FinGroup.arg_finType (perm_baseFinGroupType (ordinal_finType n)))) (fun j : perm_type (ordinal_finType n) => @BigBody (GRing.ComRing.sort R) (perm_type (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) (@invg (perm_baseFinGroupType (ordinal_finType n)) j)))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@trmx (GRing.ComRing.sort R) n n A) i (@PermDef.fun_of_perm (ordinal_finType n) (@invg (perm_baseFinGroupType (ordinal_finType n)) j) i))))))) (@determinant (GRing.ComRing.ringType R) n A) *)
apply: eq_bigr => s _ /=; rewrite !odd_permV (reindex_perm s) /=.
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) s))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) j (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@trmx (GRing.ComRing.sort R) n n A) (@PermDef.fun_of_perm (ordinal_finType n) s j) (@PermDef.fun_of_perm (ordinal_finType n) (@invg (perm_baseFinGroupType (ordinal_finType n)) s) (@PermDef.fun_of_perm (ordinal_finType n) s j)))))) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) s))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n A i (@PermDef.fun_of_perm (ordinal_finType n) s i))))) *)
by congr (_ * _); apply: eq_bigr => i _; rewrite mxE permK.
Qed.
Lemma det_perm n (s : 'S_n) : \det (perm_mx s) = (-1) ^+ s :> R.
Proof.
(* Goal: @eq (GRing.ComRing.sort R) (@determinant (GRing.ComRing.ringType R) n (@perm_mx (GRing.ComRing.ringType R) n s)) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) s))) *)
rewrite [\det _](bigD1 s) //= big1 => [|i _]; last by rewrite /= !mxE eqxx.
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) s))) (GRing.one (GRing.ComRing.ringType R))) (@BigOp.bigop (GRing.ComRing.sort R) (@perm_of (ordinal_finType n) (Phant (ordinal n))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (perm_for_finType (ordinal_finType n))) (fun i : @perm_of (ordinal_finType n) (Phant (ordinal n)) => @BigBody (GRing.ComRing.sort R) (@perm_of (ordinal_finType n) (Phant (ordinal n))) i (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (negb (@eq_op (Finite.eqType (perm_for_finType (ordinal_finType n))) i s)) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) i))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i0 (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@perm_mx (GRing.ComRing.ringType R) n s) i0 (@PermDef.fun_of_perm (ordinal_finType n) i i0)))))))) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) s))) *)
rewrite mulr1 big1 ?addr0 => //= t Dst.
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) t))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@perm_mx (GRing.ComRing.ringType R) n s) i (@PermDef.fun_of_perm (ordinal_finType n) t i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
case: (pickP (fun i => s i != t i)) => [i ist | Est].
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) t))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@perm_mx (GRing.ComRing.ringType R) n s) i (@PermDef.fun_of_perm (ordinal_finType n) t i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) t))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@perm_mx (GRing.ComRing.ringType R) n s) i (@PermDef.fun_of_perm (ordinal_finType n) t i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
by rewrite (bigD1 i) // mulrCA /= !mxE (negbTE ist) mul0r.
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) t))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@perm_mx (GRing.ComRing.ringType R) n s) i (@PermDef.fun_of_perm (ordinal_finType n) t i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
by case/eqP: Dst; apply/permP => i; move/eqP: (Est i).
Qed.
Lemma det1 n : \det (1%:M : 'M[R]_n) = 1.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) n (@scalar_mx (GRing.ComRing.ringType R) n (GRing.one (GRing.ComRing.ringType R)) : matrix (GRing.ComRing.sort R) n n)) (GRing.one (GRing.ComRing.ringType R)) *)
by rewrite -perm_mx1 det_perm odd_perm1.
Qed.
Lemma det_mx00 (A : 'M[R]_0) : \det A = 1.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) O A) (GRing.one (GRing.ComRing.ringType R)) *)
by rewrite flatmx0 -(flatmx0 1%:M) det1.
Qed.
Lemma detZ n a (A : 'M[R]_n) : \det (a *: A) = a ^+ n * \det A.
Lemma det0 n' : \det (0 : 'M[R]_n'.+1) = 0.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) (S n') (GRing.zero (matrix_zmodType (GRing.ComRing.zmodType R) (S n') (S n')) : matrix (GRing.ComRing.sort R) (S n') (S n'))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
by rewrite -(scale0r 0) detZ exprS !mul0r.
Qed.
Lemma det_scalar n a : \det (a%:M : 'M[R]_n) = a ^+ n.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) n (@scalar_mx (GRing.ComRing.ringType R) n a : matrix (GRing.ComRing.sort R) n n)) (@GRing.exp (GRing.ComRing.ringType R) a n) *)
by rewrite -{1}(mulr1 a) -scale_scalar_mx detZ det1 mulr1.
Qed.
Lemma det_scalar1 a : \det (a%:M : 'M[R]_1) = a.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) (S O) (@scalar_mx (GRing.ComRing.ringType R) (S O) a : matrix (GRing.ComRing.sort R) (S O) (S O))) a *)
exact: det_scalar.
Qed.
Lemma det_mulmx n (A B : 'M[R]_n) : \det (A *m B) = \det A * \det B.
Lemma detM n' (A B : 'M[R]_n'.+1) : \det (A * B) = \det A * \det B.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) (S n') (@GRing.mul (matrix_ringType (GRing.ComRing.ringType R) n') A B)) (@GRing.mul (GRing.ComRing.ringType R) (@determinant (GRing.ComRing.ringType R) (S n') A) (@determinant (GRing.ComRing.ringType R) (S n') B)) *)
exact: det_mulmx.
Qed.
Lemma det_diag n (d : 'rV[R]_n) : \det (diag_mx d) = \prod_i d 0 i.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) n (@diag_mx (GRing.ComRing.ringType R) n d)) (@BigOp.bigop (GRing.Ring.sort (GRing.ComRing.ringType R)) (Finite.sort (ordinal_finType n)) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Ring.sort (GRing.ComRing.ringType R)) (Finite.sort (ordinal_finType n)) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) i))) *)
rewrite /(\det _) (bigD1 1%g) //= addrC big1 => [|p p1].
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) p))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@diag_mx (GRing.ComRing.ringType R) n d) i (@PermDef.fun_of_perm (ordinal_finType n) p i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) (oneg (perm_of_baseFinGroupType (ordinal_finType n)))))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@diag_mx (GRing.ComRing.ringType R) n d) i (@PermDef.fun_of_perm (ordinal_finType n) (oneg (perm_of_baseFinGroupType (ordinal_finType n))) i)))))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) (S O) n d (GRing.zero (Zp_zmodType O)) i))) *)
by rewrite add0r odd_perm1 mul1r; apply: eq_bigr => i; rewrite perm1 mxE eqxx.
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) p))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@diag_mx (GRing.ComRing.ringType R) n d) i (@PermDef.fun_of_perm (ordinal_finType n) p i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
have{p1}: ~~ perm_on set0 p.
(* Goal: forall _ : is_true (negb (@perm_on (ordinal_finType n) (@set0 (ordinal_finType n)) p)), @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) p))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@diag_mx (GRing.ComRing.ringType R) n d) i (@PermDef.fun_of_perm (ordinal_finType n) p i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
(* Goal: is_true (negb (@perm_on (ordinal_finType n) (@set0 (ordinal_finType n)) p)) *)
apply: contra p1; move/subsetP=> p1; apply/eqP; apply/permP=> i.
(* Goal: forall _ : is_true (negb (@perm_on (ordinal_finType n) (@set0 (ordinal_finType n)) p)), @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) p))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@diag_mx (GRing.ComRing.ringType R) n d) i (@PermDef.fun_of_perm (ordinal_finType n) p i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
(* Goal: @eq (Finite.sort (ordinal_finType n)) (@PermDef.fun_of_perm (ordinal_finType n) p i) (@PermDef.fun_of_perm (ordinal_finType n) (oneg (perm_of_baseFinGroupType (ordinal_finType n))) i) *)
by rewrite perm1; apply/eqP; apply/idPn; move/p1; rewrite inE.
(* Goal: forall _ : is_true (negb (@perm_on (ordinal_finType n) (@set0 (ordinal_finType n)) p)), @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) p))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@diag_mx (GRing.ComRing.ringType R) n d) i (@PermDef.fun_of_perm (ordinal_finType n) p i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
case/subsetPn=> i; rewrite !inE eq_sym; move/negbTE=> p_i _.
(* Goal: @eq (GRing.ComRing.sort R) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (GRing.one (GRing.ComRing.ringType R))) (nat_of_bool (@odd_perm (ordinal_finType n) p))) (@BigOp.bigop (GRing.ComRing.sort R) (ordinal n) (GRing.one (GRing.ComRing.ringType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.ComRing.sort R) (ordinal n) i (@GRing.mul (GRing.ComRing.ringType R)) true (@fun_of_matrix (GRing.ComRing.sort R) n n (@diag_mx (GRing.ComRing.ringType R) n d) i (@PermDef.fun_of_perm (ordinal_finType n) p i))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) *)
by rewrite (bigD1 i) //= mulrCA mxE p_i mul0r.
Qed.
Lemma expand_cofactor n (A : 'M[R]_n) i j :
cofactor A i j =
\sum_(s : 'S_n | s i == j) (-1) ^+ s * \prod_(k | i != k) A k (s k).
Lemma expand_det_row n (A : 'M[R]_n) i0 :
\det A = \sum_j A i0 j * cofactor A i0 j.
Lemma cofactor_tr n (A : 'M[R]_n) i j : cofactor A^T i j = cofactor A j i.
Lemma cofactorZ n a (A : 'M[R]_n) i j :
cofactor (a *: A) i j = a ^+ n.-1 * cofactor A i j.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@cofactor (GRing.ComRing.ringType R) n (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) n n) a A) i j) (@GRing.mul (GRing.ComRing.ringType R) (@GRing.exp (GRing.ComRing.ringType R) a (Nat.pred n)) (@cofactor (GRing.ComRing.ringType R) n A i j)) *)
by rewrite {1}/cofactor !linearZ detZ mulrCA mulrA.
Qed.
Lemma expand_det_col n (A : 'M[R]_n) j0 :
\det A = \sum_i (A i j0 * cofactor A i j0).
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) n A) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType n)) i (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) n n A i j0) (@cofactor (GRing.ComRing.ringType R) n A i j0)))) *)
rewrite -det_tr (expand_det_row _ j0).
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType n)) (fun j : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType n)) j (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) n n (@trmx (GRing.ComRing.sort R) n n A) j0 j) (@cofactor (GRing.ComRing.ringType R) n (@trmx (GRing.ComRing.sort R) n n A) j0 j)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType n)) i (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@fun_of_matrix (GRing.ComRing.sort R) n n A i j0) (@cofactor (GRing.ComRing.ringType R) n A i j0)))) *)
by apply: eq_bigr => i _; rewrite cofactor_tr mxE.
Qed.
Lemma trmx_adj n (A : 'M[R]_n) : (\adj A)^T = \adj A^T.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n n) (@trmx (GRing.Ring.sort (GRing.ComRing.ringType R)) n n (@adjugate (GRing.ComRing.ringType R) n A)) (@adjugate (GRing.ComRing.ringType R) n (@trmx (GRing.ComRing.sort R) n n A)) *)
by apply/matrixP=> i j; rewrite !mxE cofactor_tr.
Qed.
Lemma adjZ n a (A : 'M[R]_n) : \adj (a *: A) = a^+n.-1 *: \adj A.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n n) (@adjugate (GRing.ComRing.ringType R) n (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) n n) a A)) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) n n) (@GRing.exp (GRing.ComRing.ringType R) a (Nat.pred n)) (@adjugate (GRing.ComRing.ringType R) n A)) *)
by apply/matrixP=> i j; rewrite !mxE cofactorZ.
Qed.
Lemma mul_mx_adj n (A : 'M[R]_n) : A *m \adj A = (\det A)%:M.
Lemma mul_adj_mx n (A : 'M[R]_n) : \adj A *m A = (\det A)%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n n) (@mulmx (GRing.ComRing.ringType R) n n n (@adjugate (GRing.ComRing.ringType R) n A) A) (@scalar_mx (GRing.ComRing.ringType R) n (@determinant (GRing.ComRing.ringType R) n A)) *)
by apply: trmx_inj; rewrite trmx_mul trmx_adj mul_mx_adj det_tr tr_scalar_mx.
Qed.
Lemma adj1 n : \adj (1%:M) = 1%:M :> 'M[R]_n.
Proof.
(* Goal: @eq (matrix (GRing.ComRing.sort R) n n) (@adjugate (GRing.ComRing.ringType R) n (@scalar_mx (GRing.ComRing.ringType R) n (GRing.one (GRing.ComRing.ringType R)))) (@scalar_mx (GRing.ComRing.ringType R) n (GRing.one (GRing.ComRing.ringType R))) *)
by rewrite -{2}(det1 n) -mul_adj_mx mulmx1.
Qed.
Lemma mulmx1C n (A B : 'M[R]_n) : A *m B = 1%:M -> B *m A = 1%:M.
Proof.
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n n) (@mulmx (GRing.ComRing.ringType R) n n n A B) (@scalar_mx (GRing.ComRing.ringType R) n (GRing.one (GRing.ComRing.ringType R))), @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n n) (@mulmx (GRing.ComRing.ringType R) n n n B A) (@scalar_mx (GRing.ComRing.ringType R) n (GRing.one (GRing.ComRing.ringType R))) *)
move=> AB1; pose A' := \det B *: \adj A.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n n) (@mulmx (GRing.ComRing.ringType R) n n n B A) (@scalar_mx (GRing.ComRing.ringType R) n (GRing.one (GRing.ComRing.ringType R))) *)
suffices kA: A' *m A = 1%:M by rewrite -[B]mul1mx -kA -(mulmxA A') AB1 mulmx1.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) n n) (@mulmx (GRing.ComRing.ringType R) n n n A' A) (@scalar_mx (GRing.ComRing.ringType R) n (GRing.one (GRing.ComRing.ringType R))) *)
by rewrite -scalemxAl mul_adj_mx scale_scalar_mx mulrC -det_mulmx AB1 det1.
Qed.
Lemma mulmx1_min m n (A : 'M[R]_(m, n)) B : A *m B = 1%:M -> m <= n.
Proof.
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) m m) (@mulmx (GRing.ComRing.ringType R) m n m A B) (@scalar_mx (GRing.ComRing.ringType R) m (GRing.one (GRing.ComRing.ringType R))), is_true (leq m n) *)
move=> AB1; rewrite leqNgt; apply/negP=> /subnKC; rewrite addSnnS.
(* Goal: forall _ : @eq nat (addn n (S (subn m (S n)))) m, False *)
move: (_ - _)%N => m' def_m; move: AB1; rewrite -{m}def_m in A B *.
rewrite -(vsubmxK A) -(hsubmxK B) mul_col_row scalar_mx_block.
case/eq_block_mx=> /mulmx1C BlAu1 AuBr0 _ => /eqP/idPn[].
by rewrite -[_ B]mul1mx -BlAu1 -mulmxA AuBr0 !mulmx0 eq_sym oner_neq0.
Qed.
Qed.
Lemma det_ublock n1 n2 Aul (Aur : 'M[R]_(n1, n2)) Adr :
\det (block_mx Aul Aur 0 Adr) = \det Aul * \det Adr.
Lemma det_lblock n1 n2 Aul (Adl : 'M[R]_(n2, n1)) Adr :
\det (block_mx Aul 0 Adl Adr) = \det Aul * \det Adr.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComRing.ringType R)) (@determinant (GRing.ComRing.ringType R) (addn n1 n2) (@block_mx (GRing.Zmodule.sort (GRing.ComRing.zmodType R)) n1 n2 n1 n2 Aul (GRing.zero (matrix_zmodType (GRing.ComRing.zmodType R) n1 n2)) Adl Adr)) (@GRing.mul (GRing.ComRing.ringType R) (@determinant (GRing.ComRing.ringType R) n1 Aul) (@determinant (GRing.ComRing.ringType R) n2 Adr)) *)
by rewrite -det_tr tr_block_mx trmx0 det_ublock !det_tr.
Qed.
End ComMatrix.
Arguments lin_mul_row {R m n} u.
Arguments lin_mulmx {R m n p} A.
Canonical matrix_finAlgType (R : finComRingType) n' :=
[finAlgType R of 'M[R]_n'.+1].
Section MatrixInv.
Variables R : comUnitRingType.
Section Defs.
Variable n : nat.
Implicit Type A : 'M[R]_n.
Definition unitmx : pred 'M[R]_n := fun A => \det A \is a GRing.unit.
Definition invmx A := if A \in unitmx then (\det A)^-1 *: \adj A else A.
Lemma unitmxE A : (A \in unitmx) = (\det A \is a GRing.unit).
Proof.
(* Goal: @eq bool (@in_mem (matrix (GRing.ComUnitRing.sort R) n n) A (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) (@in_mem (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@determinant (GRing.ComUnitRing.ringType R) n A) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (@GRing.unit (GRing.ComUnitRing.unitRingType R))))) *)
by [].
Qed.
Lemma unitmx_perm s : perm_mx s \in unitmx.
Proof.
(* Goal: is_true (@in_mem (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@perm_mx (GRing.ComUnitRing.ringType R) n s) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) *)
by rewrite unitmxE det_perm unitrX ?unitrN ?unitr1.
Qed.
Lemma unitmx_tr A : (A^T \in unitmx) = (A \in unitmx).
Proof.
(* Goal: @eq bool (@in_mem (matrix (GRing.ComUnitRing.sort R) n n) (@trmx (GRing.ComUnitRing.sort R) n n A) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) (@in_mem (matrix (GRing.ComUnitRing.sort R) n n) A (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) *)
by rewrite unitmxE det_tr.
Qed.
Lemma unitmxZ a A : a \is a GRing.unit -> (a *: A \in unitmx) = (A \in unitmx).
Proof.
(* Goal: forall _ : is_true (@in_mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) a (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (@GRing.unit (GRing.ComUnitRing.unitRingType R))))), @eq bool (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) a A) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) (@in_mem (matrix (GRing.ComUnitRing.sort R) n n) A (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) *)
by move=> Ua; rewrite !unitmxE detZ unitrM unitrX.
Qed.
Lemma invmx1 : invmx 1%:M = 1%:M.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (invmx (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R)))) (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) *)
by rewrite /invmx det1 invr1 scale1r adj1 if_same.
Qed.
Lemma invmxZ a A : a *: A \in unitmx -> invmx (a *: A) = a^-1 *: invmx A.
Proof.
(* Goal: forall _ : is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n)) (@GRing.Lmodule.base (GRing.ComUnitRing.ringType R) (@GRing.Lmodule.sort (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n)) (@GRing.Lmodule.class (GRing.ComUnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType R))) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n))))) (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n) a A) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)), @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (invmx (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n) a A)) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.inv (GRing.ComUnitRing.unitRingType R) a) (invmx A)) *)
rewrite /invmx !unitmxE detZ unitrM => /andP[Ua U_A].
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (if andb (@in_mem (GRing.ComUnitRing.sort R) (@GRing.exp (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) a n) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (@GRing.unit (GRing.ComUnitRing.unitRingType R))))) (@in_mem (GRing.ComUnitRing.sort R) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n A) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (@GRing.unit (GRing.ComUnitRing.unitRingType R))))) then @GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.exp (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) a n) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n A))) (@adjugate (GRing.ComUnitRing.ringType R) n (@GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n) a A)) else @GRing.scale (GRing.ComUnitRing.ringType R) (matrix_lmodType (GRing.ComUnitRing.ringType R) n n) a A) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.inv (GRing.ComUnitRing.unitRingType R) a) (if @in_mem (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@determinant (GRing.ComUnitRing.ringType R) n A) (@mem (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (predPredType (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.ComUnitRing.unitRingType R)) (@GRing.unit (GRing.ComUnitRing.unitRingType R)))) then @GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComUnitRing.ringType R) n A)) (@adjugate (GRing.ComUnitRing.ringType R) n A) else A)) *)
rewrite Ua U_A adjZ !scalerA invrM {U_A}//=.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n A)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@GRing.exp (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) a n))) (@GRing.exp (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) a (Nat.pred n))) (@adjugate (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n A)) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) a) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComUnitRing.ringType R) n A))) (@adjugate (GRing.ComUnitRing.ringType R) n A)) *)
case: (posnP n) A => [-> | n_gt0] A; first by rewrite flatmx0 [_ *: _]flatmx0.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n A)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@GRing.exp (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) a n))) (@GRing.exp (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) a (Nat.pred n))) (@adjugate (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n A)) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) a) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComUnitRing.ringType R) n A))) (@adjugate (GRing.ComUnitRing.ringType R) n A)) *)
rewrite unitrX_pos // in Ua; rewrite -[_ * _](mulrK Ua) mulrC -!mulrA.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) a) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n A)) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@GRing.exp (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) a n)) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.exp (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) a (Nat.pred n)) a)))) (@adjugate (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType R)) n A)) (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n) (@GRing.mul (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) a) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComUnitRing.ringType R) n A))) (@adjugate (GRing.ComUnitRing.ringType R) n A)) *)
by rewrite -exprSr prednK // !mulrA divrK ?unitrX.
Qed.
Lemma invmx_scalar a : invmx (a%:M) = a^-1%:M.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (invmx (@scalar_mx (GRing.ComUnitRing.ringType R) n a)) (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (@GRing.inv (GRing.ComUnitRing.unitRingType R) a)) *)
case Ua: (a%:M \in unitmx).
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (invmx (@scalar_mx (GRing.ComUnitRing.ringType R) n a)) (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (@GRing.inv (GRing.ComUnitRing.unitRingType R) a)) *)
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (invmx (@scalar_mx (GRing.ComUnitRing.ringType R) n a)) (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (@GRing.inv (GRing.ComUnitRing.unitRingType R) a)) *)
by rewrite -scalemx1 in Ua *; rewrite invmxZ // invmx1 scalemx1.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (invmx (@scalar_mx (GRing.ComUnitRing.ringType R) n a)) (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (@GRing.inv (GRing.ComUnitRing.unitRingType R) a)) *)
rewrite /invmx Ua; have [->|n_gt0] := posnP n; first by rewrite ![_%:M]flatmx0.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (@scalar_mx (GRing.ComUnitRing.ringType R) n a) (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (@GRing.inv (GRing.ComUnitRing.unitRingType R) a)) *)
by rewrite unitmxE det_scalar unitrX_pos // in Ua; rewrite invr_out ?Ua.
Qed.
Lemma mulVmx : {in unitmx, left_inverse 1%:M invmx mulmx}.
Proof.
(* Goal: @prop_in1 (matrix (GRing.ComUnitRing.sort R) n n) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx) (fun x : matrix (GRing.ComUnitRing.sort R) n n => @eq (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R))) n n) (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n n (invmx x) x) (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R))))) (inPhantom (@left_inverse (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (matrix (GRing.ComUnitRing.sort R) n n) (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R))) n n) (@scalar_mx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (GRing.one (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) invmx (@mulmx (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n n))) *)
by move=> A nsA; rewrite /invmx nsA -scalemxAl mul_adj_mx scale_scalar_mx mulVr.
Qed.
Lemma mulmxV : {in unitmx, right_inverse 1%:M invmx mulmx}.
Proof.
(* Goal: @prop_in1 (matrix (GRing.ComUnitRing.sort R) n n) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx) (fun x : matrix (GRing.ComUnitRing.sort R) n n => @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n x (invmx x)) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R)))) (inPhantom (@right_inverse (matrix (GRing.ComUnitRing.sort R) n n) (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))) invmx (@mulmx (GRing.ComUnitRing.ringType R) n n n))) *)
by move=> A nsA; rewrite /invmx nsA -scalemxAr mul_mx_adj scale_scalar_mx mulVr.
Qed.
Lemma mulKmx m : {in unitmx, @left_loop _ 'M_(n, m) invmx mulmx}.
Proof.
(* Goal: @prop_in1 (matrix (GRing.ComUnitRing.sort R) n n) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx) (fun x : matrix (GRing.ComUnitRing.sort R) n n => @cancel (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n m) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n m) (@mulmx (GRing.ComUnitRing.ringType R) n n m x) (@mulmx (GRing.ComUnitRing.ringType R) n n m (invmx x))) (inPhantom (@left_loop (matrix (GRing.ComUnitRing.sort R) n n) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n m) invmx (@mulmx (GRing.ComUnitRing.ringType R) n n m))) *)
by move=> A uA /= B; rewrite mulmxA mulVmx ?mul1mx.
Qed.
Lemma mulKVmx m : {in unitmx, @rev_left_loop _ 'M_(n, m) invmx mulmx}.
Proof.
(* Goal: @prop_in1 (matrix (GRing.ComUnitRing.sort R) n n) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx) (fun x : matrix (GRing.ComUnitRing.sort R) n n => @cancel (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n m) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n m) (@mulmx (GRing.ComUnitRing.ringType R) n n m (invmx x)) (@mulmx (GRing.ComUnitRing.ringType R) n n m x)) (inPhantom (@rev_left_loop (matrix (GRing.ComUnitRing.sort R) n n) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n m) invmx (@mulmx (GRing.ComUnitRing.ringType R) n n m))) *)
by move=> A uA /= B; rewrite mulmxA mulmxV ?mul1mx.
Qed.
Lemma mulmxK m : {in unitmx, @right_loop 'M_(m, n) _ invmx mulmx}.
Proof.
(* Goal: @prop_in1 (matrix (GRing.ComUnitRing.sort R) n n) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx) (fun y : matrix (GRing.ComUnitRing.sort R) n n => @cancel (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (fun x : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n => @mulmx (GRing.ComUnitRing.ringType R) m n n x y) (fun x : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n => @mulmx (GRing.ComUnitRing.ringType R) m n n x (invmx y))) (inPhantom (@right_loop (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (matrix (GRing.ComUnitRing.sort R) n n) invmx (@mulmx (GRing.ComUnitRing.ringType R) m n n))) *)
by move=> A uA /= B; rewrite -mulmxA mulmxV ?mulmx1.
Qed.
Lemma mulmxKV m : {in unitmx, @rev_right_loop 'M_(m, n) _ invmx mulmx}.
Proof.
(* Goal: @prop_in1 (matrix (GRing.ComUnitRing.sort R) n n) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx) (fun y : matrix (GRing.ComUnitRing.sort R) n n => @cancel (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (fun x : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n => @mulmx (GRing.ComUnitRing.ringType R) m n n x (invmx y)) (fun x : matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n => @mulmx (GRing.ComUnitRing.ringType R) m n n x y)) (inPhantom (@rev_right_loop (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) m n) (matrix (GRing.ComUnitRing.sort R) n n) invmx (@mulmx (GRing.ComUnitRing.ringType R) m n n))) *)
by move=> A uA /= B; rewrite -mulmxA mulVmx ?mulmx1.
Qed.
Lemma det_inv A : \det (invmx A) = (\det A)^-1.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R))) (@determinant (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (invmx A)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComUnitRing.ringType R) n A)) *)
case uA: (A \in unitmx); last by rewrite /invmx uA invr_out ?negbT.
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R))) (@determinant (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n (invmx A)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComUnitRing.ringType R) n A)) *)
by apply: (mulrI uA); rewrite -det_mulmx mulmxV ?divrr ?det1.
Qed.
Lemma unitmx_inv A : (invmx A \in unitmx) = (A \in unitmx).
Proof.
(* Goal: @eq bool (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (invmx A) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) (@in_mem (matrix (GRing.ComUnitRing.sort R) n n) A (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) *)
by rewrite !unitmxE det_inv unitrV.
Qed.
Lemma unitmx_mul A B : (A *m B \in unitmx) = (A \in unitmx) && (B \in unitmx).
Proof.
(* Goal: @eq bool (@in_mem (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n A B) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) (andb (@in_mem (matrix (GRing.ComUnitRing.sort R) n n) A (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx)) (@in_mem (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) B (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx))) *)
by rewrite -unitrM -det_mulmx.
Qed.
Lemma trmx_inv (A : 'M_n) : (invmx A)^T = invmx (A^T).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) n n) (@trmx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) n n (invmx A)) (invmx (@trmx (GRing.ComUnitRing.sort R) n n A)) *)
by rewrite (fun_if trmx) linearZ /= trmx_adj -unitmx_tr -det_tr.
Qed.
Lemma invmxK : involutive invmx.
Proof.
(* Goal: @involutive (matrix (GRing.ComUnitRing.sort R) n n) invmx *)
move=> A; case uA : (A \in unitmx); last by rewrite /invmx !uA.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) n n) (invmx (invmx A)) A *)
by apply: (can_inj (mulKVmx uA)); rewrite mulVmx // mulmxV ?unitmx_inv.
Qed.
Lemma mulmx1_unit A B : A *m B = 1%:M -> A \in unitmx /\ B \in unitmx.
Proof.
(* Goal: forall _ : @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n A B) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R))), and (is_true (@in_mem (matrix (GRing.ComUnitRing.sort R) n n) A (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx))) (is_true (@in_mem (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) B (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx))) *)
by move=> AB1; apply/andP; rewrite -unitmx_mul AB1 unitmx1.
Qed.
Lemma intro_unitmx A B : B *m A = 1%:M /\ A *m B = 1%:M -> unitmx A.
Proof.
(* Goal: forall _ : and (@eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n B A) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R)))) (@eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) n n) (@mulmx (GRing.ComUnitRing.ringType R) n n n A B) (@scalar_mx (GRing.ComUnitRing.ringType R) n (GRing.one (GRing.ComUnitRing.ringType R)))), is_true (unitmx A) *)
by case=> _ /mulmx1_unit[].
Qed.
Lemma invmx_out : {in [predC unitmx], invmx =1 id}.
Proof.
(* Goal: @prop_in1 (matrix (GRing.ComUnitRing.sort R) n n) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (simplPredType (matrix (GRing.ComUnitRing.sort R) n n)) (@predC (matrix (GRing.ComUnitRing.sort R) n n) (@pred_of_simpl (matrix (GRing.ComUnitRing.sort R) n n) (@pred_of_mem_pred (matrix (GRing.ComUnitRing.sort R) n n) (@mem (matrix (GRing.ComUnitRing.sort R) n n) (predPredType (matrix (GRing.ComUnitRing.sort R) n n)) unitmx))))) (fun x : matrix (GRing.ComUnitRing.sort R) n n => @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (invmx x) ((fun x0 : matrix (GRing.ComUnitRing.sort R) n n => x0) x)) (inPhantom (@eqfun (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n)) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType R)) n n))))) (matrix (GRing.ComUnitRing.sort R) n n) invmx (fun x : matrix (GRing.ComUnitRing.sort R) n n => x))) *)
by move=> A; rewrite inE /= /invmx -if_neg => ->.
Qed.
End Defs.
Variable n' : nat.
Local Notation n := n'.+1.
Definition matrix_unitRingMixin :=
UnitRingMixin (@mulVmx n) (@mulmxV n) (@intro_unitmx n) (@invmx_out n).
Canonical matrix_unitRing :=
Eval hnf in UnitRingType 'M[R]_n matrix_unitRingMixin.
Canonical matrix_unitAlg := Eval hnf in [unitAlgType R of 'M[R]_n].
Lemma detV (A : 'M_n) : \det A^-1 = (\det A)^-1.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (@determinant (GRing.ComUnitRing.ringType R) (S n') (@GRing.inv matrix_unitRing A)) (@GRing.inv (GRing.ComUnitRing.unitRingType R) (@determinant (GRing.ComUnitRing.ringType R) (S n') A)) *)
exact: det_inv.
Qed.
Lemma unitr_trmx (A : 'M_n) : (A^T \is a GRing.unit) = (A \is a GRing.unit).
Proof.
(* Goal: @eq bool (@in_mem (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@trmx (GRing.ComUnitRing.sort R) (S n') (S n') A) (@mem (GRing.UnitRing.sort matrix_unitRing) (predPredType (GRing.UnitRing.sort matrix_unitRing)) (@has_quality (S O) (GRing.UnitRing.sort matrix_unitRing) (@GRing.unit matrix_unitRing)))) (@in_mem (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) A (@mem (GRing.UnitRing.sort matrix_unitRing) (predPredType (GRing.UnitRing.sort matrix_unitRing)) (@has_quality (S O) (GRing.UnitRing.sort matrix_unitRing) (@GRing.unit matrix_unitRing)))) *)
exact: unitmx_tr.
Qed.
Lemma trmxV (A : 'M_n) : A^-1^T = (A^T)^-1.
Proof.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort R) (S n') (S n')) (@trmx (GRing.ComUnitRing.sort R) (S n') (S n') (@GRing.inv matrix_unitRing A)) (@GRing.inv matrix_unitRing (@trmx (GRing.ComUnitRing.sort R) (S n') (S n') A)) *)
exact: trmx_inv.
Qed.
Lemma perm_mxV (s : 'S_n) : perm_mx s^-1 = (perm_mx s)^-1.
Lemma is_perm_mxV (A : 'M_n) : is_perm_mx A^-1 = is_perm_mx A.
Proof.
(* Goal: @eq bool (@is_perm_mx (GRing.ComUnitRing.ringType R) (S n') (@GRing.inv matrix_unitRing A)) (@is_perm_mx (GRing.ComUnitRing.ringType R) (S n') A) *)
apply/is_perm_mxP/is_perm_mxP=> [] [s defA]; exists s^-1%g.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S n') (S n')) (@GRing.inv matrix_unitRing A) (@perm_mx (GRing.ComUnitRing.ringType R) (S n') (@invg (perm_of_baseFinGroupType (ordinal_finType (S n'))) s)) *)
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S n') (S n')) A (@perm_mx (GRing.ComUnitRing.ringType R) (S n') (@invg (perm_of_baseFinGroupType (ordinal_finType (S n'))) s)) *)
by rewrite -(invrK A) defA perm_mxV.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType R)) (S n') (S n')) (@GRing.inv matrix_unitRing A) (@perm_mx (GRing.ComUnitRing.ringType R) (S n') (@invg (perm_of_baseFinGroupType (ordinal_finType (S n'))) s)) *)
by rewrite defA perm_mxV.
Qed.
End MatrixInv.
Prenex Implicits unitmx invmx invmxK.
Canonical matrix_countUnitRingType (R : countComUnitRingType) n :=
[countUnitRingType of 'M[R]_n.+1].
Section FinUnitMatrix.
Variables (n : nat) (R : finComUnitRingType).
Canonical matrix_finUnitRingType n' :=
Eval hnf in [finUnitRingType of 'M[R]_n'.+1].
Definition GLtype of phant R := {unit 'M[R]_n.-1.+1}.
Coercion GLval ph (u : GLtype ph) : 'M[R]_n.-1.+1 :=
let: FinRing.Unit A _ := u in A.
End FinUnitMatrix.
Bind Scope group_scope with GLtype.
Arguments GLval {n%N R ph} u%g.
Notation "{ ''GL_' n [ R ] }" := (GLtype n (Phant R))
(at level 0, n at level 2, format "{ ''GL_' n [ R ] }") : type_scope.
Notation "{ ''GL_' n ( p ) }" := {'GL_n['F_p]}
(at level 0, n at level 2, p at level 10,
format "{ ''GL_' n ( p ) }") : type_scope.
Section GL_unit.
Variables (n : nat) (R : finComUnitRingType).
Canonical GL_subType := [subType of {'GL_n[R]} for GLval].
Definition GL_eqMixin := Eval hnf in [eqMixin of {'GL_n[R]} by <:].
Canonical GL_eqType := Eval hnf in EqType {'GL_n[R]} GL_eqMixin.
Canonical GL_choiceType := Eval hnf in [choiceType of {'GL_n[R]}].
Canonical GL_countType := Eval hnf in [countType of {'GL_n[R]}].
Canonical GL_subCountType := Eval hnf in [subCountType of {'GL_n[R]}].
Canonical GL_finType := Eval hnf in [finType of {'GL_n[R]}].
Canonical GL_subFinType := Eval hnf in [subFinType of {'GL_n[R]}].
Canonical GL_baseFinGroupType := Eval hnf in [baseFinGroupType of {'GL_n[R]}].
Canonical GL_finGroupType := Eval hnf in [finGroupType of {'GL_n[R]}].
Definition GLgroup of phant R := [set: {'GL_n[R]}].
Lemma GL_VE u : GLval u^-1 = (GLval u)^-1. Proof. by []. Qed.
Proof.
(* Goal: @eq (matrix (FinRing.ComUnitRing.sort R) (S (Nat.pred n)) (S (Nat.pred n))) (@GLval n R (Phant (FinRing.ComUnitRing.sort R)) (@invg GL_baseFinGroupType u)) (@GRing.inv (matrix_unitRing (FinRing.ComUnitRing.comUnitRingType R) (Nat.pred n)) (@GLval n R (Phant (FinRing.ComUnitRing.sort R)) u)) *)
by [].
Qed.
Lemma GL_ME u v : GLval (u * v) = GLval u * GLval v. Proof. by []. Qed.
Proof.
(* Goal: @eq (matrix (FinRing.ComUnitRing.sort R) (S (Nat.pred n)) (S (Nat.pred n))) (@GLval n R (Phant (FinRing.ComUnitRing.sort R)) (@mulg GL_baseFinGroupType u v)) (@GRing.mul (matrix_ringType (FinRing.ComUnitRing.ringType R) (Nat.pred n)) (@GLval n R (Phant (FinRing.ComUnitRing.sort R)) u) (@GLval n R (Phant (FinRing.ComUnitRing.sort R)) v)) *)
by [].
Qed.
Lemma GL_unit u : GLval u \is a GRing.unit. Proof. exact: valP. Qed.
Proof.
(* Goal: is_true (@in_mem (matrix (FinRing.ComUnitRing.sort R) (S (Nat.pred n)) (S (Nat.pred n))) (@GLval n R (Phant (FinRing.ComUnitRing.sort R)) u) (@mem (GRing.UnitRing.sort (matrix_unitRing (FinRing.ComUnitRing.comUnitRingType R) (Nat.pred n))) (predPredType (GRing.UnitRing.sort (matrix_unitRing (FinRing.ComUnitRing.comUnitRingType R) (Nat.pred n)))) (@has_quality (S O) (GRing.UnitRing.sort (matrix_unitRing (FinRing.ComUnitRing.comUnitRingType R) (Nat.pred n))) (@GRing.unit (matrix_unitRing (FinRing.ComUnitRing.comUnitRingType R) (Nat.pred n)))))) *)
exact: valP.
Qed.
Lemma GL_det u : \det u != 0.
Proof.
(* Goal: is_true (negb (@eq_op (GRing.Ring.eqType (FinRing.ComUnitRing.ringType R)) (@determinant (FinRing.ComUnitRing.ringType R) (S (Nat.pred n)) (@GLval n R (Phant (FinRing.ComUnitRing.sort R)) u)) (GRing.zero (GRing.Ring.zmodType (FinRing.ComUnitRing.ringType R))))) *)
by apply: contraL (GL_unitmx u); rewrite unitmxE => /eqP->; rewrite unitr0.
Qed.
End GL_unit.
Notation "''GL_' n [ R ]" := (GLgroup n (Phant R))
(at level 8, n at level 2, format "''GL_' n [ R ]") : group_scope.
Notation "''GL_' n ( p )" := 'GL_n['F_p]
(at level 8, n at level 2, p at level 10,
format "''GL_' n ( p )") : group_scope.
Notation "''GL_' n [ R ]" := (GLgroup_group n (Phant R)) : Group_scope.
Notation "''GL_' n ( p )" := (GLgroup_group n (Phant 'F_p)) : Group_scope.
Section MatrixDomain.
Variable R : idomainType.
Lemma scalemx_eq0 m n a (A : 'M[R]_(m, n)) :
(a *: A == 0) = (a == 0) || (A == 0).
Proof.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.base (GRing.IntegralDomain.ringType R) (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.class (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n))))) (@GRing.scale (GRing.IntegralDomain.ringType R) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n) a A) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.base (GRing.IntegralDomain.ringType R) (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.class (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)))))) (orb (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) a (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) (@eq_op (matrix_eqType (GRing.IntegralDomain.eqType R) m n) A (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) m n)))) *)
case nz_a: (a == 0) / eqP => [-> | _]; first by rewrite scale0r eqxx.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.base (GRing.IntegralDomain.ringType R) (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.class (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n))))) (@GRing.scale (GRing.IntegralDomain.ringType R) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n) a A) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.base (GRing.IntegralDomain.ringType R) (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.class (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)))))) (orb false (@eq_op (matrix_eqType (GRing.IntegralDomain.eqType R) m n) A (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) m n)))) *)
apply/eqP/eqP=> [aA0 | ->]; last exact: scaler0.
(* Goal: @eq (Equality.sort (matrix_eqType (GRing.IntegralDomain.eqType R) m n)) A (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) m n)) *)
apply/matrixP=> i j; apply/eqP; move/matrixP/(_ i j)/eqP: aA0.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@fun_of_matrix (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) m n (@GRing.scale (GRing.IntegralDomain.ringType R) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n) a A) i j) (@fun_of_matrix (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) m n (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.base (GRing.IntegralDomain.ringType R) (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n)) (@GRing.Lmodule.class (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n))))) i j)), is_true (@eq_op (GRing.IntegralDomain.eqType R) (@fun_of_matrix (Equality.sort (GRing.IntegralDomain.eqType R)) m n A i j) (@fun_of_matrix (Equality.sort (GRing.IntegralDomain.eqType R)) m n (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) m n)) i j)) *)
by rewrite !mxE mulf_eq0 nz_a.
Qed.
Lemma scalemx_inj m n a :
a != 0 -> injective ( *:%R a : 'M[R]_(m, n) -> 'M[R]_(m, n)).
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) a (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))))), @injective (matrix (GRing.IntegralDomain.sort R) m n) (matrix (GRing.IntegralDomain.sort R) m n) (@GRing.scale (GRing.IntegralDomain.ringType R) (matrix_lmodType (GRing.IntegralDomain.ringType R) m n) a : forall _ : matrix (GRing.IntegralDomain.sort R) m n, matrix (GRing.IntegralDomain.sort R) m n) *)
move=> nz_a A B eq_aAB; apply: contraNeq nz_a.
(* Goal: forall _ : is_true (negb (@eq_op (matrix_eqType (GRing.IntegralDomain.eqType R) m n) A B)), is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) a (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) *)
rewrite -[A == B]subr_eq0 -[a == 0]orbF => /negPf<-.
(* Goal: is_true (orb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) a (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.IntegralDomain.zmodType R) m n)) (@GRing.add (matrix_zmodType (GRing.IntegralDomain.zmodType R) m n) A (@GRing.opp (matrix_zmodType (GRing.IntegralDomain.zmodType R) m n) B)) (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) m n)))) *)
by rewrite -scalemx_eq0 linearB subr_eq0 /= eq_aAB.
Qed.
Lemma det0P n (A : 'M[R]_n) :
reflect (exists2 v : 'rV[R]_n, v != 0 & v *m A = 0) (\det A == 0).
Proof.
(* Goal: Bool.reflect (@ex2 (matrix (GRing.IntegralDomain.sort R) (S O) n) (fun v : matrix (GRing.IntegralDomain.sort R) (S O) n => is_true (negb (@eq_op (matrix_eqType (GRing.IntegralDomain.eqType R) (S O) n) v (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) (S O) n))))) (fun v : matrix (GRing.IntegralDomain.sort R) (S O) n => @eq (matrix (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (S O) n) (@mulmx (GRing.IntegralDomain.ringType R) (S O) n n v A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (S O) n)))) (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@determinant (GRing.IntegralDomain.ringType R) n A) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) *)
apply: (iffP eqP) => [detA0 | [v n0v vA0]]; last first.
(* Goal: @ex2 (matrix (GRing.IntegralDomain.sort R) (S O) n) (fun v : matrix (GRing.IntegralDomain.sort R) (S O) n => is_true (negb (@eq_op (matrix_eqType (GRing.IntegralDomain.eqType R) (S O) n) v (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) (S O) n))))) (fun v : matrix (GRing.IntegralDomain.sort R) (S O) n => @eq (matrix (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (S O) n) (@mulmx (GRing.IntegralDomain.ringType R) (S O) n n v A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (S O) n))) *)
(* Goal: @eq (Equality.sort (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) (@determinant (GRing.IntegralDomain.ringType R) n A) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) *)
apply: contraNeq n0v => nz_detA; rewrite -(inj_eq (scalemx_inj nz_detA)).
(* Goal: @ex2 (matrix (GRing.IntegralDomain.sort R) (S O) n) (fun v : matrix (GRing.IntegralDomain.sort R) (S O) n => is_true (negb (@eq_op (matrix_eqType (GRing.IntegralDomain.eqType R) (S O) n) v (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) (S O) n))))) (fun v : matrix (GRing.IntegralDomain.sort R) (S O) n => @eq (matrix (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (S O) n) (@mulmx (GRing.IntegralDomain.ringType R) (S O) n n v A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (S O) n))) *)
(* Goal: is_true (@eq_op (matrix_eqType (GRing.IntegralDomain.eqType R) (S O) n) (@GRing.scale (GRing.IntegralDomain.ringType R) (matrix_lmodType (GRing.IntegralDomain.ringType R) (S O) n) (@determinant (GRing.IntegralDomain.ringType R) n A) v) (@GRing.scale (GRing.IntegralDomain.ringType R) (matrix_lmodType (GRing.IntegralDomain.ringType R) (S O) n) (@determinant (GRing.IntegralDomain.ringType R) n A) (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) (S O) n)))) *)
by rewrite scaler0 -mul_mx_scalar -mul_mx_adj mulmxA vA0 mul0mx.
(* Goal: @ex2 (matrix (GRing.IntegralDomain.sort R) (S O) n) (fun v : matrix (GRing.IntegralDomain.sort R) (S O) n => is_true (negb (@eq_op (matrix_eqType (GRing.IntegralDomain.eqType R) (S O) n) v (GRing.zero (matrix_zmodType (GRing.IntegralDomain.zmodType R) (S O) n))))) (fun v : matrix (GRing.IntegralDomain.sort R) (S O) n => @eq (matrix (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (S O) n) (@mulmx (GRing.IntegralDomain.ringType R) (S O) n n v A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (S O) n))) *)
elim: n => [|n IHn] in A detA0 *.
by case/idP: (oner_eq0 R); rewrite -detA0 [A]thinmx0 -(thinmx0 1%:M) det1.
have [{detA0}A'0 | nzA'] := eqVneq (row 0 (\adj A)) 0; last first.
exists (row 0 (\adj A)) => //; rewrite rowE -mulmxA mul_adj_mx detA0.
by rewrite mul_mx_scalar scale0r.
pose A' := col' 0 A; pose vA := col 0 A.
have defA: A = row_mx vA A'.
apply/matrixP=> i j; rewrite !mxE.
case: splitP => j' def_j; rewrite mxE; congr (A i _); apply: val_inj => //=.
by rewrite def_j [j']ord1.
have{IHn} w_ j : exists w : 'rV_n.+1, [/\ w != 0, w 0 j = 0 & w *m A' = 0].
have [|wj nzwj wjA'0] := IHn (row' j A').
by apply/eqP; move/rowP/(_ j)/eqP: A'0; rewrite !mxE mulf_eq0 signr_eq0.
exists (\row_k oapp (wj 0) 0 (unlift j k)).
rewrite !mxE unlift_none -wjA'0; split=> //.
apply: contraNneq nzwj => w0; apply/eqP/rowP=> k'.
by move/rowP/(_ (lift j k')): w0; rewrite !mxE liftK.
apply/rowP=> k; rewrite !mxE (bigD1 j) //= mxE unlift_none mul0r add0r.
rewrite (reindex_onto (lift j) (odflt k \o unlift j)) /= => [|k'].
by apply: eq_big => k'; rewrite ?mxE liftK eq_sym neq_lift eqxx.
by rewrite eq_sym; case/unlift_some=> ? ? ->.
have [w0 [nz_w0 w00_0 w0A']] := w_ 0; pose a0 := (w0 *m vA) 0 0.
have [j {nz_w0}/= nz_w0j | w00] := pickP [pred j | w0 0 j != 0]; last first.
by case/eqP: nz_w0; apply/rowP=> j; rewrite mxE; move/eqP: (w00 j).
have{w_} [wj [nz_wj wj0_0 wjA']] := w_ j; pose aj := (wj *m vA) 0 0.
have [aj0 | nz_aj] := eqVneq aj 0.
exists wj => //; rewrite defA (@mul_mx_row _ _ _ 1) [_ *m _]mx11_scalar -/aj.
by rewrite aj0 raddf0 wjA' row_mx0.
exists (aj *: w0 - a0 *: wj).
apply: contraNneq nz_aj; move/rowP/(_ j)/eqP; rewrite !mxE wj0_0 mulr0 subr0.
by rewrite mulf_eq0 (negPf nz_w0j) orbF.
rewrite defA (@mul_mx_row _ _ _ 1) !mulmxBl -!scalemxAl w0A' wjA' !linear0.
by rewrite -mul_mx_scalar -mul_scalar_mx -!mx11_scalar subrr addr0 row_mx0.
Qed.
Qed.
End MatrixDomain.
Arguments det0P {R n A}.
Section MapFieldMatrix.
Variables (aF : fieldType) (rF : comUnitRingType) (f : {rmorphism aF -> rF}).
Local Notation "A ^f" := (map_mx f A) : ring_scope.
Lemma map_mx_inj {m n} : injective (map_mx f : 'M_(m, n) -> 'M_(m, n)).
Proof.
(* Goal: @injective (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) m n) (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) m n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) m n : forall _ : matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) m n, matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) m n) *)
move=> A B eq_AB; apply/matrixP=> i j.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) m n A i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) m n B i j) *)
by move/matrixP/(_ i j): eq_AB; rewrite !mxE; apply: fmorph_inj.
Qed.
Lemma map_mx_is_scalar n (A : 'M_n) : is_scalar_mx A^f = is_scalar_mx A.
Proof.
(* Goal: @eq bool (@is_scalar_mx (GRing.ComUnitRing.ringType rF) n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A)) (@is_scalar_mx (GRing.Field.ringType aF) n A) *)
rewrite /is_scalar_mx; case: (insub _) => // i.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType rF)) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A) (@scalar_mx (GRing.ComUnitRing.ringType rF) n (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType rF)) n n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A) i i))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.Field.ringType aF)) n n) A (@scalar_mx (GRing.Field.ringType aF) n (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType aF)) n n A i i))) *)
by rewrite mxE -map_scalar_mx inj_eq //; apply: map_mx_inj.
Qed.
Lemma map_unitmx n (A : 'M_n) : (A^f \in unitmx) = (A \in unitmx).
Proof.
(* Goal: @eq bool (@in_mem (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A) (@mem (matrix (GRing.ComUnitRing.sort rF) n n) (predPredType (matrix (GRing.ComUnitRing.sort rF) n n)) (@unitmx rF n))) (@in_mem (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) n n) A (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType aF)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType aF)) n n)) (@unitmx (GRing.Field.comUnitRingType aF) n))) *)
by rewrite unitmxE det_map_mx // fmorph_unit // -unitfE.
Qed.
Lemma map_mx_unit n' (A : 'M_n'.+1) :
Proof.
(* Goal: @eq bool (@in_mem (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (S n') (S n')) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) (S n') (S n') A) (@mem (GRing.UnitRing.sort (matrix_unitRing rF n')) (predPredType (GRing.UnitRing.sort (matrix_unitRing rF n'))) (@has_quality (S O) (GRing.UnitRing.sort (matrix_unitRing rF n')) (@GRing.unit (matrix_unitRing rF n'))))) (@in_mem (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (S n') (S n')) A (@mem (GRing.UnitRing.sort (matrix_unitRing (GRing.Field.comUnitRingType aF) n')) (predPredType (GRing.UnitRing.sort (matrix_unitRing (GRing.Field.comUnitRingType aF) n'))) (@has_quality (S O) (GRing.UnitRing.sort (matrix_unitRing (GRing.Field.comUnitRingType aF) n')) (@GRing.unit (matrix_unitRing (GRing.Field.comUnitRingType aF) n'))))) *)
exact: map_unitmx.
Qed.
Lemma map_invmx n (A : 'M_n) : (invmx A)^f = invmx A^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) n n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n (@invmx (GRing.Field.comUnitRingType aF) n A)) (@invmx rF n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A)) *)
rewrite /invmx map_unitmx (fun_if (map_mx f)).
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) n n) (if @in_mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType aF)) n n) A (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType aF)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType aF)) n n)) (@unitmx (GRing.Field.comUnitRingType aF) n)) then @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n (@GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType aF))) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType aF))) n n) (@GRing.inv (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType aF)) (@determinant (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType aF)) n A)) (@adjugate (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType aF)) n A)) else @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A) (if @in_mem (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) n n) A (@mem (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType aF)) n n) (predPredType (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType aF)) n n)) (@unitmx (GRing.Field.comUnitRingType aF) n)) then @GRing.scale (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType rF)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType rF)) n n) (@GRing.inv (GRing.ComUnitRing.unitRingType rF) (@determinant (GRing.ComUnitRing.ringType rF) n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A))) (@adjugate (GRing.ComUnitRing.ringType rF) n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A)) else @map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) n n A) *)
by rewrite map_mxZ map_mx_adj det_map_mx fmorphV.
Qed.
Lemma map_mx_inv n' (A : 'M_n'.+1) : A^-1^f = A^f^-1.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (S n') (S n')) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) (S n') (S n') (@GRing.inv (matrix_unitRing (GRing.Field.comUnitRingType aF) n') A)) (@GRing.inv (matrix_unitRing rF n') (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) (S n') (S n') A)) *)
exact: map_invmx.
Qed.
Lemma map_mx_eq0 m n (A : 'M_(m, n)) : (A^f == 0) = (A == 0).
Proof.
(* Goal: @eq bool (@eq_op (matrix_eqType (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) m n) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.ComUnitRing.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.ComUnitRing.sort rF)) f) m n A) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType rF)) m n))) (@eq_op (matrix_eqType (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType aF))) m n) A (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType aF)) m n))) *)
by rewrite -(inj_eq map_mx_inj) raddf0.
Qed.
End MapFieldMatrix.
Arguments map_mx_inj {aF rF f m n} [A1 A2] eqA12f : rename.
Section CormenLUP.
Variable F : fieldType.
Fixpoint cormen_lup {n} :=
match n return let M := 'M[F]_n.+1 in M -> M * M * M with
| 0 => fun A => (1, 1, A)
| _.+1 => fun A =>
let k := odflt 0 [pick k | A k 0 != 0] in
let A1 : 'M_(1 + _) := xrow 0 k A in
let P1 : 'M_(1 + _) := tperm_mx 0 k in
let Schur := ((A k 0)^-1 *: dlsubmx A1) *m ursubmx A1 in
let: (P2, L2, U2) := cormen_lup (drsubmx A1 - Schur) in
let P := block_mx 1 0 0 P2 *m P1 in
let L := block_mx 1 0 ((A k 0)^-1 *: (P2 *m dlsubmx A1)) L2 in
let U := block_mx (ulsubmx A1) (ursubmx A1) 0 U2 in
(P, L, U)
end.
Lemma cormen_lup_perm n (A : 'M_n.+1) : is_perm_mx (cormen_lup A).1.1.
Proof.
(* Goal: is_true (@is_perm_mx (GRing.Field.ringType F) (S n) (@fst (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n) (S n)) (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n)) (@fst (prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n) (S n)) (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n))) (matrix (GRing.Field.sort F) (S n) (S n)) (@cormen_lup n A)))) *)
elim: n => [|n IHn] /= in A *; first exact: is_perm_mx1.
(* Goal: is_true (@is_perm_mx (GRing.Field.ringType F) (S (S n)) (@fst (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (@fst (prod (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n)))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (let 'pair (pair P2 L2 as y) U2 := @cormen_lup n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S n) (S n)) (@drsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n)) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O) (S n) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A))) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n)))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (@pair (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (@mulmx (GRing.Field.ringType F) (addn (S O) (S n)) (addn (S O) (S n)) (addn (S O) (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S n) (S O))) P2) (@tperm_mx (GRing.Field.ringType F) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))))) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) (S n))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@mulmx (GRing.Field.ringType F) (S n) (S n) (S O) P2 (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)))) L2)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@ulsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n) (S O))) U2))))) *)
set A' := _ - _; move/(_ A'): IHn; case: cormen_lup => [[P L U]] {A'}/=.
(* Goal: forall _ : is_true (@is_perm_mx (GRing.Field.ringType F) (S n) P), is_true (@is_perm_mx (GRing.Field.ringType F) (S (S n)) (@mulmx (GRing.Field.ringType F) (addn (S O) (S n)) (addn (S O) (S n)) (addn (S O) (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S n) (S O))) P) (@tperm_mx (GRing.Field.ringType F) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F))))))))) *)
rewrite (is_perm_mxMr _ (perm_mx_is_perm _ _)).
(* Goal: forall _ : is_true (@is_perm_mx (GRing.Field.ringType F) (S n) P), is_true (@is_perm_mx (GRing.Field.ringType F) (S (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S n) (S O))) P)) *)
by case/is_perm_mxP => s ->; apply: lift0_mx_is_perm.
Qed.
Lemma cormen_lup_correct n (A : 'M_n.+1) :
Lemma cormen_lup_detL n (A : 'M_n.+1) : \det (cormen_lup A).1.2 = 1.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@determinant (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n) (S n)) (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n)) (@fst (prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n) (S n)) (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n))) (matrix (GRing.Field.sort F) (S n) (S n)) (@cormen_lup n A)))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) *)
elim: n => [|n IHn] /= in A *; first by rewrite det1.
(* Goal: @eq (GRing.Field.sort F) (@determinant (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S (S n)) (@snd (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (@fst (prod (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n)))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (let 'pair (pair P2 L2 as y) U2 := @cormen_lup n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S n) (S n)) (@drsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n)) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O) (S n) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A))) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n)))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (@pair (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (@mulmx (GRing.Field.ringType F) (addn (S O) (S n)) (addn (S O) (S n)) (addn (S O) (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S n) (S O))) P2) (@tperm_mx (GRing.Field.ringType F) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))))) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) (S n))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@mulmx (GRing.Field.ringType F) (S n) (S n) (S O) P2 (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)))) L2)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@ulsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n) (S O))) U2))))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) *)
set A' := _ - _; move/(_ A'): IHn; case: cormen_lup => [[P L U]] {A'}/= detL.
(* Goal: @eq (GRing.Field.sort F) (@determinant (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) (S n))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@mulmx (GRing.Field.ringType F) (S n) (S n) (S O) P (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)))) L)) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) *)
by rewrite (@det_lblock _ 1) det1 mul1r.
Qed.
Lemma cormen_lup_lower n A (i j : 'I_n.+1) :
Proof.
(* Goal: forall _ : is_true (leq (@nat_of_ord (S n) i) (@nat_of_ord (S n) j)), @eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n) (@snd (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n) (S n)) (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n)) (@fst (prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n) (S n)) (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n))) (matrix (GRing.Field.sort F) (S n) (S n)) (@cormen_lup n A))) i j) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (nat_of_bool (@eq_op (ordinal_eqType (S n)) i j))) *)
elim: n => [|n IHn] /= in A i j *; first by rewrite [i]ord1 [j]ord1 mxE.
(* Goal: forall _ : is_true (leq (@nat_of_ord (S (S n)) i) (@nat_of_ord (S (S n)) j)), @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) (@snd (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (@fst (prod (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n)))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (let 'pair (pair P2 L2 as y) U2 := @cormen_lup n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S n) (S n)) (@drsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n)) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O) (S n) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A))) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n)))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (@pair (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (@mulmx (GRing.Field.ringType F) (addn (S O) (S n)) (addn (S O) (S n)) (addn (S O) (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S n) (S O))) P2) (@tperm_mx (GRing.Field.ringType F) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))))) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) (S n))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@mulmx (GRing.Field.ringType F) (S n) (S n) (S O) P2 (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)))) L2)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@ulsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n) (S O))) U2)))) i j) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (nat_of_bool (@eq_op (ordinal_eqType (S (S n))) i j))) *)
set A' := _ - _; move/(_ A'): IHn; case: cormen_lup => [[P L U]] {A'}/= Ll.
(* Goal: forall _ : is_true (leq (@nat_of_ord (S (S n)) i) (@nat_of_ord (S (S n)) j)), @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) (S n))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@mulmx (GRing.Field.ringType F) (S n) (S n) (S O) P (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)))) L) i j) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (nat_of_bool (@eq_op (ordinal_eqType (S (S n))) i j))) *)
rewrite !mxE split1; case: unliftP => [i'|] -> /=; rewrite !mxE split1.
(* Goal: forall _ : is_true (leq O (@nat_of_ord (S (S n)) j)), @eq (GRing.Field.sort F) match @Option.apply (ordinal (Nat.pred (S (S n)))) (sum (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n))))) (@inr (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n))))) (@inl (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n)))) (GRing.zero (Zp_zmodType O))) (@unlift (S (S n)) (GRing.zero (Zp_zmodType (S n))) j) with | inl j1 => @fun_of_matrix (GRing.Field.sort F) (S O) (S O) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (Zp_zmodType O)) j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) (S O) (S n) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) (S n))) (GRing.zero (Zp_zmodType O)) j2 end (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (nat_of_bool (@eq_op (ordinal_eqType (S (S n))) (GRing.zero (Zp_zmodType (S n))) j))) *)
(* Goal: forall _ : is_true (leq (bump O (@nat_of_ord (S n) i')) (@nat_of_ord (S (S n)) j)), @eq (GRing.Field.sort F) match @Option.apply (ordinal (Nat.pred (S (S n)))) (sum (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n))))) (@inr (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n))))) (@inl (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n)))) (GRing.zero (Zp_zmodType O))) (@unlift (S (S n)) (GRing.zero (Zp_zmodType (S n))) j) with | inl j1 => @fun_of_matrix (GRing.Field.sort F) (S n) (S O) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@mulmx (GRing.Field.ringType F) (S n) (S n) (S O) P (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)))) i' j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) (S n) (S n) L i' j2 end (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (nat_of_bool (@eq_op (ordinal_eqType (S (S n))) (@lift (S (S n)) (GRing.zero (Zp_zmodType (S n))) i') j))) *)
by case: unliftP => [j'|] -> //; apply: Ll.
(* Goal: forall _ : is_true (leq O (@nat_of_ord (S (S n)) j)), @eq (GRing.Field.sort F) match @Option.apply (ordinal (Nat.pred (S (S n)))) (sum (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n))))) (@inr (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n))))) (@inl (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n)))) (GRing.zero (Zp_zmodType O))) (@unlift (S (S n)) (GRing.zero (Zp_zmodType (S n))) j) with | inl j1 => @fun_of_matrix (GRing.Field.sort F) (S O) (S O) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (Zp_zmodType O)) j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) (S O) (S n) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) (S n))) (GRing.zero (Zp_zmodType O)) j2 end (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (nat_of_bool (@eq_op (ordinal_eqType (S (S n))) (GRing.zero (Zp_zmodType (S n))) j))) *)
by case: unliftP => [j'|] ->; rewrite /= mxE.
Qed.
Lemma cormen_lup_upper n A (i j : 'I_n.+1) :
Proof.
(* Goal: forall _ : is_true (leq (S (@nat_of_ord (S n) j)) (@nat_of_ord (S n) i)), @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S n) (S n) (@snd (prod (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n) (S n)) (matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n))) (matrix (GRing.Field.sort F) (S n) (S n)) (@cormen_lup n A)) i j) (GRing.zero (GRing.Field.zmodType F)) *)
elim: n => [|n IHn] /= in A i j *; first by rewrite [i]ord1.
(* Goal: forall _ : is_true (leq (S (@nat_of_ord (S (S n)) j)) (@nat_of_ord (S (S n)) i)), @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) (@snd (prod (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n)))) (matrix (GRing.Field.sort F) (S (S n)) (S (S n))) (let 'pair (pair P2 L2 as y) U2 := @cormen_lup n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) (S n) (S n)) (@drsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S n) (S n)) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O) (S n) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A))) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n)))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (@pair (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (matrix (GRing.Field.sort F) (addn (S O) (S n)) (addn (S O) (S n))) (@mulmx (GRing.Field.ringType F) (addn (S O) (S n)) (addn (S O) (S n)) (addn (S O) (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.Field.ringType F) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S n) (S O))) P2) (@tperm_mx (GRing.Field.ringType F) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))))) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) (S n))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (S n) (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) (GRing.zero (Zp_zmodType (S n))))) (@mulmx (GRing.Field.ringType F) (S n) (S n) (S O) P2 (@dlsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)))) L2)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@ulsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n) (S O))) U2))) i j) (GRing.zero (GRing.Field.zmodType F)) *)
set A' := _ - _; move/(_ A'): IHn; case: cormen_lup => [[P L U]] {A'}/= Uu.
(* Goal: forall _ : is_true (leq (S (@nat_of_ord (S (S n)) j)) (@nat_of_ord (S (S n)) i)), @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) (@block_mx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@ulsubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (@ursubmx (GRing.Field.sort F) (S O) (S n) (S O) (S n) (@xrow (GRing.Field.sort F) (S (S n)) (S (S n)) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@Option.default (ordinal (S (S n))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (S n)))) (@pick (ordinal_finType (S (S n))) (fun k : ordinal (S (S n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (S (S n)) (S (S n)) A k (GRing.zero (Zp_zmodType (S n)))) (GRing.zero (GRing.Field.zmodType F)))))) A)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n) (S O))) U) i j) (GRing.zero (GRing.Field.zmodType F)) *)
rewrite !mxE split1; case: unliftP => [i'|] -> //=; rewrite !mxE split1.
(* Goal: forall _ : is_true (leq (S (@nat_of_ord (S (S n)) j)) (bump O (@nat_of_ord (S n) i'))), @eq (GRing.Field.sort F) match @Option.apply (ordinal (Nat.pred (S (S n)))) (sum (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n))))) (@inr (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n))))) (@inl (GRing.Zmodule.sort (Zp_zmodType O)) (ordinal (Nat.pred (S (S n)))) (GRing.zero (Zp_zmodType O))) (@unlift (S (S n)) (GRing.zero (Zp_zmodType (S n))) j) with | inl j1 => @fun_of_matrix (GRing.Field.sort F) (S n) (S O) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n) (S O))) i' j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) (S n) (S n) U i' j2 end (GRing.zero (GRing.Field.zmodType F)) *)
by case: unliftP => [j'|] ->; [apply: Uu | rewrite /= mxE].
Qed.
End CormenLUP.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrfun ssrbool eqtype ssrnat seq path choice fintype.
From mathcomp
Require Import div tuple finfun bigop ssralg finalg zmodp matrix vector poly.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Local Open Scope ring_scope.
Reserved Notation "{ 'aspace' T }" (at level 0, format "{ 'aspace' T }").
Reserved Notation "<< U & vs >>" (at level 0, format "<< U & vs >>").
Reserved Notation "<< U ; x >>" (at level 0, format "<< U ; x >>").
Reserved Notation "''AHom' ( T , rT )"
(at level 8, format "''AHom' ( T , rT )").
Reserved Notation "''AEnd' ( T )" (at level 8, format "''AEnd' ( T )").
Notation "\dim_ E V" := (divn (\dim V) (\dim E))
(at level 10, E at level 2, V at level 8, format "\dim_ E V") : nat_scope.
Import GRing.Theory.
Module Falgebra.
Section DefaultBase.
Variables (K : fieldType) (A : algType K).
Lemma BaseMixin : Vector.mixin_of A -> GRing.UnitRing.mixin_of A.
Proof.
(* Goal: forall _ : @Vector.mixin_of (GRing.Field.ringType K) (@GRing.Algebra.lmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A), GRing.UnitRing.mixin_of (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) *)
move=> vAm; pose vA := VectType K A vAm.
(* Goal: GRing.UnitRing.mixin_of (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) *)
pose am u := linfun (u \o* idfun : vA -> vA).
(* Goal: GRing.UnitRing.mixin_of (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) *)
have amE u v : am u v = v * u by rewrite lfunE.
(* Goal: GRing.UnitRing.mixin_of (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) *)
pose uam := [pred u | lker (am u) == 0%VS].
(* Goal: GRing.UnitRing.mixin_of (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) *)
pose vam := [fun u => if u \in uam then (am u)^-1%VF 1 else u].
(* Goal: GRing.UnitRing.mixin_of (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) *)
have vamKl: {in uam, left_inverse 1 vam *%R}.
(* Goal: GRing.UnitRing.mixin_of (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) *)
(* Goal: @prop_in1 (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) (@mem (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) (simplPredType (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A))) uam) (fun x : GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) => @eq (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Algebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) A))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Algebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) A)) (@fun_of_simpl (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) (@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))) vA)) vam x) x) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Algebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) A)))) (inPhantom (@left_inverse (@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))) vA)) (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Algebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) A))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Algebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) A))) (@fun_of_simpl (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) (@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))) vA)) vam) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Algebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) A))))) *)
by move=> u Uu; rewrite /= Uu -amE lker0_lfunVK.
(* Goal: GRing.UnitRing.mixin_of (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) *)
exists uam vam => // [u Uu | u v [_ uv1] | u /negbTE/= -> //].
(* Goal: is_true (@pred_of_simpl (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) uam u) *)
(* Goal: @eq (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) (@GRing.mul (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A) u (@fun_of_simpl (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) (@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))) vA)) vam u)) (GRing.one (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) *)
by apply/(lker0P Uu); rewrite !amE -mulrA vamKl // mul1r mulr1.
(* Goal: is_true (@pred_of_simpl (GRing.Ring.sort (@GRing.Algebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) A)) uam u) *)
by apply/lker0P=> w1 w2 /(congr1 (am v)); rewrite !amE -!mulrA uv1 !mulr1.
Qed.
Definition BaseType T :=
fun c vAm & phant_id c (GRing.UnitRing.Class (BaseMixin vAm)) =>
fun (vT : vectType K) & phant vT
& phant_id (Vector.mixin (Vector.class vT)) vAm =>
@GRing.UnitRing.Pack T c.
End DefaultBase.
Section ClassDef.
Variable R : ringType.
Implicit Type phR : phant R.
Record class_of A := Class {
base1 : GRing.UnitAlgebra.class_of R A;
mixin : Vector.mixin_of (GRing.Lmodule.Pack _ base1)
}.
Local Coercion base1 : class_of >-> GRing.UnitAlgebra.class_of.
Definition base2 A c := @Vector.Class _ _ (@base1 A c) (mixin c).
Local Coercion base2 : class_of >-> Vector.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.
Let xT := let: Pack T _ := cT in T.
Notation xclass := (class : class_of xT).
Definition pack :=
fun bT b & phant_id (@GRing.UnitAlgebra.class R phR bT)
(b : GRing.UnitAlgebra.class_of R T) =>
fun mT m & phant_id (@Vector.class R phR mT) (@Vector.Class R T b m) =>
Pack (Phant R) (@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 ringType := @GRing.Ring.Pack cT xclass.
Definition unitRingType := @GRing.UnitRing.Pack cT xclass.
Definition lalgType := @GRing.Lalgebra.Pack R phR cT xclass.
Definition algType := @GRing.Algebra.Pack R phR cT xclass.
Definition unitAlgType := @GRing.UnitAlgebra.Pack R phR cT xclass.
Definition vectType := @Vector.Pack R phR cT xclass.
Definition vect_ringType := @GRing.Ring.Pack vectType xclass.
Definition vect_unitRingType := @GRing.UnitRing.Pack vectType xclass.
Definition vect_lalgType := @GRing.Lalgebra.Pack R phR vectType xclass.
Definition vect_algType := @GRing.Algebra.Pack R phR vectType xclass.
Definition vect_unitAlgType := @GRing.UnitAlgebra.Pack R phR vectType xclass.
End ClassDef.
Module Exports.
Coercion base1 : class_of >-> GRing.UnitAlgebra.class_of.
Coercion base2 : class_of >-> Vector.class_of.
Coercion sort : type >-> Sortclass.
Bind Scope ring_scope with sort.
Coercion eqType : type >-> Equality.type.
Canonical eqType.
Coercion choiceType : type >-> Choice.type.
Canonical choiceType.
Coercion zmodType : type >-> GRing.Zmodule.type.
Canonical zmodType.
Coercion lmodType : type>-> GRing.Lmodule.type.
Canonical lmodType.
Coercion ringType : type >-> GRing.Ring.type.
Canonical ringType.
Coercion unitRingType : type >-> GRing.UnitRing.type.
Canonical unitRingType.
Coercion lalgType : type >-> GRing.Lalgebra.type.
Canonical lalgType.
Coercion algType : type >-> GRing.Algebra.type.
Canonical algType.
Coercion unitAlgType : type >-> GRing.UnitAlgebra.type.
Canonical unitAlgType.
Coercion vectType : type >-> Vector.type.
Canonical vectType.
Canonical vect_ringType.
Canonical vect_unitRingType.
Canonical vect_lalgType.
Canonical vect_algType.
Canonical vect_unitAlgType.
Notation FalgType R := (type (Phant R)).
Notation "[ 'FalgType' R 'of' A ]" := (@pack _ (Phant R) A _ _ id _ _ id)
(at level 0, format "[ 'FalgType' R 'of' A ]") : form_scope.
Notation "[ 'FalgType' R 'of' A 'for' vT ]" :=
(@pack _ (Phant R) A _ _ id vT _ idfun)
(at level 0, format "[ 'FalgType' R 'of' A 'for' vT ]") : form_scope.
Notation FalgUnitRingType T := (@BaseType _ _ T _ _ id _ (Phant T) id).
End Exports.
End Falgebra.
Export Falgebra.Exports.
Notation "1" := (vline 1) : vspace_scope.
Canonical matrix_FalgType (K : fieldType) n := [FalgType K of 'M[K]_n.+1].
Canonical regular_FalgType (R : comUnitRingType) := [FalgType R of R^o].
Lemma regular_fullv (K : fieldType) : (fullv = 1 :> {vspace K^o})%VS.
Proof.
(* Goal: @eq (@Vector.space K (regular_vectType (GRing.Field.ringType K)) (Phant (GRing.regular (GRing.Field.sort K)))) (@fullv K (regular_vectType (GRing.Field.ringType K))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (regular_FalgType (GRing.Field.comUnitRingType K))) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (regular_FalgType (GRing.Field.comUnitRingType K))))) *)
by apply/esym/eqP; rewrite eqEdim subvf dim_vline oner_eq0 dimvf.
Qed.
Section Proper.
Variables (R : ringType) (aT : FalgType R).
Import Vector.InternalTheory.
Lemma FalgType_proper : Vector.dim aT > 0.
Proof.
(* Goal: is_true (leq (S O) (@Vector.dim R (Phant (GRing.Ring.sort R)) (@Falgebra.vectType R (Phant (GRing.Ring.sort R)) aT))) *)
rewrite lt0n; apply: contraNneq (oner_neq0 aT) => aT0.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (@Falgebra.ringType R (Phant (GRing.Ring.sort R)) aT)) (GRing.one (@Falgebra.ringType R (Phant (GRing.Ring.sort R)) aT)) (GRing.zero (GRing.Ring.zmodType (@Falgebra.ringType R (Phant (GRing.Ring.sort R)) aT)))) *)
by apply/eqP/v2r_inj; do 2!move: (v2r _); rewrite aT0 => u v; rewrite !thinmx0.
Qed.
End Proper.
Module FalgLfun.
Section FalgLfun.
Variable (R : comRingType) (aT : FalgType R).
Implicit Types f g : 'End(aT).
Canonical Falg_fun_ringType := lfun_ringType (FalgType_proper aT).
Canonical Falg_fun_lalgType := lfun_lalgType (FalgType_proper aT).
Canonical Falg_fun_algType := lfun_algType (FalgType_proper aT).
Lemma lfun_mulE f g u : (f * g) u = g (f u). Proof. exact: lfunE. Qed.
Proof.
(* Goal: @eq (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@Vector.lmodType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@Falgebra.vectType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT))) (@fun_of_lfun (GRing.ComRing.ringType R) (@Falgebra.vectType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@Falgebra.vectType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) aT) (@GRing.mul Falg_fun_ringType f g) u) (@fun_of_lfun (GRing.ComRing.ringType R) (@Falgebra.vectType (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Falgebra.vectType (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) g (@fun_of_lfun (GRing.ComRing.ringType R) (@Falgebra.vectType (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) (@Falgebra.vectType (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) aT) f u)) *)
exact: lfunE.
Qed.
End FalgLfun.
Section InvLfun.
Variable (K : fieldType) (aT : FalgType K).
Implicit Types f g : 'End(aT).
Definition lfun_invr f := if lker f == 0%VS then f^-1%VF else f.
Lemma lfun_mulVr f : lker f == 0%VS -> f^-1%VF * f = 1.
Proof.
(* Goal: forall _ : is_true (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), @eq (GRing.Ring.sort (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (@GRing.mul (@Falg_fun_ringType (GRing.Field.comRingType K) aT) (@inv_lfun K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) f) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) *)
exact: lker0_compfV.
Qed.
Lemma lfun_mulrV f : lker f == 0%VS -> f * f^-1%VF = 1.
Proof.
(* Goal: forall _ : is_true (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), @eq (GRing.Ring.sort (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (@GRing.mul (@Falg_fun_ringType (GRing.Field.comRingType K) aT) f (@inv_lfun K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) *)
exact: lker0_compVf.
Qed.
Fact lfun_mulRVr f : lker f == 0%VS -> lfun_invr f * f = 1.
Proof.
(* Goal: forall _ : is_true (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), @eq (GRing.Ring.sort (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (@GRing.mul (@Falg_fun_ringType (GRing.Field.comRingType K) aT) (lfun_invr f) f) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) *)
by move=> Uf; rewrite /lfun_invr Uf lfun_mulVr.
Qed.
Fact lfun_mulrRV f : lker f == 0%VS -> f * lfun_invr f = 1.
Proof.
(* Goal: forall _ : is_true (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), @eq (GRing.Ring.sort (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (@GRing.mul (@Falg_fun_ringType (GRing.Field.comRingType K) aT) f (lfun_invr f)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) *)
by move=> Uf; rewrite /lfun_invr Uf lfun_mulrV.
Qed.
Fact lfun_unitrP f g : g * f = 1 /\ f * g = 1 -> lker f == 0%VS.
Proof.
(* Goal: forall _ : and (@eq (GRing.Ring.sort (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (@GRing.mul (@Falg_fun_ringType (GRing.Field.comRingType K) aT) g f) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))) (@eq (GRing.Ring.sort (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (@GRing.mul (@Falg_fun_ringType (GRing.Field.comRingType K) aT) f g) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))), is_true (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
case=> _ fK; apply/lker0P; apply: can_inj (g) _ => 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) g (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f u)) u *)
by rewrite -lfun_mulE fK lfunE.
Qed.
Lemma lfun_invr_out f : lker f != 0%VS -> lfun_invr f = f.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))), @eq (@Vector.hom (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (lfun_invr f) f *)
by rewrite /lfun_invr => /negPf->.
Qed.
Definition lfun_unitRingMixin :=
UnitRingMixin lfun_mulRVr lfun_mulrRV lfun_unitrP lfun_invr_out.
Canonical lfun_unitRingType := UnitRingType 'End(aT) lfun_unitRingMixin.
Canonical lfun_unitAlgType := [unitAlgType K of 'End(aT)].
Canonical Falg_fun_FalgType := [FalgType K of 'End(aT)].
Lemma lfun_invE f : lker f == 0%VS -> f^-1%VF = f^-1.
Proof.
(* Goal: forall _ : is_true (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), @eq (@Vector.hom (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@inv_lfun K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) f) (@GRing.inv lfun_unitRingType f) *)
by rewrite /f^-1 /= /lfun_invr => ->.
Qed.
End InvLfun.
End FalgLfun.
Section FalgebraTheory.
Variables (K : fieldType) (aT : FalgType K).
Implicit Types (u v : aT) (U V W : {vspace aT}).
Import FalgLfun.
Definition amull u : 'End(aT) := linfun (u \*o @idfun aT).
Definition amulr u : 'End(aT) := linfun (u \o* @idfun aT).
Lemma amull_inj : injective amull.
Proof.
(* Goal: @injective (@Vector.hom (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) amull *)
by move=> u v /lfunP/(_ 1); rewrite !lfunE /= !mulr1.
Qed.
Lemma amulr_inj : injective amulr.
Proof.
(* Goal: @injective (@Vector.hom (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) amulr *)
by move=> u v /lfunP/(_ 1); rewrite !lfunE /= !mul1r.
Qed.
Fact amull_is_linear : linear amull.
Proof.
(* Goal: @GRing.Linear.axiom (GRing.Field.ringType K) (@Falgebra.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.scale (GRing.Field.ringType K) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) amull (@GRing.Scale.scale_law (GRing.Field.ringType K) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (@GRing.scale (GRing.Field.ringType K) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) *)
move=> a u v; apply/lfunP => w.
(* 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (amull (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))) (@GRing.scale (GRing.Field.ringType K) (@Falgebra.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) a u) v)) w) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.scale (GRing.Field.ringType K) (@lfun_lmodType (GRing.Field.comRingType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) a (amull u)) (amull v)) w) *)
by rewrite !lfunE /= scale_lfunE !lfunE /= mulrDl scalerAl.
Qed.
Canonical amull_additive := Eval hnf in Additive amull_is_linear.
Canonical amull_linear := Eval hnf in AddLinear amull_is_linear.
Lemma amull1 : amull 1 = \1%VF.
Proof.
(* Goal: @eq (@Vector.hom (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (amull (GRing.one (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@id_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) *)
by apply/lfunP => z; rewrite id_lfunE lfunE /= mul1r.
Qed.
Lemma amullM u v : (amull (u * v) = amull v * amull u)%VF.
Proof.
(* Goal: @eq (@Vector.hom (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (amull (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v)) (@GRing.mul (@Falg_fun_ringType (GRing.Field.comRingType K) aT) (amull v) (amull u)) *)
by apply/lfunP => w; rewrite comp_lfunE !lfunE /= mulrA.
Qed.
Lemma amulr_is_lrmorphism : lrmorphism amulr.
Proof.
(* Goal: @GRing.LRMorphism.class_of (GRing.Field.ringType K) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falg_fun_lalgType (GRing.Field.comRingType K) aT)) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falg_fun_lalgType (GRing.Field.comRingType K) aT))) amulr *)
split=> [|a u]; last by apply/lfunP=> w; rewrite scale_lfunE !lfunE /= scalerAr.
(* Goal: @GRing.RMorphism.class_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falg_fun_lalgType (GRing.Field.comRingType K) aT)) amulr *)
split=> [u v|]; first by apply/lfunP => w; do 3!rewrite !lfunE /= ?mulrBr.
(* Goal: @GRing.RMorphism.mixin_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falg_fun_lalgType (GRing.Field.comRingType K) aT)) amulr *)
split=> [u v|]; last by apply/lfunP=> w; rewrite id_lfunE !lfunE /= mulr1.
(* Goal: @eq (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falg_fun_lalgType (GRing.Field.comRingType K) aT))) (amulr (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) u v)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falg_fun_lalgType (GRing.Field.comRingType K) aT)) (amulr u) (amulr v)) *)
by apply/lfunP=> w; rewrite comp_lfunE !lfunE /= mulrA.
Qed.
Canonical amulr_additive := Eval hnf in Additive amulr_is_lrmorphism.
Canonical amulr_linear := Eval hnf in AddLinear amulr_is_lrmorphism.
Canonical amulr_rmorphism := Eval hnf in AddRMorphism amulr_is_lrmorphism.
Canonical amulr_lrmorphism := Eval hnf in LRMorphism amulr_is_lrmorphism.
Lemma lker0_amull u : u \is a GRing.unit -> lker (amull u) == 0%VS.
Proof.
(* Goal: forall _ : is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@has_quality (S O) (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.unit (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), is_true (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (amull u)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
by move=> Uu; apply/lker0P=> v w; rewrite !lfunE; apply: mulrI.
Qed.
Lemma lker0_amulr u : u \is a GRing.unit -> lker (amulr u) == 0%VS.
Proof.
(* Goal: forall _ : is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@has_quality (S O) (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.unit (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), is_true (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (amulr u)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
by move=> Uu; apply/lker0P=> v w; rewrite !lfunE; apply: mulIr.
Qed.
Lemma lfun1_poly (p : {poly aT}) : map_poly \1%VF p = p.
Proof.
(* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))))) (@map_poly (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@id_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) p) p *)
by apply: map_poly_id => u _; apply: id_lfunE.
Qed.
Definition prodv :=
locked_with prodv_key (fun U V => <<allpairs *%R (vbasis U) (vbasis V)>>%VS).
Canonical prodv_unlockable := [unlockable fun prodv].
Local Notation "A * B" := (prodv A B) : vspace_scope.
Lemma memv_mul U V : {in U & V, forall u v, u * v \in (U * V)%VS}.
Proof.
(* Goal: @prop_in11 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V)) (fun u v : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (prodv U V))))) (inPhantom (forall u v : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT, is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (prodv U V)))))) *)
move=> u v /coord_vbasis-> /coord_vbasis->.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (Finite.sort (ordinal_finType (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (index_enum (ordinal_finType (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U))) (fun i : ordinal (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (ordinal (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@coord K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) i u) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (@nat_of_ord (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) i))))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (Finite.sort (ordinal_finType (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (index_enum (ordinal_finType (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V))) (fun i : ordinal (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) => @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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (ordinal (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V)) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@coord K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V)) (@nat_of_ord (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) i)))))) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (prodv U V)))) *)
rewrite mulr_suml; apply: memv_suml => i _.
(* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@coord K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) i u) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (@nat_of_ord (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) i))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (Finite.sort (ordinal_finType (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (index_enum (ordinal_finType (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V))) (fun i : ordinal (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) => @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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (ordinal (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V)) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) true (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@coord K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V)) (@nat_of_ord (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) i)))))) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (prodv U V)))) *)
rewrite mulr_sumr; apply: memv_suml => j _.
(* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@coord K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) i u) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (@nat_of_ord (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) i))) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@coord K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) j 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V)) (@nat_of_ord (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) j)))) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (prodv U V)))) *)
rewrite -scalerAl -scalerAr !memvZ // [prodv]unlock memv_span //.
(* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@GRing.Algebra.ringType (GRing.ComRing.ringType (GRing.Field.comRingType K)) (Phant (GRing.ComRing.sort (GRing.Field.comRingType K))) (@Falgebra.algType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (@nat_of_ord (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) i)) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V)) (@nat_of_ord (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) j))) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@allpairs (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V))))) *)
by apply/allpairsP; exists ((vbasis U)`_i, (vbasis V)`_j); rewrite !memt_nth.
Qed.
Lemma prodvP {U V W} :
reflect {in U & V, forall u v, u * v \in W} (U * V <= W)%VS.
Proof.
(* Goal: Bool.reflect (@prop_in11 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V)) (fun u v : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) W)))) (inPhantom (forall u v : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT, is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) W)))))) (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V) W) *)
apply: (iffP idP) => [sUVW u v Uu Vv | sUVW].
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V) W) *)
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) W))) *)
by rewrite (subvP sUVW) ?memv_mul.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V) W) *)
rewrite [prodv]unlock; apply/span_subvP=> _ /allpairsP[[u v] /= [Uu Vv ->]].
(* Goal: is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u v) (@mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) W))) *)
by rewrite sUVW ?vbasis_mem.
Qed.
Lemma prodv_line u v : (<[u]> * <[v]> = <[u * v]>)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v)) *)
apply: subv_anti; rewrite -memvE memv_mul ?memv_line // andbT.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v))) *)
apply/prodvP=> _ _ /vlineP[a ->] /vlineP[b ->].
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) a u) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) b v)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v))))) *)
by rewrite -scalerAr -scalerAl !memvZ ?memv_line.
Qed.
Lemma dimv1: \dim (1%VS : {vspace aT}) = 1%N.
Proof.
(* Goal: @eq nat (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) : @Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (S O) *)
by rewrite dim_vline oner_neq0.
Qed.
Lemma dim_prodv U V : \dim (U * V) <= \dim U * \dim V.
Proof.
(* Goal: is_true (leq (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V)) (muln (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V))) *)
by rewrite unlock (leq_trans (dim_span _)) ?size_tuple.
Qed.
Lemma vspace1_neq0 : (1 != 0 :> {vspace aT})%VS.
Proof.
(* Goal: is_true (negb (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) : @Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) : @Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
by rewrite -dimv_eq0 dimv1.
Qed.
Lemma vbasis1 : exists2 k, k != 0 & vbasis 1 = [:: k%:A] :> seq aT.
Proof.
(* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K)))) (fun k : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) k (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K)))))) (fun k : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) => @eq (list (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@cons (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))))) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) k (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))) (@nil (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))))))))) *)
move: (vbasis 1) (@vbasisP K aT 1); rewrite dim_vline oner_neq0.
(* Goal: forall (vbasis : tuple_of (nat_of_bool true) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (_ : is_true (@basis_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@tval (nat_of_bool true) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) vbasis))), @ex2 (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K)))) (fun k : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) k (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K)))))) (fun k : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) => @eq (list (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@tval (nat_of_bool true) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) vbasis) (@cons (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))))) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) k (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))) (@nil (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))))))))) *)
case/tupleP=> x X0; rewrite {X0}tuple0 => defX; have Xx := mem_head x nil.
(* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K)))) (fun k : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) k (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K)))))) (fun k : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) => @eq (list (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@tval (nat_of_bool true) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@tuple (S O) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@cons_tuple O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) x (@tuple O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (nil_tuple (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (fun sP : is_true (@eq_op nat_eqType (@size (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@tval O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (nil_tuple (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) O) => @Tuple O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@nil (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) sP))) (fun sP : is_true (@eq_op nat_eqType (@size (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@tval (S O) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@cons_tuple O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) x (@tuple O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (nil_tuple (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (fun sP : is_true (@eq_op nat_eqType (@size (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@tval O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (nil_tuple (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) O) => @Tuple O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@nil (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) sP))))) (S O)) => @Tuple (S O) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@cons (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) x (@tval O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@tuple O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (nil_tuple (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (fun sP0 : is_true (@eq_op nat_eqType (@size (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@tval O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (nil_tuple (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) O) => @Tuple O (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@nil (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) sP0)))) sP))) (@cons (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))))) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) k (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))) (@nil (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))))))))) *)
have /vlineP[k def_x] := basis_mem defX Xx; exists k; last by rewrite def_x.
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType K))) k (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType K))))) *)
by have:= basis_not0 defX Xx; rewrite def_x scaler_eq0 oner_eq0 orbF.
Qed.
Lemma prod0v : left_zero 0%VS prodv.
Proof.
(* Goal: @left_zero (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) prodv *)
move=> U; apply/eqP; rewrite -dimv_eq0 -leqn0 (leq_trans (dim_prodv 0 U)) //.
(* Goal: is_true (leq (muln (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) O) *)
by rewrite dimv0.
Qed.
Lemma prodv0 : right_zero 0%VS prodv.
Proof.
(* Goal: @right_zero (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) prodv *)
move=> U; apply/eqP; rewrite -dimv_eq0 -leqn0 (leq_trans (dim_prodv U 0)) //.
(* Goal: is_true (leq (muln (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) O) *)
by rewrite dimv0 muln0.
Qed.
Canonical prodv_muloid := Monoid.MulLaw prod0v prodv0.
Lemma prod1v : left_id 1%VS prodv.
Proof.
(* Goal: @left_id (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) prodv *)
move=> U; apply/subv_anti/andP; split.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) U)) *)
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) U) U) *)
by apply/prodvP=> _ u /vlineP[a ->] Uu; rewrite mulr_algl memvZ.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) U)) *)
by apply/subvP=> u Uu; rewrite -[u]mul1r memv_mul ?memv_line.
Qed.
Lemma prodv1 : right_id 1%VS prodv.
Proof.
(* Goal: @right_id (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) prodv *)
move=> U; apply/subv_anti/andP; split.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (prodv U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) U) *)
by apply/prodvP=> u _ Uu /vlineP[a ->]; rewrite mulr_algr memvZ.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (prodv U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
by apply/subvP=> u Uu; rewrite -[u]mulr1 memv_mul ?memv_line.
Qed.
Lemma prodvS U1 U2 V1 V2 : (U1 <= U2 -> V1 <= V2 -> U1 * V1 <= U2 * V2)%VS.
Proof.
(* Goal: forall (_ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U1 U2)) (_ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V1 V2)), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U1 V1) (prodv U2 V2)) *)
move/subvP=> sU12 /subvP sV12; apply/prodvP=> u v Uu Vv.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (prodv U2 V2)))) *)
by rewrite memv_mul ?sU12 ?sV12.
Qed.
Lemma prodvSl U1 U2 V : (U1 <= U2 -> U1 * V <= U2 * V)%VS.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U1 U2), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U1 V) (prodv U2 V)) *)
by move/prodvS->.
Qed.
Lemma prodvSr U V1 V2 : (V1 <= V2 -> U * V1 <= U * V2)%VS.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V1 V2), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V1) (prodv U V2)) *)
exact: prodvS.
Qed.
Lemma prodvDl : left_distributive prodv addv.
Proof.
(* Goal: @left_distributive (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) prodv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) *)
move=> U1 U2 V; apply/esym/subv_anti/andP; split.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U1 U2) V) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U1 V) (prodv U2 V))) *)
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U1 V) (prodv U2 V)) (prodv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U1 U2) V)) *)
by rewrite subv_add 2?prodvS ?addvSl ?addvSr.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U1 U2) V) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U1 V) (prodv U2 V))) *)
apply/prodvP=> _ v /memv_addP[u1 Uu1 [u2 Uu2 ->]] Vv.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u1 u2) v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U1 V) (prodv U2 V))))) *)
by rewrite mulrDl memv_add ?memv_mul.
Qed.
Lemma prodvDr : right_distributive prodv addv.
Proof.
(* Goal: @right_distributive (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) prodv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) *)
move=> U V1 V2; apply/esym/subv_anti/andP; split.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V1 V2)) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V1) (prodv U V2))) *)
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V1) (prodv U V2)) (prodv U (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V1 V2))) *)
by rewrite subv_add 2?prodvS ?addvSl ?addvSr.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V1 V2)) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V1) (prodv U V2))) *)
apply/prodvP=> u _ Uu /memv_addP[v1 Vv1 [v2 Vv2 ->]].
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@GRing.add (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) v1 v2)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (prodv U V1) (prodv U V2))))) *)
by rewrite mulrDr memv_add ?memv_mul.
Qed.
Canonical addv_addoid := Monoid.AddLaw prodvDl prodvDr.
Lemma prodvA : associative prodv.
Proof.
(* Goal: @associative (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) prodv *)
move=> U V W; rewrite -(span_basis (vbasisP U)) span_def !big_distrl /=.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (fun i : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i) (prodv V W)))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (fun i : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (prodv (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i) V) W))) *)
apply: eq_bigr => u _; rewrite -(span_basis (vbasisP W)) span_def !big_distrr.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) W)) (fun i : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) i (@Monoid.operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Monoid.com_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Monoid.add_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Monoid.mul_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) prodv_muloid) addv_addoid))) true (@Monoid.mul_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) prodv_muloid (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (@Monoid.mul_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) prodv_muloid V (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i))))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) W)) (fun i : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) i (@Monoid.operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Monoid.com_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Monoid.add_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@Monoid.mul_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) prodv_muloid) addv_addoid))) true (@Monoid.mul_operator (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) prodv_muloid (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) V) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i)))) *)
apply: eq_bigr => w _; rewrite -(span_basis (vbasisP V)) span_def /=.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (prodv (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V)) (fun u : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) w))) (prodv (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V)) (fun u : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) w)) *)
rewrite !(big_distrl, big_distrr) /=; apply: eq_bigr => v _.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) w))) (prodv (prodv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) w)) *)
by rewrite !prodv_line mulrA.
Qed.
Canonical prodv_monoid := Monoid.Law prodvA prod1v prodv1.
Definition expv U n := iterop n.+1.-1 prodv U 1%VS.
Lemma expv1 U : (U ^+ 1 = U)%VS. Proof. by []. Qed.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv U (S O)) U *)
by [].
Qed.
Lemma expvSl U n : (U ^+ n.+1 = U * U ^+ n)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv U (S n)) (prodv U (expv U n)) *)
by case: n => //; rewrite prodv1.
Qed.
Lemma expv0n n : (0 ^+ n = if n is _.+1 then 0 else 1)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) n) match n with | O => @vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) | S n => @vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) end *)
by case: n => // n; rewrite expvSl prod0v.
Qed.
Lemma expv1n n : (1 ^+ n = 1)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) *)
by elim: n => // n IHn; rewrite expvSl IHn prodv1.
Qed.
Lemma expvD U m n : (U ^+ (m + n) = U ^+ m * U ^+ n)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv U (addn m n)) (prodv (expv U m) (expv U n)) *)
by elim: m => [|m IHm]; rewrite ?prod1v // !expvSl IHm prodvA.
Qed.
Lemma expvSr U n : (U ^+ n.+1 = U ^+ n * U)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv U (S n)) (prodv (expv U n) U) *)
by rewrite -addn1 expvD.
Qed.
Lemma expvM U m n : (U ^+ (m * n) = U ^+ m ^+ n)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv U (muln m n)) (expv (expv U m) n) *)
by elim: n => [|n IHn]; rewrite ?muln0 // mulnS expvD IHn expvSl.
Qed.
Lemma expvS U V n : (U <= V -> U ^+ n <= V ^+ n)%VS.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (expv U n) (expv V n)) *)
move=> sUV; elim: n => [|n IHn]; first by rewrite !expv0 subvv.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (expv U (S n)) (expv V (S n))) *)
by rewrite !expvSl prodvS.
Qed.
Lemma expv_line u n : (<[u]> ^+ n = <[u ^+ n]>)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) n) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.exp (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u n)) *)
elim: n => [|n IH]; first by rewrite expr0 expv0.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (expv (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (S n)) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.exp (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (S n))) *)
by rewrite exprS expvSl IH prodv_line.
Qed.
Definition centraliser1_vspace u := lker (amulr u - amull u).
Local Notation "'C [ u ]" := (centraliser1_vspace u) : vspace_scope.
Definition centraliser_vspace V := (\bigcap_i 'C[tnth (vbasis V) i])%VS.
Local Notation "'C ( V )" := (centraliser_vspace V) : vspace_scope.
Definition center_vspace V := (V :&: 'C(V))%VS.
Local Notation "'Z ( V )" := (center_vspace V) : vspace_scope.
Lemma cent1vP u v : reflect (u * v = v * u) (u \in 'C[v]%VS).
Proof.
(* Goal: Bool.reflect (@eq (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v u)) (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (centraliser1_vspace v)))) *)
by rewrite (sameP eqlfunP eqP) !lfunE /=; apply: eqP.
Qed.
Lemma cent1v_id u : u \in 'C[u]%VS. Proof. exact/cent1vP. Qed.
Proof.
(* Goal: is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (centraliser1_vspace u)))) *)
exact/cent1vP.
Qed.
Lemma cent1vC u v : (u \in 'C[v])%VS = (v \in 'C[u])%VS.
Proof.
(* Goal: @eq bool (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (centraliser1_vspace v)))) (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (centraliser1_vspace u)))) *)
exact/cent1vP/cent1vP.
Qed.
Lemma centvP u V : reflect {in V, forall v, u * v = v * u} (u \in 'C(V))%VS.
Lemma centvsP U V : reflect {in U & V, commutative *%R} (U <= 'C(V))%VS.
Proof.
(* Goal: Bool.reflect (@prop_in11 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) V)) (fun x y : GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @eq (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x y) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) y x)) (inPhantom (@commutative (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (centraliser_vspace V)) *)
by apply: (iffP subvP) => [cUV u v | cUV u] /cUV-/centvP; apply.
Qed.
Lemma subv_cent1 U v : (U <= 'C[v])%VS = (v \in 'C(U)%VS).
Proof.
(* Goal: @eq bool (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (centraliser1_vspace v)) (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (centraliser_vspace U)))) *)
by apply/subvP/centvP=> cUv u Uu; apply/cent1vP; rewrite 1?cent1vC cUv.
Qed.
Lemma centv1 V : 1 \in 'C(V)%VS.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (centraliser_vspace V)))) *)
by apply/centvP=> v _; rewrite commr1.
Qed.
Lemma centvX V u n : u \in 'C(V)%VS -> u ^+ n \in 'C(V)%VS.
Proof.
(* Goal: forall _ : is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (centraliser_vspace V)))), is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.exp (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u n) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (centraliser_vspace V)))) *)
by move/centvP=> cVu; apply/centvP=> v /cVu/esym/commrX->.
Qed.
Lemma centvC U V : (U <= 'C(V))%VS = (V <= 'C(U))%VS.
Proof.
(* Goal: @eq bool (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (centraliser_vspace V)) (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (centraliser_vspace U)) *)
by apply/centvsP/centvsP=> cUV u v UVu /cUV->.
Qed.
Lemma cent_centerv V : (V <= 'C('Z(V)))%VS.
Proof.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (centraliser_vspace (center_vspace V))) *)
by rewrite centvC capvSr.
Qed.
Definition is_algid e U :=
[/\ e \in U, e != 0 & {in U, forall u, e * u = u /\ u * e = u}].
Fact algid_decidable U : decidable (exists e, is_algid e U).
Definition has_algid : pred {vspace aT} := algid_decidable.
Lemma has_algidP {U} : reflect (exists e, is_algid e U) (has_algid U).
Proof.
(* Goal: Bool.reflect (@ex (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (fun e : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => is_algid e U)) (has_algid U) *)
exact: sumboolP.
Qed.
Lemma has_algid1 U : 1 \in U -> has_algid U.
Proof.
(* Goal: forall _ : is_true (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U))), is_true (has_algid U) *)
move=> U1; apply/has_algidP; exists 1; split; rewrite ?oner_eq0 // => u _.
(* Goal: and (@eq (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u) u) (@eq (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) u) *)
by rewrite mulr1 mul1r.
Qed.
Definition is_aspace U := has_algid U && (U * U <= U)%VS.
Structure aspace := ASpace {asval :> {vspace aT}; _ : is_aspace asval}.
Definition aspace_of of phant aT := aspace.
Local Notation "{ 'aspace' T }" := (aspace_of (Phant T)) : type_scope.
Canonical aspace_subType := Eval hnf in [subType for asval].
Definition aspace_eqMixin := [eqMixin of aspace by <:].
Canonical aspace_eqType := Eval hnf in EqType aspace aspace_eqMixin.
Definition aspace_choiceMixin := [choiceMixin of aspace by <:].
Canonical aspace_choiceType := Eval hnf in ChoiceType aspace aspace_choiceMixin.
Canonical aspace_of_subType := Eval hnf in [subType of {aspace aT}].
Canonical aspace_of_eqType := Eval hnf in [eqType of {aspace aT}].
Canonical aspace_of_choiceType := Eval hnf in [choiceType of {aspace aT}].
Definition clone_aspace U (A : {aspace aT}) :=
fun algU & phant_id algU (valP A) => @ASpace U algU : {aspace aT}.
Fact aspace1_subproof : is_aspace 1.
Proof.
(* Goal: is_true (is_aspace (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) *)
by rewrite /is_aspace prod1v -memvE has_algid1 memv_line.
Qed.
Canonical aspace1 : {aspace aT} := ASpace aspace1_subproof.
Lemma aspacef_subproof : is_aspace fullv.
Proof.
(* Goal: is_true (is_aspace (@fullv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) *)
by rewrite /is_aspace subvf has_algid1 ?memvf.
Qed.
Canonical aspacef : {aspace aT} := ASpace aspacef_subproof.
Lemma polyOver1P p :
reflect (exists q, p = map_poly (in_alg aT) q) (p \is a polyOver 1%VS).
Proof.
(* Goal: Bool.reflect (@ex (@poly_of (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K)))) (fun q : @poly_of (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) => @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))))) p (@map_poly (GRing.Field.ringType K) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.in_alg_head (GRing.Field.ringType K) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) q))) (@in_mem (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))))) p (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))))) *)
apply: (iffP idP) => [/allP/=Qp | [q ->]]; last first.
(* Goal: @ex (@poly_of (GRing.Field.ringType K) (Phant (GRing.Field.sort K))) (fun q : @poly_of (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) => @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) p (@map_poly (GRing.Field.ringType K) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.in_alg_head (GRing.Field.ringType K) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) q)) *)
(* Goal: is_true (@in_mem (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (Phant (GRing.Ring.sort (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT))))) (@map_poly (GRing.Field.ringType K) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.in_alg_head (GRing.Field.ringType K) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) q) (@mem (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (predPredType (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@has_quality (S O) (@poly_of (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@polyOver (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))))) *)
by apply/polyOverP=> j; rewrite coef_map rpredZ ?memv_line.
(* Goal: @ex (@poly_of (GRing.Field.ringType K) (Phant (GRing.Field.sort K))) (fun q : @poly_of (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) => @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) p (@map_poly (GRing.Field.ringType K) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.in_alg_head (GRing.Field.ringType K) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) q)) *)
exists (map_poly (coord [tuple 1] 0) p).
(* Goal: @eq (@poly_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) p (@map_poly (GRing.Field.ringType K) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.in_alg_head (GRing.Field.ringType K) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@map_poly (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.Field.ringType K) (@coord K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (S O) (@tuple (S O) (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@cons_tuple O (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (nil_tuple (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (fun sP : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@tval (S O) (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@cons_tuple O (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (nil_tuple (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (S O)) => @Tuple (S O) (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@cons (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@nil (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) sP)) (GRing.zero (Zp_zmodType O))) p)) *)
rewrite -map_poly_comp map_poly_id // => _ /Qp/vlineP[a ->] /=.
(* Goal: @eq (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@coord K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (S O) (@tuple (S O) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@cons_tuple O (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (nil_tuple (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (fun sP : is_true (@eq_op nat_eqType (S O) (S O)) => @Tuple (S O) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@cons (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@nil (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) sP)) (GRing.zero (Zp_zmodType O)) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) a (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@GRing.scale (GRing.Field.ringType K) (@Vector.lmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) a (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) *)
by rewrite linearZ /= (coord_free 0) ?mulr1 // seq1_free ?oner_eq0.
Qed.
End FalgebraTheory.
Delimit Scope aspace_scope with AS.
Bind Scope aspace_scope with aspace.
Bind Scope aspace_scope with aspace_of.
Arguments asval {K aT} a%AS.
Arguments clone_aspace [K aT U%VS A%AS algU] _.
Notation "{ 'aspace' T }" := (aspace_of (Phant T)) : type_scope.
Notation "A * B" := (prodv A B) : vspace_scope.
Notation "A ^+ n" := (expv A n) : vspace_scope.
Notation "'C [ u ]" := (centraliser1_vspace u) : vspace_scope.
Notation "'C_ U [ v ]" := (capv U 'C[v]) : vspace_scope.
Notation "'C_ ( U ) [ v ]" := (capv U 'C[v]) (only parsing) : vspace_scope.
Notation "'C ( V )" := (centraliser_vspace V) : vspace_scope.
Notation "'C_ U ( V )" := (capv U 'C(V)) : vspace_scope.
Notation "'C_ ( U ) ( V )" := (capv U 'C(V)) (only parsing) : vspace_scope.
Notation "'Z ( V )" := (center_vspace V) : vspace_scope.
Notation "1" := (aspace1 _) : aspace_scope.
Notation "{ : aT }" := (aspacef aT) : aspace_scope.
Notation "[ 'aspace' 'of' U ]" := (@clone_aspace _ _ U _ _ id)
(at level 0, format "[ 'aspace' 'of' U ]") : form_scope.
Notation "[ 'aspace' 'of' U 'for' A ]" := (@clone_aspace _ _ U A _ idfun)
(at level 0, format "[ 'aspace' 'of' U 'for' A ]") : form_scope.
Arguments prodvP {K aT U V W}.
Arguments cent1vP {K aT u v}.
Arguments centvP {K aT u V}.
Arguments centvsP {K aT U V}.
Arguments has_algidP {K aT U}.
Arguments polyOver1P {K aT p}.
Section AspaceTheory.
Variables (K : fieldType) (aT : FalgType K).
Implicit Types (u v e : aT) (U V : {vspace aT}) (A B : {aspace aT}).
Import FalgLfun.
Lemma algid_subproof U :
{e | e \in U
& has_algid U ==> (U <= lker (amull e - 1) :&: lker (amulr e - 1))%VS}.
Proof.
(* Goal: @sig2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (fun e : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) e (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U)))) (fun e : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => is_true (implb (@has_algid K aT U) (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@capv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amull K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amulr K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))))))) *)
apply: sig2W; case: has_algidP => [[e]|]; last by exists 0; rewrite ?mem0v.
(* Goal: forall _ : @is_algid K aT e U, @ex2 (Choice.sort (@Vector.choiceType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (fun x : Choice.sort (@Vector.choiceType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) => is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U)))) (fun x : Choice.sort (@Vector.choiceType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) => is_true (implb true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@capv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amull K aT x) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amulr K aT x) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))))))) *)
case=> Ae _ idAe; exists e => //; apply/subvP=> u /idAe[eu_u ue_u].
(* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@capv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amull K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amulr K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))))))) *)
by rewrite memv_cap !memv_ker !lfun_simp /= eu_u ue_u subrr eqxx.
Qed.
Definition algid U := s2val (algid_subproof U).
Lemma memv_algid U : algid U \in U.
Proof.
(* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid U) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U))) *)
by rewrite /algid; case: algid_subproof.
Qed.
Lemma algidl A : {in A, left_id (algid A) *%R}.
Proof.
(* Goal: @prop_in1 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A))) (fun x : GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @eq (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (algid (@asval K aT A)) x) x) (inPhantom (@left_id (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@asval K aT A)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) *)
rewrite /algid; case: algid_subproof => e _ /=; have /andP[-> _] := valP A.
(* Goal: forall _ : is_true (implb true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) (@capv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amull K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amulr K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT)))))))), @prop_in1 (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A))) (fun x : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @eq (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) e x) x) (inPhantom (@left_id (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) e (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) *)
move/subvP=> idAe u /idAe/memv_capP[].
(* Goal: forall (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amull K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))))))) (_ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amulr K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))))))), @eq (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) e u) u *)
by rewrite memv_ker !lfun_simp /= subr_eq0 => /eqP.
Qed.
Lemma algidr A : {in A, right_id (algid A) *%R}.
Proof.
(* Goal: @prop_in1 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A))) (fun x : GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @eq (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x (algid (@asval K aT A))) x) (inPhantom (@right_id (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@asval K aT A)) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) *)
rewrite /algid; case: algid_subproof => e _ /=; have /andP[-> _] := valP A.
(* Goal: forall _ : is_true (implb true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) (@capv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amull K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT))))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amulr K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT)))))))), @prop_in1 (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A))) (fun x : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @eq (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x e) x) (inPhantom (@right_id (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) e (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) *)
move/subvP=> idAe u /idAe/memv_capP[_].
(* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@amulr K aT e) (@GRing.opp (GRing.Ring.zmodType (@Falg_fun_ringType (GRing.Field.comRingType K) aT)) (GRing.one (@Falg_fun_ringType (GRing.Field.comRingType K) aT)))))))), @eq (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u e) u *)
by rewrite memv_ker !lfun_simp /= subr_eq0 => /eqP.
Qed.
Lemma unitr_algid1 A u : u \in A -> u \is a GRing.unit -> algid A = 1.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A))))) (_ : is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@has_quality (S O) (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.unit (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))), @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@asval K aT A)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) *)
by move=> Eu /mulrI; apply; rewrite mulr1 algidr.
Qed.
Lemma algid_eq1 A : (algid A == 1) = (1 \in A).
Proof.
(* Goal: @eq bool (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@asval K aT A)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A)))) *)
by apply/eqP/idP=> [<- | /algidr <-]; rewrite ?memv_algid ?mul1r.
Qed.
Lemma algid_neq0 A : algid A != 0.
Proof.
(* Goal: is_true (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@asval K aT A)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
have /andP[/has_algidP[u [Au nz_u _]] _] := valP A.
(* Goal: is_true (negb (@eq_op (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@asval K aT A)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
by apply: contraNneq nz_u => e0; rewrite -(algidr Au) e0 mulr0.
Qed.
Lemma dim_algid A : \dim <[algid A]> = 1%N.
Proof.
(* Goal: @eq nat (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (algid (@asval K aT A)))) (S O) *)
by rewrite dim_vline algid_neq0.
Qed.
Lemma adim_gt0 A : (0 < \dim A)%N.
Proof.
(* Goal: is_true (leq (S O) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A))) *)
by rewrite -(dim_algid A) dimvS // -memvE ?memv_algid.
Qed.
Lemma not_asubv0 A : ~~ (A <= 0)%VS.
Proof.
(* Goal: is_true (negb (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
by rewrite subv0 -dimv_eq0 -lt0n adim_gt0.
Qed.
Lemma adim1P {A} : reflect (A = <[algid A]>%VS :> {vspace aT}) (\dim A == 1%N).
Proof.
(* Goal: Bool.reflect (@eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@asval K aT A) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (algid (@asval K aT A)))) (@eq_op nat_eqType (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (S O)) *)
rewrite eqn_leq adim_gt0 -(memv_algid A) andbC -(dim_algid A) -eqEdim eq_sym.
(* Goal: Bool.reflect (@eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@asval K aT A) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (algid (@asval K aT A)))) (@eq_op (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (algid (@asval K aT A)))) *)
exact: eqP.
Qed.
Lemma asubv A : (A * A <= A)%VS.
Proof.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@asval K aT A) (@asval K aT A)) (@asval K aT A)) *)
by have /andP[] := valP A.
Qed.
Lemma memvM A : {in A &, forall u v, u * v \in A}.
Proof.
(* Goal: @prop_in2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A))) (fun u v : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A))))) (inPhantom (forall u v : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT, is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A)))))) *)
exact/prodvP/asubv.
Qed.
Lemma prodv_id A : (A * A)%VS = A.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@prodv K aT (@asval K aT A) (@asval K aT A)) (@asval K aT A) *)
apply/eqP; rewrite eqEsubv asubv; apply/subvP=> u Au.
(* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@prodv K aT (@asval K aT A) (@asval K aT A))))) *)
by rewrite -(algidl Au) memv_mul // memv_algid.
Qed.
Lemma prodv_sub U V A : (U <= A -> V <= A -> U * V <= A)%VS.
Proof.
(* Goal: forall (_ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@asval K aT A))) (_ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@asval K aT A))), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT U V) (@asval K aT A)) *)
by move=> sUA sVA; rewrite -prodv_id prodvS.
Qed.
Lemma expv_id A n : (A ^+ n.+1)%VS = A.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@expv K aT (@asval K aT A) (S n)) (@asval K aT A) *)
by elim: n => // n IHn; rewrite !expvSl prodvA prodv_id -expvSl.
Qed.
Lemma limg_amulr U v : (amulr v @: U = U * <[v]>)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@amulr K aT v) U) (@prodv K aT U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v)) *)
rewrite -(span_basis (vbasisP U)) limg_span !span_def big_distrl /= big_map.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (fun j : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) j (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@amulr K aT v) j)))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@tval (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vbasis K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U)) (fun i : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (@prodv K aT (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v)))) *)
by apply: eq_bigr => u; rewrite prodv_line lfunE.
Qed.
Lemma memv_cosetP {U v w} :
reflect (exists2 u, u\in U & w = u * v) (w \in U * <[v]>)%VS.
Proof.
(* Goal: Bool.reflect (@ex2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U)))) (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @eq (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) w (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v))) (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@prodv K aT U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v))))) *)
rewrite -limg_amulr.
(* Goal: Bool.reflect (@ex2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U)))) (fun u : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @eq (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) w (@GRing.mul (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u v))) (@in_mem (GRing.Ring.sort (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) w (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@amulr K aT v) U)))) *)
by apply: (iffP memv_imgP) => [] [u] Uu ->; exists u; rewrite ?lfunE.
Qed.
Lemma dim_cosetv_unit V u : u \is a GRing.unit -> \dim (V * <[u]>) = \dim V.
Proof.
(* Goal: forall _ : is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@has_quality (S O) (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.unit (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), @eq nat (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT V (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u))) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V) *)
by move/lker0_amulr/eqP=> Uu; rewrite -limg_amulr limg_dim_eq // Uu capv0.
Qed.
Lemma memvV A u : (u^-1 \in A) = (u \in A).
Proof.
(* Goal: @eq bool (@in_mem (GRing.UnitRing.sort (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.inv (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A)))) (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A)))) *)
suffices{u} invA: invr_closed A by apply/idP/idP=> /invA; rewrite ?invrK.
(* Goal: @GRing.invr_closed (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A)) *)
move=> u Au; have [Uu | /invr_out-> //] := boolP (u \is a GRing.unit).
(* Goal: is_true (@in_mem (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.inv (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) (@mem (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@asval K aT A)))) *)
rewrite memvE -(limg_ker0 _ _ (lker0_amulr Uu)) limg_line lfunE /= mulVr //.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (GRing.UnitRing.ringType (@GRing.UnitAlgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vect_unitAlgType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@amulr K aT u) (@asval K aT A))) *)
suff ->: (amulr u @: A)%VS = A by rewrite -memvE -algid_eq1 (unitr_algid1 Au).
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@amulr K aT u) (@asval K aT A)) (@asval K aT A) *)
by apply/eqP; rewrite limg_amulr -dimv_leqif_eq ?prodv_sub ?dim_cosetv_unit.
Qed.
Fact aspace_cap_subproof A B : algid A \in B -> is_aspace (A :&: B).
Definition aspace_cap A B BeA := ASpace (@aspace_cap_subproof A B BeA).
Fact centraliser1_is_aspace u : is_aspace 'C[u].
Proof.
(* Goal: is_true (@is_aspace K aT (@centraliser1_vspace K aT u)) *)
rewrite /is_aspace has_algid1 ?cent1v1 //=.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@centraliser1_vspace K aT u) (@centraliser1_vspace K aT u)) (@centraliser1_vspace K aT u)) *)
apply/prodvP=> v w /cent1vP-cuv /cent1vP-cuw.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) v w) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@centraliser1_vspace K aT u)))) *)
by apply/cent1vP; rewrite -mulrA cuw !mulrA cuv.
Qed.
Canonical centraliser1_aspace u := ASpace (centraliser1_is_aspace u).
Fact centraliser_is_aspace V : is_aspace 'C(V).
Proof.
(* Goal: is_true (@is_aspace K aT (@centraliser_vspace K aT V)) *)
rewrite /is_aspace has_algid1 ?centv1 //=.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@centraliser_vspace K aT V) (@centraliser_vspace K aT V)) (@centraliser_vspace K aT V)) *)
apply/prodvP=> u w /centvP-cVu /centvP-cVw.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u w) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@centraliser_vspace K aT V)))) *)
by apply/centvP=> v Vv; rewrite /= -mulrA cVw // !mulrA cVu.
Qed.
Canonical centraliser_aspace V := ASpace (centraliser_is_aspace V).
Lemma centv_algid A : algid A \in 'C(A)%VS.
Proof.
(* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@asval K aT A)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@centraliser_vspace K aT (@asval K aT A))))) *)
by apply/centvP=> u Au; rewrite algidl ?algidr.
Qed.
Canonical center_aspace A := [aspace of 'Z(A) for aspace_cap (centv_algid A)].
Lemma algid_center A : algid 'Z(A) = algid A.
Proof.
(* Goal: @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@center_vspace K aT (@asval K aT A))) (algid (@asval K aT A)) *)
rewrite -(algidl (subvP (centerv_sub A) _ (memv_algid _))) algidr //=.
(* Goal: is_true (@in_mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (algid (@asval K aT A)) (@mem (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (predPredType (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@center_vspace K aT (@asval K aT A))))) *)
by rewrite memv_cap memv_algid centv_algid.
Qed.
Lemma Falgebra_FieldMixin :
GRing.IntegralDomain.axiom aT -> GRing.Field.mixin_of aT.
Section SkewField.
Hypothesis fieldT : GRing.Field.mixin_of aT.
Lemma skew_field_algid1 A : algid A = 1.
Proof.
(* Goal: @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (algid (@asval K aT A)) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) *)
by rewrite (unitr_algid1 (memv_algid A)) ?fieldT ?algid_neq0.
Qed.
Lemma skew_field_module_semisimple A M :
let sumA X := (\sum_(x <- X) A * <[x]>)%VS in
(A * M <= M)%VS -> {X | [/\ sumA X = M, directv (sumA X) & 0 \notin X]}.
Lemma skew_field_module_dimS A M : (A * M <= M)%VS -> \dim A %| \dim M.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@asval K aT A) M) M), is_true (dvdn (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) M)) *)
case/skew_field_module_semisimple=> X [<- /directvP-> nzX] /=.
(* Goal: is_true (dvdn (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@BigOp.bigop nat (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) O X (fun i : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT => @BigBody nat (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i addn true (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@asval K aT A) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) i)))))) *)
rewrite big_seq prime.dvdn_sum // => x /(memPn nzX)nz_x.
(* Goal: is_true (dvdn (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@asval K aT A) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x)))) *)
by rewrite dim_cosetv_unit ?fieldT.
Qed.
Lemma skew_field_dimS A B : (A <= B)%VS -> \dim A %| \dim B.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) (@asval K aT B)), is_true (dvdn (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT B))) *)
by move=> sAB; rewrite skew_field_module_dimS ?prodv_sub.
Qed.
End SkewField.
End AspaceTheory.
Notation "'C [ u ]" := (centraliser1_aspace u) : aspace_scope.
Notation "'C ( V )" := (centraliser_aspace V) : aspace_scope.
Notation "'Z ( A )" := (center_aspace A) : aspace_scope.
Arguments adim1P {K aT A}.
Arguments memv_cosetP {K aT U v w}.
Section Closure.
Variables (K : fieldType) (aT : FalgType K).
Implicit Types (u v : aT) (U V W : {vspace aT}).
Definition agenv U := (\sum_(i < \dim {:aT}) U ^+ i)%VS.
Local Notation "<< U & vs >>" := (agenv (U + <<vs>>)) : vspace_scope.
Local Notation "<< U ; x >>" := (agenv (U + <[x]>)) : vspace_scope.
Lemma agenvEl U : agenv U = (1 + U * agenv U)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv U) (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@prodv K aT U (agenv U))) *)
pose f V := (1 + U * V)%VS; rewrite -/(f _); pose n := \dim {:aT}.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv U) (f (agenv U)) *)
have ->: agenv U = iter n f 0%VS.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (f (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv U) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
rewrite /agenv -/n; elim: n => [|n IHn]; first by rewrite big_ord0.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (f (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (Finite.sort (ordinal_finType (S n))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (index_enum (ordinal_finType (S n))) (fun i : ordinal (S n) => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (ordinal (S n)) i (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (@expv K aT U (@nat_of_ord (S n) i)))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (S n) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) *)
rewrite big_ord_recl /= -{}IHn; congr (1 + _)%VS; rewrite big_distrr /=.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (f (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (ordinal n) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (ordinal n) i (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (@expv K aT U (bump O (@nat_of_ord n i))))) (@BigOp.bigop (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (ordinal n) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (ordinal n) i (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) true (@prodv K aT U (@expv K aT U (@nat_of_ord n i))))) *)
by apply: eq_bigr => i; rewrite expvSl.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (f (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
have fS i j: i <= j -> (iter i f 0 <= iter j f 0)%VS.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (f (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
(* Goal: forall _ : is_true (leq i j), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) i f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) j f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
by elim: i j => [|i IHi] [|j] leij; rewrite ?sub0v //= addvS ?prodvSr ?IHi.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (f (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
suffices /(@trajectP _ f _ n.+1)[i le_i_n Dfi]: looping f 0%VS n.+1.
(* Goal: is_true (@looping (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (S n)) *)
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (f (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) n f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) *)
by apply/eqP; rewrite eqEsubv -iterS fS // Dfi fS.
(* Goal: is_true (@looping (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (S n)) *)
apply: contraLR (dimvS (subvf (iter n.+1 f 0%VS))); rewrite -/n -ltnNge.
(* Goal: forall _ : is_true (negb (@looping (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (S n))), is_true (leq (S n) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (S n) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))))) *)
rewrite -looping_uniq; elim: n.+1 => // i IHi; rewrite trajectSr rcons_uniq.
(* Goal: forall _ : is_true (andb (negb (@in_mem (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@iter (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (S i) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@mem (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (seq_predType (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@traject (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (S i))))) (@uniq (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@traject (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (S i)))), is_true (leq (S i) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (S i) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))))) *)
rewrite {1}trajectSr mem_rcons inE negb_or eq_sym eqEdim fS ?leqW // -ltnNge.
(* Goal: forall _ : is_true (andb (andb (leq (S (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@iter (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) i f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))))) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@iter (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (S i) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))))) (negb (@in_mem (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@iter (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (S i) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))) (@mem (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (seq_predType (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@traject (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) i))))) (@uniq (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@traject (Equality.sort (@space_eqType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (S i)))), is_true (leq (S i) (@dimv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@iter (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (S i) f (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.zero (@Vector.zmodType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))))) *)
by rewrite -andbA => /and3P[lt_fi _ /IHi/leq_ltn_trans->].
Qed.
Lemma agenvEr U : agenv U = (1 + agenv U * U)%VS.
Lemma agenv_modl U V : (U * V <= V -> agenv U * V <= V)%VS.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT U V) V), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (agenv U) V) V) *)
rewrite big_distrl /= => idlU_V; apply/subv_sumP=> [[i _] /= _].
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@expv K aT U i) V) V) *)
elim: i => [|i]; first by rewrite expv0 prod1v.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@expv K aT U i) V) V), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@expv K aT U (S i)) V) V) *)
by apply: subv_trans; rewrite expvSr -prodvA prodvSr.
Qed.
Lemma agenv_modr U V : (V * U <= V -> V * agenv U <= V)%VS.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT V U) V), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT V (agenv U)) V) *)
rewrite big_distrr /= => idrU_V; apply/subv_sumP=> [[i _] /= _].
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT V (@expv K aT U i)) V) *)
elim: i => [|i]; first by rewrite expv0 prodv1.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT V (@expv K aT U i)) V), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT V (@expv K aT U (S i))) V) *)
by apply: subv_trans; rewrite expvSl prodvA prodvSl.
Qed.
Fact agenv_is_aspace U : is_aspace (agenv U).
Proof.
(* Goal: is_true (@is_aspace K aT (agenv U)) *)
rewrite /is_aspace has_algid1; last by rewrite memvE agenvEl addvSl.
(* Goal: is_true (andb true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (agenv U) (agenv U)) (agenv U))) *)
by rewrite agenv_modl // [V in (_ <= V)%VS]agenvEl addvSr.
Qed.
Canonical agenv_aspace U : {aspace aT} := ASpace (agenv_is_aspace U).
Lemma agenvE U : agenv U = agenv_aspace U. Proof. by []. Qed.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv U) (@asval K aT (agenv_aspace U)) *)
by [].
Qed.
Lemma agenvX n U : (agenv U ^+ n.+1)%VS = agenv U. Proof. exact: expv_id. Qed.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@expv K aT (agenv U) (S n)) (agenv U) *)
exact: expv_id.
Qed.
Lemma sub_agenv U : (U <= agenv U)%VS.
Proof.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (agenv U)) *)
by rewrite 2!agenvEl addvC prodvDr prodv1 -addvA addvSl.
Qed.
Lemma subX_agenv U n : (U ^+ n <= agenv U)%VS.
Proof.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@expv K aT U n) (agenv U)) *)
by case: n => [|n]; rewrite ?sub1_agenv // -(agenvX n) expvS // sub_agenv.
Qed.
Lemma agenv_sub_modl U V : (1 <= V -> U * V <= V -> agenv U <= V)%VS.
Lemma agenv_sub_modr U V : (1 <= V -> V * U <= V -> agenv U <= V)%VS.
Lemma agenv_id U : agenv (agenv U) = agenv U.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv (agenv U)) (agenv U) *)
apply/eqP; rewrite eqEsubv sub_agenv andbT.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (agenv U)) (agenv U)) *)
by rewrite agenv_sub_modl ?sub1_agenv ?agenvM.
Qed.
Lemma agenvS U V : (U <= V -> agenv U <= agenv V)%VS.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv U) (agenv V)) *)
move=> sUV; rewrite agenv_sub_modl ?sub1_agenv //.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT U (agenv V)) (agenv V)) *)
by rewrite -[Vs in (_ <= Vs)%VS]agenvM prodvSl ?(subv_trans sUV) ?sub_agenv.
Qed.
Lemma agenv_add_id U V : agenv (agenv U + V) = agenv (U + V).
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv U) V)) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V)) *)
apply/eqP; rewrite eqEsubv andbC agenvS ?addvS ?sub_agenv //=.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv U) V)) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V))) *)
rewrite agenv_sub_modl ?sub1_agenv //.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv U) V) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V))) *)
rewrite -[rhs in (_ <= rhs)%VS]agenvM prodvSl // subv_add agenvS ?addvSl //=.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V))) *)
exact: subv_trans (addvSr U V) (sub_agenv _).
Qed.
Lemma subv_adjoin U x : (U <= <<U; x>>)%VS.
Proof.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x)))) *)
by rewrite (subv_trans (sub_agenv _)) ?agenvS ?addvSl.
Qed.
Lemma subv_adjoin_seq U xs : (U <= <<U & xs>>)%VS.
Proof.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) xs)))) *)
by rewrite (subv_trans (sub_agenv _)) // ?agenvS ?addvSl.
Qed.
Lemma memv_adjoin U x : x \in <<U; x>>%VS.
Proof.
(* Goal: is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x)))))) *)
by rewrite memvE (subv_trans (sub_agenv _)) ?agenvS ?addvSr.
Qed.
Lemma seqv_sub_adjoin U xs : {subset xs <= <<U & xs>>%VS}.
Proof.
(* Goal: @sub_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) xs) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) xs))))) *)
by apply/span_subvP; rewrite (subv_trans (sub_agenv _)) ?agenvS ?addvSr.
Qed.
Lemma subvP_adjoin U x y : y \in U -> y \in <<U; x>>%VS.
Proof.
(* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) y (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) U))), is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) y (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x)))))) *)
exact/subvP/subv_adjoin.
Qed.
Lemma adjoin_nil V : <<V & [::]>>%VS = agenv V.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))))) (agenv V) *)
by rewrite span_nil addv0.
Qed.
Lemma adjoin_cons V x rs : <<V & x :: rs>>%VS = << <<V; x>> & rs>>%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) x rs)))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x))) (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) rs))) *)
by rewrite span_cons addvA agenv_add_id.
Qed.
Lemma adjoin_rcons V rs x : <<V & rcons rs x>>%VS = << <<V & rs>>%VS; x>>%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@rcons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) rs x)))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) rs))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x))) *)
by rewrite -cats1 span_cat addvA span_seq1 agenv_add_id.
Qed.
Lemma adjoin_seq1 V x : <<V & [:: x]>>%VS = <<V; x>>%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@cons (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) x (@nil (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x))) *)
by rewrite adjoin_cons adjoin_nil agenv_id.
Qed.
Lemma adjoinC V x y : << <<V; x>>; y>>%VS = << <<V; y>>; x>>%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) y))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) y))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x))) *)
by rewrite !agenv_add_id -!addvA (addvC <[x]>%VS).
Qed.
Lemma adjoinSl U V x : (U <= V -> <<U; x>> <= <<V; x>>)%VS.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x)))) *)
by move=> sUV; rewrite agenvS ?addvS.
Qed.
Lemma adjoin_seqSl U V rs : (U <= V -> <<U & rs>> <= <<V & rs>>)%VS.
Proof.
(* Goal: forall _ : is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U V), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) rs))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) V (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) rs)))) *)
by move=> sUV; rewrite agenvS ?addvS.
Qed.
Lemma adjoin_seqSr U rs1 rs2 :
{subset rs1 <= rs2} -> (<<U & rs1>> <= <<U & rs2>>)%VS.
Proof.
(* Goal: forall _ : @sub_mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) rs1) (@mem (Equality.sort (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (seq_predType (@Vector.eqType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) rs2), is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) rs1))) (agenv (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) rs2)))) *)
by move/sub_span=> s_rs12; rewrite agenvS ?addvS.
Qed.
End Closure.
Notation "<< U >>" := (agenv_aspace U) : aspace_scope.
Notation "<< U & vs >>" := (agenv (U + <<vs>>)) : vspace_scope.
Notation "<< U ; x >>" := (agenv (U + <[x]>)) : vspace_scope.
Notation "<< U & vs >>" := << U + <<vs>> >>%AS : aspace_scope.
Notation "<< U ; x >>" := << U + <[x]> >>%AS : aspace_scope.
Section SubFalgType.
Variable (K : fieldType) (aT : FalgType K) (A : {aspace aT}).
Definition subvs_one := Subvs (memv_algid A).
Definition subvs_mul (u v : subvs_of A) :=
Subvs (subv_trans (memv_mul (subvsP u) (subvsP v)) (asubv _)).
Fact subvs_mulA : associative subvs_mul.
Proof.
(* Goal: @associative (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) subvs_mul *)
by move=> x y z; apply/val_inj/mulrA.
Qed.
Fact subvs_mu1l : left_id subvs_one subvs_mul.
Proof.
(* Goal: @left_id (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) subvs_one subvs_mul *)
by move=> x; apply/val_inj/algidl/(valP x).
Qed.
Fact subvs_mul1 : right_id subvs_one subvs_mul.
Proof.
(* Goal: @right_id (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) subvs_one subvs_mul *)
by move=> x; apply/val_inj/algidr/(valP x).
Qed.
Fact subvs_mulDl : left_distributive subvs_mul +%R.
Proof.
(* Goal: @left_distributive (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) subvs_mul (@GRing.add (@subvs_zmodType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A))) *)
move=> x y z; apply/val_inj/mulrDl.
Qed.
Fact subvs_mulDr : right_distributive subvs_mul +%R.
Proof.
(* Goal: @right_distributive (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) subvs_mul (@GRing.add (@subvs_zmodType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A))) *)
move=> x y z; apply/val_inj/mulrDr.
Qed.
Definition subvs_ringMixin :=
RingMixin subvs_mulA subvs_mu1l subvs_mul1 subvs_mulDl subvs_mulDr
(algid_neq0 _).
Canonical subvs_ringType := Eval hnf in RingType (subvs_of A) subvs_ringMixin.
Lemma subvs_scaleAl k (x y : subvs_of A) : k *: (x * y) = (k *: x) * y.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@subvs_lmodType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A))) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@subvs_lmodType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A))) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@subvs_lmodType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)))))) (@GRing.scale (GRing.Field.ringType K) (@subvs_lmodType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) k (@GRing.mul subvs_ringType x y)) (@GRing.mul subvs_ringType (@GRing.scale (GRing.Field.ringType K) (@subvs_lmodType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) k x) y) *)
exact/val_inj/scalerAl.
Qed.
Canonical subvs_lalgType := Eval hnf in LalgType K (subvs_of A) subvs_scaleAl.
Lemma subvs_scaleAr k (x y : subvs_of A) : k *: (x * y) = x * (k *: y).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lalgType)) (@GRing.Lmodule.base (GRing.Field.ringType K) (@GRing.Lmodule.sort (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lalgType)) (@GRing.Lmodule.class (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lalgType))))) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) subvs_lalgType) k (@GRing.mul subvs_ringType x y)) (@GRing.mul subvs_ringType x (@GRing.scale (GRing.Field.ringType K) (@subvs_lmodType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) k y)) *)
exact/val_inj/scalerAr.
Qed.
Canonical subvs_algType := Eval hnf in AlgType K (subvs_of A) subvs_scaleAr.
Canonical subvs_unitRingType := Eval hnf in FalgUnitRingType (subvs_of A).
Canonical subvs_unitAlgType := Eval hnf in [unitAlgType K of subvs_of A].
Canonical subvs_FalgType := Eval hnf in [FalgType K of subvs_of A].
Implicit Type w : subvs_of A.
Lemma vsval_unitr w : vsval w \is a GRing.unit -> w \is a GRing.unit.
Proof.
(* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vsval K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) w) (@mem (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@has_quality (S O) (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.unit (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), is_true (@in_mem (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) w (@mem (GRing.UnitRing.sort subvs_unitRingType) (predPredType (GRing.UnitRing.sort subvs_unitRingType)) (@has_quality (S O) (GRing.UnitRing.sort subvs_unitRingType) (@GRing.unit subvs_unitRingType)))) *)
case: w => /= u Au Uu; have Au1: u^-1 \in A by rewrite memvV.
(* Goal: is_true (@in_mem (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@Subvs K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) u Au) (@mem (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (predPredType (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A))) (@has_quality (S O) (@subvs_of K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@GRing.unit subvs_unitRingType)))) *)
apply/unitrP; exists (Subvs Au1).
(* Goal: and (@eq (GRing.Ring.sort (GRing.UnitRing.ringType subvs_unitRingType)) (@GRing.mul (GRing.UnitRing.ringType subvs_unitRingType) (@Subvs K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) (@GRing.inv (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) Au1) (@Subvs K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) u Au)) (GRing.one (GRing.UnitRing.ringType subvs_unitRingType))) (@eq (GRing.Ring.sort (GRing.UnitRing.ringType subvs_unitRingType)) (@GRing.mul (GRing.UnitRing.ringType subvs_unitRingType) (@Subvs K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) u Au) (@Subvs K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) (@GRing.inv (@Falgebra.unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) u) Au1)) (GRing.one (GRing.UnitRing.ringType subvs_unitRingType))) *)
by split; apply: val_inj; rewrite /= ?mulrV ?mulVr ?(unitr_algid1 Au).
Qed.
Lemma vsval_invr w : vsval w \is a GRing.unit -> val w^-1 = (val w)^-1.
Proof.
(* Goal: forall _ : is_true (@in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@vsval K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A) w) (@mem (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@has_quality (S O) (GRing.UnitRing.sort (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.unit (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))))), @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@val (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (fun x : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@asval K aT A)))) (@subvs_subType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@GRing.inv subvs_unitRingType w)) (@GRing.inv (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@val (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (fun x : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@asval K aT A)))) (@subvs_subType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) w)) *)
move=> Uu; have def_w: w / w * w = w by rewrite divrK ?vsval_unitr.
(* Goal: @eq (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@val (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (fun x : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@asval K aT A)))) (@subvs_subType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) (@GRing.inv subvs_unitRingType w)) (@GRing.inv (@Falgebra.vect_unitRingType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@val (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (fun x : @Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) => @in_mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) x (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@asval K aT A)))) (@subvs_subType K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@asval K aT A)) w)) *)
by apply: (mulrI Uu); rewrite -[in u in u / _]def_w ?mulrK.
Qed.
End SubFalgType.
Section AHom.
Variable K : fieldType.
Section Class_Def.
Variables aT rT : FalgType K.
Definition ahom_in (U : {vspace aT}) (f : 'Hom(aT, rT)) :=
let fM_at x y := f (x * y) == f x * f y in
all (fun x => all (fM_at x) (vbasis U)) (vbasis U) && (f 1 == 1).
Lemma ahom_inP {f : 'Hom(aT, rT)} {U : {vspace aT}} :
reflect ({in U &, {morph f : x y / x * y >-> x * y}} * (f 1 = 1))
(ahom_in U f).
Lemma ahomP {f : 'Hom(aT, rT)} : reflect (lrmorphism f) (ahom_in {:aT} f).
Proof.
(* Goal: Bool.reflect (@GRing.LRMorphism.class_of (GRing.Field.ringType K) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f)) (ahom_in (@fullv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) f) *)
apply: (iffP ahom_inP) => [[fM f1] | fRM_P]; last first.
(* Goal: @GRing.LRMorphism.class_of (GRing.Field.ringType K) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f) *)
(* Goal: prod (@prop_in2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@fullv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (fun x y : @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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) x y)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f x) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f y))) (inPhantom (@morphism_2 (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f) (fun x y : @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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) => @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) x y) (fun x y : @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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) => @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) x y)))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) *)
pose fRM := LRMorphism fRM_P.
(* Goal: @GRing.LRMorphism.class_of (GRing.Field.ringType K) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f) *)
(* Goal: prod (@prop_in2 (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@fullv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (fun x y : @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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) x y)) (@GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f x) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f y))) (inPhantom (@morphism_2 (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f) (fun x y : @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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) => @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) x y) (fun x y : @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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) => @GRing.mul (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) x y)))) (@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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)))) (GRing.one (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)))) *)
by split; [apply: in2W (rmorphM fRM) | apply: (rmorph1 fRM)].
(* Goal: @GRing.LRMorphism.class_of (GRing.Field.ringType K) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f) *)
split; last exact: linearZZ; split; first exact: linearB.
(* Goal: @GRing.RMorphism.mixin_of (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT)) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) f) *)
by split=> // x y; rewrite fM ?memvf.
Qed.
Structure ahom := AHom {ahval :> 'Hom(aT, rT); _ : ahom_in {:aT} ahval}.
Canonical ahom_subType := Eval hnf in [subType for ahval].
Definition ahom_eqMixin := [eqMixin of ahom by <:].
Canonical ahom_eqType := Eval hnf in EqType ahom ahom_eqMixin.
Definition ahom_choiceMixin := [choiceMixin of ahom by <:].
Canonical ahom_choiceType := Eval hnf in ChoiceType ahom ahom_choiceMixin.
Fact linfun_is_ahom (f : {lrmorphism aT -> rT}) : ahom_in {:aT} (linfun f).
Proof.
(* Goal: is_true (ahom_in (@fullv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@linfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT) (@GRing.LRMorphism.apply (GRing.Field.ringType K) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (Phant (forall _ : @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT, @Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) f))) *)
by apply/ahom_inP; split=> [x y|]; rewrite !lfunE ?rmorphM ?rmorph1.
Qed.
Canonical linfun_ahom f := AHom (linfun_is_ahom f).
End Class_Def.
Arguments ahom_in [aT rT].
Arguments ahom_inP {aT rT f U}.
Arguments ahomP {aT rT f}.
Section LRMorphism.
Variables aT rT sT : FalgType K.
Fact ahom_is_lrmorphism (f : ahom aT rT) : lrmorphism f.
Proof.
(* Goal: @GRing.LRMorphism.class_of (GRing.Field.ringType K) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) aT) (@GRing.Lalgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT)) (@GRing.scale (GRing.Field.ringType K) (@GRing.Lalgebra.lmod_ringType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) (@Falgebra.vect_lalgType (GRing.Field.ringType K) (Phant (GRing.Ring.sort (GRing.Field.ringType K))) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f)) *)
by apply/ahomP; case: f.
Qed.
Canonical ahom_rmorphism f := Eval hnf in AddRMorphism (ahom_is_lrmorphism f).
Canonical ahom_lrmorphism f := Eval hnf in AddLRMorphism (ahom_is_lrmorphism f).
Lemma ahomWin (f : ahom aT rT) U : ahom_in U f.
Proof.
(* Goal: is_true (@ahom_in aT rT U (@ahval aT rT f)) *)
by apply/ahom_inP; split; [apply: in2W (rmorphM _) | apply: rmorph1].
Qed.
Lemma id_is_ahom (V : {vspace aT}) : ahom_in V \1.
Proof.
(* Goal: is_true (@ahom_in aT aT V (@id_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) *)
by apply/ahom_inP; split=> [x y|] /=; rewrite !id_lfunE.
Qed.
Canonical id_ahom := AHom (id_is_ahom (aspacef aT)).
Lemma comp_is_ahom (V : {vspace aT}) (f : 'Hom(rT, sT)) (g : 'Hom(aT, rT)) :
ahom_in {:rT} f -> ahom_in V g -> ahom_in V (f \o g).
Canonical comp_ahom (f : ahom rT sT) (g : ahom aT rT) :=
AHom (comp_is_ahom (valP f) (valP g)).
Lemma aimgM (f : ahom aT rT) U V : (f @: (U * V) = f @: U * f @: V)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@prodv K aT U V)) (@prodv K rT (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) V)) *)
apply/eqP; rewrite eqEsubv; apply/andP; split; last first.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@prodv K aT U V)) (@prodv K rT (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) V))) *)
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@prodv K rT (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) V)) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@prodv K aT U V))) *)
apply/prodvP=> _ _ /memv_imgP[u Hu ->] /memv_imgP[v Hv ->].
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@prodv K aT U V)) (@prodv K rT (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) V))) *)
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) u) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) v)) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@prodv K aT U V))))) *)
by rewrite -rmorphM memv_img // memv_mul.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@prodv K aT U V)) (@prodv K rT (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) V))) *)
apply/subvP=> _ /memv_imgP[w UVw ->]; rewrite memv_preim (subvP _ w UVw) //.
(* Goal: is_true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT U V) (@lfun_preim K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@prodv K rT (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) V)))) *)
by apply/prodvP=> u v Uu Vv; rewrite -memv_preim rmorphM memv_mul // memv_img.
Qed.
Lemma aimg1 (f : ahom aT rT) : (f @: 1 = 1)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)))) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (GRing.one (@Falgebra.vect_ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) *)
by rewrite limg_line rmorph1.
Qed.
Lemma aimgX (f : ahom aT rT) U n : (f @: (U ^+ n) = f @: U ^+ n)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@expv K aT U n)) (@expv K rT (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) n) *)
elim: n => [|n IH]; first by rewrite !expv0 aimg1.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@expv K aT U (S n))) (@expv K rT (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (S n)) *)
by rewrite !expvSl aimgM IH.
Qed.
Lemma aimg_agen (f : ahom aT rT) U : (f @: agenv U)%VS = agenv (f @: U).
Lemma aimg_adjoin (f : ahom aT rT) U x : (f @: <<U; x>> = <<f @: U; f x>>)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@agenv K aT (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) x)))) (@agenv K rT (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (@vline K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) x)))) *)
by rewrite aimg_agen limg_add limg_line.
Qed.
Lemma aimg_adjoin_seq (f : ahom aT rT) U xs :
(f @: <<U & xs>> = <<f @: U & map f xs>>)%VS.
Proof.
(* Goal: @eq (@Vector.space K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (Phant (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)))) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) (@agenv K aT (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) U (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) xs)))) (@agenv K rT (@addv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@lfun_img K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f) U) (@span K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort 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))) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT))) (@fun_of_lfun (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@ahval aT rT f)) xs)))) *)
by rewrite aimg_agen limg_add limg_span.
Qed.
Fact ker_sub_ahom_is_aspace (f g : ahom aT rT) :
is_aspace (lker (ahval f - ahval g)).
Proof.
(* Goal: is_true (@is_aspace K aT (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT f) (@GRing.opp (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT g))))) *)
rewrite /is_aspace has_algid1; last by apply/eqlfunP; rewrite !rmorph1.
(* Goal: is_true (andb true (@subsetv K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@prodv K aT (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT f) (@GRing.opp (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT g)))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT f) (@GRing.opp (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT g))))) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT f) (@GRing.opp (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT g)))))) *)
apply/prodvP=> a b /eqlfunP Dfa /eqlfunP Dfb.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@GRing.mul (@Falgebra.ringType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) a b) (@mem (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (predPredType (@Vector.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT))) (@pred_of_vspace K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (Phant (@Falgebra.sort (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT)) (@lker K (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT) (@GRing.add (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT f) (@GRing.opp (@lfun_zmodType (GRing.Field.ringType K) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) aT) (@Falgebra.vectType (GRing.Field.ringType K) (Phant (GRing.Field.sort K)) rT)) (@ahval aT rT g))))))) *)
by apply/eqlfunP; rewrite !rmorphM /= Dfa Dfb.
Qed.
Canonical ker_sub_ahom_aspace f g := ASpace (ker_sub_ahom_is_aspace f g).
End LRMorphism.
Canonical fixedSpace_aspace aT (f : ahom aT aT) := [aspace of fixedSpace f].
End AHom.
Arguments ahom_in [K aT rT].
Notation "''AHom' ( aT , rT )" := (ahom aT rT) : type_scope.
Notation "''AEnd' ( aT )" := (ahom aT aT) : type_scope.
Delimit Scope lrfun_scope with AF.
Bind Scope lrfun_scope with ahom.
Notation "\1" := (@id_ahom _ _) : lrfun_scope.
Notation "f \o g" := (comp_ahom f g) : lrfun_scope.
|
Require Import NF.
Require Import List.
Require Import syntax.
Require Import typecheck.
Require Import environments.
Require Import freevars.
Require Import utils.
Goal forall e : tm, F e -> forall H : ty_env, ~ TC H e nat_ty.
simple induction 1; intros.
red in |- *; intro.
specialize inv_TC_abs with (1 := H1).
simple induction 1; simple induction 1; intros Q T.
generalize Q; exact (nat_not_arr s x).
red in |- *; intro.
specialize inv_TC_clos with (1 := H3).
simple induction 1; intros T1 T0.
red in H1; apply H1 with ((v, s) :: H2); assumption.
Save Fe_not_nat.
Goal forall e : tm, F e -> forall H : ty_env, ~ TC H e bool_ty.
simple induction 1; intros.
red in |- *; intro.
specialize inv_TC_abs with (1 := H1).
simple induction 1; simple induction 1; intros Q T.
generalize Q; exact (bool_not_arr s x).
red in |- *; intro.
specialize inv_TC_clos with (1 := H3).
simple induction 1; intros T1 T0.
red in H1; apply H1 with ((v, s) :: H2); assumption.
Save Fe_not_bool.
Goal
forall e : tm,
NF e ->
forall (H : ty_env) (t : ty),
TC H e t -> ~ (t = nat_ty \/ t = bool_ty) -> F e.
simple induction 1; simpl in |- *; intros.
elim H2; right.
apply (inv_TC_ttt H0); assumption.
elim H2; right.
apply (inv_TC_fff H0); assumption.
elim H3; left.
generalize H2.
elim H0.
exact (inv_TC_o H1 t).
intros.
specialize inv_TC_succ with (1 := H6).
simple induction 1; intros; assumption.
assumption.
Save NFe_Fe.
Goal
forall e : tm,
NF e -> forall H : ty_env, TC H e bool_ty -> e = ttt \/ e = fff.
simple induction 1; intros.
left; reflexivity.
right; reflexivity.
generalize H2; elim H0; intros.
specialize inv_TC_o with (1 := H3); intro Q.
absurd (nat_ty = bool_ty).
exact nat_not_bool.
symmetry in |- *; assumption.
specialize inv_TC_succ with (1 := H5); simple induction 1; intros Q T.
absurd (nat_ty = bool_ty).
exact nat_not_bool.
symmetry in |- *; assumption.
absurd (TC H1 e0 bool_ty).
apply Fe_not_bool; assumption.
assumption.
Save NFebool_TF.
Goal forall e : tm, NF e -> forall H : ty_env, TC H e nat_ty -> Sno e.
simple induction 1; intros.
specialize inv_TC_ttt with (1 := H1); intro Q.
absurd (nat_ty = bool_ty); assumption || exact nat_not_bool.
specialize inv_TC_fff with (1 := H1); intro Q.
absurd (nat_ty = bool_ty); assumption || exact nat_not_bool.
assumption.
absurd (TC H1 e0 nat_ty).
apply Fe_not_nat.
assumption.
assumption.
Save NFenat_Snoe.
Goal forall e : tm, Sno e -> forall v : vari, ~ FV v e.
simple induction 1; intros.
apply inv_FV_o.
red in |- *; intro.
red in H1; apply H1 with v.
apply inv_FV_succ; assumption.
Save Snoe_notFVe.
|
Require Import sur_les_relations.
Require Import TS.
Require Import sigma_lift.
Definition e_invSL (b : wsort) (M N : TS b) :=
match M, N with
| lift M1, id => M1 = id
| lift M1, lift N1 => e_relSL _ M1 N1
| lambda M1, lambda N1 => e_relSL _ M1 N1
| app M1 M2, app N1 N2 =>
e_relSL _ M1 N1 /\ M2 = N2 \/ M1 = N1 /\ e_relSL _ M2 N2
| env M1 M2, var n as V =>
(exists m : nat, M1 = var m /\ n = S m /\ M2 = shift) \/
(exists s : sub_explicits, M1 = var 0 /\ M2 = lift s /\ n = 0) \/
(exists s : sub_explicits, M1 = var 0 /\ M2 = cons V s) \/
M1 = V /\ M2 = id
| env M1 M2, app N1 N2 as A =>
(exists a : terms,
(exists b : terms, M1 = app a b /\ N1 = env a M2 /\ N2 = env b M2)) \/
(exists s : sub_explicits, M1 = var 0 /\ M2 = cons A s) \/
M1 = A /\ M2 = id
| env M1 M2, lambda N1 as L =>
(exists a : terms, M1 = lambda a /\ N1 = env a (lift M2)) \/
(exists s : sub_explicits, M1 = var 0 /\ M2 = cons L s) \/
M1 = L /\ M2 = id
| env M1 M2, env N1 N2 as E =>
(exists s : sub_explicits, M1 = env N1 s /\ N2 = comp s M2) \/
(exists n : nat, M1 = var n /\ M2 = comp shift N2 /\ N1 = var (S n)) \/
(exists s : sub_explicits, M1 = var 0 /\ M2 = cons E s) \/
(exists s : sub_explicits,
M1 = var 0 /\ M2 = comp (lift s) N2 /\ N1 = var 0) \/
(exists n : nat,
(exists a : terms, M1 = var (S n) /\ M2 = cons a N2 /\ N1 = var n)) \/
(exists n : nat,
(exists s : sub_explicits,
M1 = var (S n) /\ M2 = lift s /\ N1 = var n /\ N2 = comp s shift)) \/
(exists n : nat,
(exists s : sub_explicits,
(exists t : sub_explicits,
M1 = var (S n) /\
M2 = comp (lift s) t /\
N1 = var n /\ N2 = comp s (comp shift t)))) \/
M1 = E /\ M2 = id \/
e_relSL _ M1 N1 /\ M2 = N2 \/ M1 = N1 /\ e_relSL _ M2 N2
| env M1 M2, meta_X n =>
(exists s : sub_explicits, M1 = var 0 /\ M2 = cons (meta_X n) s) \/
M1 = meta_X n /\ M2 = id
| cons M1 M2, cons N1 N2 =>
e_relSL _ M1 N1 /\ M2 = N2 \/ M1 = N1 /\ e_relSL _ M2 N2
| comp M1 M2, id =>
(exists a : terms, M1 = shift /\ M2 = cons a id) \/ M1 = id /\ M2 = id
| comp M1 M2, shift =>
(exists a : terms, M1 = shift /\ M2 = cons a shift) \/
M1 = id /\ M2 = shift \/ M1 = shift /\ M2 = id
| comp M1 M2, cons N1 N2 as C =>
(exists a : terms,
(exists s : sub_explicits,
M1 = cons a s /\ N1 = env a M2 /\ N2 = comp s M2)) \/
(exists a : terms, M1 = shift /\ M2 = cons a C) \/
(exists s : sub_explicits,
(exists t : sub_explicits,
M1 = lift s /\ M2 = cons N1 t /\ N2 = comp s t)) \/
M1 = id /\ M2 = C \/ M1 = C /\ M2 = id
| comp M1 M2, comp N1 N2 =>
(exists t : sub_explicits, M1 = comp N1 t /\ N2 = comp t M2) \/
(exists a : terms, M1 = shift /\ M2 = cons a (comp N1 N2)) \/
M1 = shift /\ M2 = lift N1 /\ N2 = shift \/
(exists t : sub_explicits,
M1 = shift /\ M2 = comp (lift N1) t /\ N2 = comp shift t) \/
(exists s : sub_explicits,
(exists t : sub_explicits,
M1 = lift s /\ M2 = comp (lift t) N2 /\ N1 = lift (comp s t))) \/
M1 = id /\ M2 = comp N1 N2 \/
M1 = comp N1 N2 /\ M2 = id \/
e_relSL _ M1 N1 /\ M2 = N2 \/ M1 = N1 /\ e_relSL _ M2 N2
| comp M1 M2, lift N1 as L =>
(exists a : terms, M1 = shift /\ M2 = cons a L) \/
(exists s : sub_explicits,
(exists t : sub_explicits,
M1 = lift s /\ M2 = lift t /\ N1 = comp s t)) \/
M1 = id /\ M2 = L \/ M1 = L /\ M2 = id
| comp M1 M2, meta_x n as x =>
(exists a : terms, M1 = shift /\ M2 = cons a x) \/
M1 = id /\ M2 = x \/ M1 = x /\ M2 = id
| _, _ => False
end.
Notation invSL := (e_invSL _) (only parsing).
Goal forall (b : wsort) (M N : TS b), e_systemSL _ M N -> e_invSL _ M N.
simple induction 1; simple induction 1; intros.
simpl in |- *; left; exists a0; exists b1; auto.
simpl in |- *; left; exists a0; auto.
simpl in |- *; left; exists s; auto.
simpl in |- *; left; exists n; auto.
simpl in |- *; right; left; exists n; auto.
pattern a0 in |- *; apply terms_ind; intros; simpl in |- *.
do 2 right; left; exists s; auto.
right; left; exists s; auto.
right; left; exists s; auto.
do 2 right; left; exists s; auto.
left; exists s; auto.
simpl in |- *; right; left; exists s; auto.
simpl in |- *; do 3 right; left; exists s; auto.
simpl in |- *; do 4 right; left; exists n; exists a0; auto.
simpl in |- *; do 5 right; left; exists n; exists s; auto.
simpl in |- *; do 6 right; left; exists n; exists s; exists t; auto.
simpl in |- *; left; exists t0; auto.
simpl in |- *; left; exists a; exists s0; auto.
pattern s0 in |- *; apply sub_explicits_ind; intros; simpl in |- *.
left; exists a; auto.
left; exists a; auto.
right; left; exists a; auto.
right; left; exists a; auto.
left; exists a; auto.
left; exists a; auto.
simpl in |- *; do 2 right; left; auto.
simpl in |- *; do 3 right; left; exists t0; auto.
simpl in |- *; right; left; exists s0; exists t0; auto.
simpl in |- *; do 4 right; left; exists s0; exists t0; auto.
simpl in |- *; right; right; left; exists s0; exists t0; auto.
pattern s0 in |- *; apply sub_explicits_ind; intros; simpl in |- *.
right; auto.
right; left; auto.
do 3 right; left; auto.
do 5 right; left; auto.
do 2 right; left; auto.
right; left; auto.
pattern s0 in |- *; apply sub_explicits_ind; intros; simpl in |- *.
right; auto.
right; right; auto.
do 4 right; auto.
do 6 right; left; auto.
do 3 right; auto.
right; right; auto.
simpl in |- *; auto.
pattern a0 in |- *; apply terms_ind; intros; simpl in |- *.
do 3 right; auto.
do 2 right; auto.
do 2 right; auto.
do 7 right; left; auto.
right; auto.
Save lemma1_inv_systemSL.
Hint Resolve lemma1_inv_systemSL.
Goal forall (b : wsort) (M N : TS b), e_relSL _ M N -> e_invSL _ M N.
simple induction 1; intros; simpl in |- *; auto 11.
Save lemma1_invSL.
Hint Resolve lemma1_invSL.
|
Require Import Ensf_types.
Require Import Ensf_dans.
Require Import Ensf_union.
Require Import Ensf_inclus.
Fixpoint map (f : Elt -> Elt) (e : Ensf) {struct e} : Ensf :=
match e with
| empty => empty
| add y e => add (f y) (map f e)
end.
Lemma dans_map :
forall (f : Elt -> Elt) (a : Ensf) (x : Elt),
dans x (map f a) -> exists y : Elt, dans y a /\ x = f y.
Hint Resolve dans_map.
Lemma dans_map_inv :
forall (f : Elt -> Elt) (x : Elt) (a : Ensf),
dans x a -> dans (f x) (map f a).
Hint Resolve dans_map_inv.
Lemma map_union :
forall (f : Elt -> Elt) (a b : Ensf),
union (map f a) (map f b) = map f (union a b) :>Ensf.
Proof.
(* Goal: forall (f : forall _ : Elt, Elt) (a b : Ensf), @eq Ensf (union (map f a) (map f b)) (map f (union a b)) *)
intro f.
(* Goal: forall a b : Ensf, @eq Ensf (union (map f a) (map f b)) (map f (union a b)) *)
simple induction a; simpl in |- *; auto.
Qed.
Hint Resolve map_union.
Lemma dans_map_trans :
forall (x : Elt) (f : Elt -> Elt) (a b : Ensf),
dans x (map f a) -> inclus a b -> dans x (map f b).
Lemma map_egal :
forall (f g : Elt -> Elt) (E : Ensf),
(forall x : Elt, dans x E -> f x = g x :>Elt) -> map f E = map g E :>Ensf.
Proof.
(* Goal: forall (f g : forall _ : Elt, Elt) (E : Ensf) (_ : forall (x : Elt) (_ : dans x E), @eq Elt (f x) (g x)), @eq Ensf (map f E) (map g E) *)
intros f g.
(* Goal: forall (E : Ensf) (_ : forall (x : Elt) (_ : dans x E), @eq Elt (f x) (g x)), @eq Ensf (map f E) (map g E) *)
simple induction E; simpl in |- *; auto.
Qed.
Lemma map_inclus :
forall (a b : Ensf) (f : Elt -> Elt),
inclus a b -> inclus (map f a) (map f b).
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_diagonalsbisect.
Section Euclid.
Context `{Ax:euclidean_euclidean}.
Lemma lemma_trapezoiddiagonals :
forall A B C D E,
PG A B C D -> BetS A E D ->
exists X, BetS B X D /\ BetS C X E.
Proof.
(* Goal: forall (A B C D E : @Point Ax0) (_ : @PG Ax0 A B C D) (_ : @BetS Ax0 A E D), @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (Par A B C D) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (Par A D B C) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (~ Meet A B C D) by (conclude_def Par ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (neq A B) by (conclude_def Par ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (neq C D) by (conclude_def Par ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
let Tf:=fresh in assert (Tf:exists M, (Midpoint A M C /\ Midpoint B M D)) by (conclude lemma_diagonalsbisect);destruct Tf as [M];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (BetS A M C) by (conclude_def Midpoint ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (Cong A M M C) by (conclude_def Midpoint ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (BetS B M D) by (conclude_def Midpoint ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (Cong B M M D) by (conclude_def Midpoint ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (Cong B M D M) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (~ Col B D C).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
(* Goal: not (@Col Ax0 B D C) *)
{
(* Goal: not (@Col Ax0 B D C) *)
intro.
(* Goal: False *)
assert (Col C D B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A B B) by (conclude_def Col ).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (Cong M A M C) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
let Tf:=fresh in assert (Tf:exists P, (BetS B E P /\ BetS C D P)) by (conclude postulate_Euclid5);destruct Tf as [P];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
assert (~ Col B P C).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
(* Goal: not (@Col Ax0 B P C) *)
{
(* Goal: not (@Col Ax0 B P C) *)
intro.
(* Goal: False *)
assert (Col P C B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col C D P) by (conclude_def Col ).
(* Goal: False *)
assert (Col P C D) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq C P) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq P C) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col C B D) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col C D B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A B B) by (conclude_def Col ).
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
let Tf:=fresh in assert (Tf:exists H', (BetS B H' D /\ BetS C H' E)) by (conclude postulate_Pasch_inner);destruct Tf as [H'];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@BetS Ax0 B X D) (@BetS Ax0 C X E)) *)
close.
Qed.
End Euclid.
|
Require Import TS.
Require Import sur_les_relations.
Require Import sigma_lift.
Require Import determinePC_SL.
Goal
forall a b : terms,
exists u : terms,
e_relSLstar _ (app (env a id) (env b id)) u /\ e_relSLstar _ (app a b) u.
intros; exists (app a b); split; red in |- *.
apply star_trans1 with (app a (env b id)); auto.
auto.
Save PC_app_id.
Hint Resolve PC_app_id.
Goal
forall (a a' b : terms) (s : sub_explicits),
e_relSL _ a a' ->
exists u : terms,
e_relSLstar _ (app (env a s) (env b s)) u /\
e_relSLstar _ (env (app a' b) s) u.
intros; exists (app (env a' s) (env b s)); auto 6.
Save PC1_app_ctxt_l.
Hint Resolve PC1_app_ctxt_l.
Goal
forall (a b b' : terms) (s : sub_explicits),
e_relSL _ b b' ->
exists u : terms,
e_relSLstar _ (app (env a s) (env b s)) u /\
e_relSLstar _ (env (app a b') s) u.
intros; exists (app (env a s) (env b' s)); auto 6.
Save PC2_app_ctxt_l.
Hint Resolve PC2_app_ctxt_l.
Goal
forall (a b : terms) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (app (env a s) (env b s)) u /\
e_relSLstar _ (env (app a b) s') u.
intros; exists (app (env a s') (env b s')); split; red in |- *.
apply star_trans1 with (app (env a s') (env b s)); auto.
auto.
Save PC_app_ctxt_r.
Hint Resolve PC_app_ctxt_r.
Goal
forall (a b x' : terms) (s : sub_explicits),
e_relSL _ (app a b) x' ->
exists u : terms,
e_relSLstar _ (app (env a s) (env b s)) u /\ e_relSLstar _ (env x' s) u.
intros a b x' s H; pattern x' in |- *; apply case_SLapp with a b; auto.
Save PC_app_ctxt_l.
Hint Resolve PC_app_ctxt_l.
Goal
forall a : terms,
exists u : terms,
e_relSLstar _ (lambda (env a (lift id))) u /\ e_relSLstar _ (lambda a) u.
intro; exists (lambda a); split; red in |- *.
apply star_trans1 with (lambda (env a id)); auto.
auto.
Save PC_lambda_id.
Hint Resolve PC_lambda_id.
Goal
forall (a x' : terms) (s : sub_explicits),
e_relSL _ (lambda a) x' ->
exists u : terms,
e_relSLstar _ (lambda (env a (lift s))) u /\ e_relSLstar _ (env x' s) u.
intros a x' s H; pattern x' in |- *; apply case_SLlambda with a; intros.
2: assumption.
exists (lambda (env a' (lift s))); auto 6.
Save PC_lambda_ctxt_l.
Hint Resolve PC_lambda_ctxt_l.
Goal
forall (a : terms) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (lambda (env a (lift s))) u /\
e_relSLstar _ (env (lambda a) s') u.
intros; exists (lambda (env a (lift s'))); auto 8.
Save PC_lambda_ctxt_r.
Hint Resolve PC_lambda_ctxt_r.
Goal
forall (a : terms) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env a (comp s id)) u /\ e_relSLstar _ (env a s) u.
intros; exists (env a s); split; red in |- *; auto.
Save PC1_clos_id.
Hint Resolve PC1_clos_id.
Goal
forall (a b : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (app a b) (comp s t)) u /\
e_relSLstar _ (env (app (env a s) (env b s)) t) u.
intros; exists (app (env a (comp s t)) (env b (comp s t))); split;
red in |- *.
auto.
apply star_trans1 with (app (env (env a s) t) (env (env b s) t)).
auto.
apply star_trans1 with (app (env a (comp s t)) (env (env b s) t)); auto.
Save PC_clos_app.
Hint Resolve PC_clos_app.
Goal
forall (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (lambda a) (comp s t)) u /\
e_relSLstar _ (env (lambda (env a (lift s))) t) u.
intros; exists (lambda (env a (lift (comp s t)))); split; red in |- *.
auto.
apply star_trans1 with (lambda (env (env a (lift s)) (lift t))).
auto.
apply star_trans1 with (lambda (env a (comp (lift s) (lift t)))); auto 6.
Save PC_clos_lambda.
Hint Resolve PC_clos_lambda.
Goal
forall (a : terms) (s s1 t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (env a s1) (comp s t)) u /\
e_relSLstar _ (env (env a (comp s1 s)) t) u.
intros; exists (env a (comp s1 (comp s t))); split; red in |- *.
auto.
apply star_trans1 with (env a (comp (comp s1 s) t)); auto.
Save PC_clos_clos.
Hint Resolve PC_clos_clos.
Goal
forall (n : nat) (t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp shift t)) u /\
e_relSLstar _ (env (var (S n)) t) u.
intros; exists (env (var (S n)) t); auto 6.
Save PC_clos_varshift1.
Hint Resolve PC_clos_varshift1.
Goal
forall (n : nat) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp (comp shift s) t)) u /\
e_relSLstar _ (env (env (var (S n)) s) t) u.
intros; exists (env (var (S n)) (comp s t)); split; red in |- *.
apply star_trans1 with (env (var n) (comp shift (comp s t))); auto.
auto.
Save PC_clos_varshift2.
Hint Resolve PC_clos_varshift2.
Goal
forall (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var 0) (comp (cons a s) t)) u /\
e_relSLstar _ (env a t) u.
intros; exists (env a t); split; red in |- *.
apply star_trans1 with (env (var 0) (cons (env a t) (comp s t))); auto.
auto.
Save PC_clos_fvarcons.
Hint Resolve PC_clos_fvarcons.
Goal
forall s t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) (comp (lift s) t)) u /\
e_relSLstar _ (env (var 0) t) u.
intros; exists (env (var 0) t); auto 6.
Save PC_clos_fvarlift1.
Hint Resolve PC_clos_fvarlift1.
Goal
forall s1 s2 t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) (comp (comp (lift s1) s2) t)) u /\
e_relSLstar _ (env (env (var 0) s2) t) u.
intros; exists (env (var 0) (comp s2 t)); split; red in |- *.
apply star_trans1 with (env (var 0) (comp (lift s1) (comp s2 t))); auto.
auto.
Save PC_clos_fvarlift2.
Hint Resolve PC_clos_fvarlift2.
Goal
forall (n : nat) (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (comp (cons a s) t)) u /\
e_relSLstar _ (env (env (var n) s) t) u.
intros; exists (env (var n) (comp s t)); split; red in |- *.
apply star_trans1 with (env (var (S n)) (cons (env a t) (comp s t))); auto.
auto.
Save PC_clos_rvarcons.
Hint Resolve PC_clos_rvarcons.
Goal
forall (n : nat) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (comp (lift s) t)) u /\
e_relSLstar _ (env (env (var n) (comp s shift)) t) u.
intros; exists (env (var n) (comp s (comp shift t))); split; red in |- *.
auto.
apply star_trans1 with (env (var n) (comp (comp s shift) t)); auto.
Save PC_clos_rvarlift1.
Hint Resolve PC_clos_rvarlift1.
Goal
forall (n : nat) (s1 s2 t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (comp (comp (lift s1) s2) t)) u /\
e_relSLstar _ (env (env (var n) (comp s1 (comp shift s2))) t) u.
intros; exists (env (var n) (comp s1 (comp shift (comp s2 t)))); split;
red in |- *.
apply star_trans1 with (env (var (S n)) (comp (lift s1) (comp s2 t))); auto.
apply star_trans1 with (env (var n) (comp (comp s1 (comp shift s2)) t)).
auto.
apply star_trans1 with (env (var n) (comp s1 (comp (comp shift s2) t)));
auto 6.
Save PC_clos_rvarlift2.
Hint Resolve PC_clos_rvarlift2.
Goal
forall (a : terms) (t : sub_explicits),
exists u : terms,
e_relSLstar _ (env a (comp id t)) u /\ e_relSLstar _ (env a t) u.
intros; exists (env a t); auto 8.
Save PC2_clos_id.
Hint Resolve PC2_clos_id.
Goal
forall (a a' : terms) (s t : sub_explicits),
e_relSL _ a a' ->
exists u : terms,
e_relSLstar _ (env a (comp s t)) u /\ e_relSLstar _ (env (env a' s) t) u.
intros; exists (env a' (comp s t)); auto 8.
Save PC1_clos_ctxt_l.
Hint Resolve PC1_clos_ctxt_l.
Goal
forall (a : terms) (s s' t : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env a (comp s t)) u /\ e_relSLstar _ (env (env a s') t) u.
intros; exists (env a (comp s' t)); auto 6.
Save PC2_clos_ctxt_l.
Hint Resolve PC2_clos_ctxt_l.
Goal
forall (a : terms) (s t t' : sub_explicits),
e_relSL _ t t' ->
exists u : terms,
e_relSLstar _ (env a (comp s t)) u /\ e_relSLstar _ (env (env a s) t') u.
intros; exists (env a (comp s t')); auto 6.
Save PC_clos_ctxt_r.
Hint Resolve PC_clos_ctxt_r.
Goal
forall (a x' : terms) (s t : sub_explicits),
e_relSL _ (env a s) x' ->
exists u : terms,
e_relSLstar _ (env a (comp s t)) u /\ e_relSLstar _ (env x' t) u.
intros a x' s t H; pattern a, s, x' in |- *; apply case_SLenv; auto.
Save PC_clos_ctxt_l.
Hint Resolve PC_clos_ctxt_l.
Goal
forall (n : nat) (a : terms) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (cons a s)) u /\
e_relSLstar _ (env (var n) s) u.
intros; exists (env (var n) s); auto 6.
Save PC_varshift2_shiftcons.
Hint Resolve PC_varshift2_shiftcons.
Goal
forall (n : nat) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (lift s)) u /\
e_relSLstar _ (env (var n) (comp s shift)) u.
intros; exists (env (var n) (comp s shift)); auto 6.
Save PC_varshift2_shiftlift1.
Hint Resolve PC_varshift2_shiftlift1.
Goal
forall (n : nat) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var (S n)) (comp (lift s) t)) u /\
e_relSLstar _ (env (var n) (comp s (comp shift t))) u.
intros; exists (env (var n) (comp s (comp shift t))); auto 6.
Save PC_varshift2_shiftlift2.
Hint Resolve PC_varshift2_shiftlift2.
Goal
forall n : nat,
exists u : terms,
e_relSLstar _ (env (var (S n)) id) u /\ e_relSLstar _ (env (var n) shift) u.
intros; exists (var (S n)); auto 6.
Save PC_varshift2_idr.
Hint Resolve PC_varshift2_idr.
Goal
forall (n : nat) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env (var (S n)) s) u /\
e_relSLstar _ (env (var n) (comp shift s')) u.
intros; exists (env (var (S n)) s'); auto 6.
Save PC_varshift2_ctxt_r.
Hint Resolve PC_varshift2_ctxt_r.
Goal
forall (n : nat) (s x' : sub_explicits),
e_relSL _ (comp shift s) x' ->
exists u : terms,
e_relSLstar _ (env (var (S n)) s) u /\ e_relSLstar _ (env (var n) x') u.
intros n s x' H; pattern s, x' in |- *; apply case_SLcomp1; auto.
Save PC_varshift2_ctxt_r'.
Hint Resolve PC_varshift2_ctxt_r'.
Goal
forall (a a' : terms) (s : sub_explicits),
e_relSL _ a a' ->
exists u : terms,
e_relSLstar _ a u /\ e_relSLstar _ (env (var 0) (cons a' s)) u.
intros; exists a'; auto 6.
Save PC1_fvarcons_ctxt_r.
Hint Resolve PC1_fvarcons_ctxt_r.
Goal
forall (a : terms) (s' : sub_explicits),
exists u : terms,
e_relSLstar _ a u /\ e_relSLstar _ (env (var 0) (cons a s')) u.
intros; exists a; auto 6.
Save PC2_fvarcons_ctxt_r.
Hint Resolve PC2_fvarcons_ctxt_r.
Goal
forall (a : terms) (s x' : sub_explicits),
e_relSL _ (cons a s) x' ->
exists u : terms, e_relSLstar _ a u /\ e_relSLstar _ (env (var 0) x') u.
intros a s x' H; pattern x' in |- *; apply case_SLcons with a s; auto.
Save PC_fvarcons_ctxt_r.
Goal
exists u : terms, e_relSLstar _ (var 0) u /\ e_relSLstar _ (env (var 0) id) u.
intros; exists (var 0); auto 6.
Save PC_fvarlift1_liftid.
Hint Resolve PC_fvarlift1_liftid.
Goal
forall s' : sub_explicits,
exists u : terms,
e_relSLstar _ (var 0) u /\ e_relSLstar _ (env (var 0) (lift s')) u.
intros; exists (var 0); auto 6.
Save PC_fvarlift1_ctxt_r.
Hint Resolve PC_fvarlift1_ctxt_r.
Goal
forall s x' : sub_explicits,
e_relSL _ (lift s) x' ->
exists u : terms, e_relSLstar _ (var 0) u /\ e_relSLstar _ (env (var 0) x') u.
intros s x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_fvarlift1_ctxt_r'.
Goal
forall s t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) (lift t)) u /\
e_relSLstar _ (env (var 0) (lift (comp s t))) u.
intros; exists (var 0); auto 6.
Save PC_fvarlift2_lift1.
Hint Resolve PC_fvarlift2_lift1.
Goal
forall s t v : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) (comp (lift t) v)) u /\
e_relSLstar _ (env (var 0) (comp (lift (comp s t)) v)) u.
intros; exists (env (var 0) v); auto 6.
Save PC_fvarlift2_lift2.
Hint Resolve PC_fvarlift2_lift2.
Goal
forall (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var 0) (cons a t)) u /\
e_relSLstar _ (env (var 0) (cons a (comp s t))) u.
intros; exists a; auto 6.
Save PC_fvarlift2_liftenv.
Hint Resolve PC_fvarlift2_liftenv.
Goal
forall s : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) id) u /\ e_relSLstar _ (env (var 0) (lift s)) u.
exists (var 0); auto 6.
Save PC_fvarlift2_idr.
Hint Resolve PC_fvarlift2_idr.
Goal
forall t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) t) u /\
e_relSLstar _ (env (var 0) (comp id t)) u.
intros; exists (env (var 0) t); auto 7.
Save PC_fvarlift2_liftid.
Hint Resolve PC_fvarlift2_liftid.
Goal
forall s' t : sub_explicits,
exists u : terms,
e_relSLstar _ (env (var 0) t) u /\
e_relSLstar _ (env (var 0) (comp (lift s') t)) u.
intros; exists (env (var 0) t); auto 6.
Save PC1_fvarlift2_ctxt_r.
Hint Resolve PC1_fvarlift2_ctxt_r.
Goal
forall s t t' : sub_explicits,
e_relSL _ t t' ->
exists u : terms,
e_relSLstar _ (env (var 0) t) u /\
e_relSLstar _ (env (var 0) (comp (lift s) t')) u.
intros; exists (env (var 0) t'); auto 6.
Save PC2_fvarlift2_ctxt_r.
Hint Resolve PC2_fvarlift2_ctxt_r.
Goal
forall s t x' : sub_explicits,
e_relSL _ (comp (lift s) t) x' ->
exists u : terms,
e_relSLstar _ (env (var 0) t) u /\ e_relSLstar _ (env (var 0) x') u.
intros s t x' H; pattern t, x' in |- *; apply case_SLcomp2 with s; auto.
intros; pattern s, x'0 in |- *; apply case_SLlift; auto.
Save PC_fvarlift2_ctxt_r.
Goal
forall (n : nat) (a' : terms) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) s) u /\
e_relSLstar _ (env (var (S n)) (cons a' s)) u.
intros; exists (env (var n) s); auto 6.
Save PC1_rvarcons_ctxt_r.
Hint Resolve PC1_rvarcons_ctxt_r.
Goal
forall (n : nat) (a : terms) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env (var n) s) u /\
e_relSLstar _ (env (var (S n)) (cons a s')) u.
intros; exists (env (var n) s'); auto 6.
Save PC2_rvarcons_ctxt_r.
Hint Resolve PC2_rvarcons_ctxt_r.
Goal
forall (n : nat) (a : terms) (s x' : sub_explicits),
e_relSL _ (cons a s) x' ->
exists u : terms,
e_relSLstar _ (env (var n) s) u /\ e_relSLstar _ (env (var (S n)) x') u.
intros n a s x' H; pattern x' in |- *; apply case_SLcons with a s; auto.
Save PC_rvarcons_ctxt_r.
Goal
forall n : nat,
exists u : terms,
e_relSLstar _ (env (var n) (comp id shift)) u /\
e_relSLstar _ (env (var (S n)) id) u.
intros; exists (var (S n)); split; red in |- *.
apply star_trans1 with (env (var n) shift); auto.
auto.
Save PC_rvarlift1_id.
Hint Resolve PC_rvarlift1_id.
Goal
forall (n : nat) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s shift)) u /\
e_relSLstar _ (env (var (S n)) (lift s')) u.
intros; exists (env (var n) (comp s' shift)); auto 6.
Save PC_rvarlift1_ctxt_r.
Hint Resolve PC_rvarlift1_ctxt_r.
Goal
forall (n : nat) (s x' : sub_explicits),
e_relSL _ (lift s) x' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s shift)) u /\
e_relSLstar _ (env (var (S n)) x') u.
intros n s x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_rvarlift1_ctxt_r'.
Hint Resolve PC_rvarlift1_ctxt_r'.
Goal
forall (n : nat) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift (lift t)))) u /\
e_relSLstar _ (env (var (S n)) (lift (comp s t))) u.
intros; exists (env (var n) (comp s (comp t shift))); split; red in |- *.
auto 6.
apply star_trans1 with (env (var n) (comp (comp s t) shift)); auto.
Save PC_rvarlift2_lift1.
Hint Resolve PC_rvarlift2_lift1.
Goal
forall (n : nat) (s t v : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift (comp (lift t) v)))) u /\
e_relSLstar _ (env (var (S n)) (comp (lift (comp s t)) v)) u.
intros; exists (env (var n) (comp s (comp t (comp shift v)))); split;
red in |- *.
auto 6.
apply star_trans1 with (env (var n) (comp (comp s t) (comp shift v))); auto.
Save PC_rvarlift2_lift2.
Hint Resolve PC_rvarlift2_lift2.
Goal
forall (n : nat) (a : terms) (s t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift (cons a t)))) u /\
e_relSLstar _ (env (var (S n)) (cons a (comp s t))) u.
intros; exists (env (var n) (comp s t)); auto 8.
Save PC_rvarlift2_liftenv.
Hint Resolve PC_rvarlift2_liftenv.
Goal
forall (n : nat) (s : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift id))) u /\
e_relSLstar _ (env (var (S n)) (lift s)) u.
intros; exists (env (var n) (comp s shift)); auto 8.
Save PC_rvarlift2_idr.
Hint Resolve PC_rvarlift2_idr.
Goal
forall (n : nat) (t : sub_explicits),
exists u : terms,
e_relSLstar _ (env (var n) (comp id (comp shift t))) u /\
e_relSLstar _ (env (var (S n)) (comp id t)) u.
intros; exists (env (var (S n)) t); split; red in |- *.
apply star_trans1 with (env (var n) (comp shift t)); auto.
auto.
Save PC_rvarlift2_liftid.
Hint Resolve PC_rvarlift2_liftid.
Goal
forall (n : nat) (s s' t : sub_explicits),
e_relSL _ s s' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift t))) u /\
e_relSLstar _ (env (var (S n)) (comp (lift s') t)) u.
intros; exists (env (var n) (comp s' (comp shift t))); auto 6.
Save PC1_rvarlift2_ctxt_r.
Hint Resolve PC1_rvarlift2_ctxt_r.
Goal
forall (n : nat) (s t t' : sub_explicits),
e_relSL _ t t' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift t))) u /\
e_relSLstar _ (env (var (S n)) (comp (lift s) t')) u.
intros; exists (env (var n) (comp s (comp shift t'))); auto 7.
Save PC2_rvarlift2_ctxt_r.
Hint Resolve PC2_rvarlift2_ctxt_r.
Goal
forall (n : nat) (s t x' : sub_explicits),
e_relSL _ (comp (lift s) t) x' ->
exists u : terms,
e_relSLstar _ (env (var n) (comp s (comp shift t))) u /\
e_relSLstar _ (env (var (S n)) x') u.
intros n s t x' H; pattern t, x' in |- *; apply case_SLcomp2 with s; auto.
intros; pattern s, x'0 in |- *; apply case_SLlift; auto.
Save PC_rvarlift2_ctxt_r.
Hint Resolve PC_rvarlift2_ctxt_r.
Goal
forall s1 s2 t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (comp s1 s2) (comp t v)) u /\
e_relSLstar _ (comp (comp s1 (comp s2 t)) v) u.
intros; exists (comp s1 (comp s2 (comp t v))); split; red in |- *.
auto.
apply star_trans1 with (comp s1 (comp (comp s2 t) v)); auto.
Save PC_assenv_assenv.
Hint Resolve PC_assenv_assenv.
Goal
forall (a : terms) (s t v : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp (cons a s) (comp t v)) u /\
e_relSLstar _ (comp (cons (env a t) (comp s t)) v) u.
intros; exists (cons (env a (comp t v)) (comp s (comp t v))); split;
red in |- *.
auto.
apply star_trans1 with (cons (env (env a t) v) (comp (comp s t) v)).
auto.
apply star_trans1 with (cons (env a (comp t v)) (comp (comp s t) v)); auto.
Save PC_assenv_mapenv.
Hint Resolve PC_assenv_mapenv.
Goal
forall (a : terms) (s v : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp shift (comp (cons a s) v)) u /\
e_relSLstar _ (comp s v) u.
intros; exists (comp s v); split; red in |- *.
apply star_trans1 with (comp shift (cons (env a v) (comp s v))); auto.
auto.
Save PC_assenv_shiftcons.
Hint Resolve PC_assenv_shiftcons.
Goal
forall s v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp shift (comp (lift s) v)) u /\
e_relSLstar _ (comp (comp s shift) v) u.
intros; exists (comp s (comp shift v)); auto 6.
Save PC_assenv_shiftlift1.
Hint Resolve PC_assenv_shiftlift1.
Goal
forall s t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp shift (comp (comp (lift s) t) v)) u /\
e_relSLstar _ (comp (comp s (comp shift t)) v) u.
intros; exists (comp s (comp shift (comp t v))); split; red in |- *.
apply star_trans1 with (comp shift (comp (lift s) (comp t v))); auto.
apply star_trans1 with (comp s (comp (comp shift t) v)); auto.
Save PC_assenv_shiftlift2.
Hint Resolve PC_assenv_shiftlift2.
Goal
forall s t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift s) (comp (lift t) v)) u /\
e_relSLstar _ (comp (lift (comp s t)) v) u.
intros; exists (comp (lift (comp s t)) v); auto 6.
Save PC_assenv_lift1.
Hint Resolve PC_assenv_lift1.
Goal
forall s t1 t2 v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift s) (comp (comp (lift t1) t2) v)) u /\
e_relSLstar _ (comp (comp (lift (comp s t1)) t2) v) u.
intros; exists (comp (lift (comp s t1)) (comp t2 v)); split; red in |- *.
apply star_trans1 with (comp (lift s) (comp (lift t1) (comp t2 v))); auto.
auto.
Save PC_assenv_lift2.
Hint Resolve PC_assenv_lift2.
Goal
forall (a : terms) (s t v : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp (lift s) (comp (cons a t) v)) u /\
e_relSLstar _ (comp (cons a (comp s t)) v) u.
intros; exists (cons (env a v) (comp s (comp t v))); split; red in |- *.
apply star_trans1 with (comp (lift s) (cons (env a v) (comp t v))); auto.
apply star_trans1 with (cons (env a v) (comp (comp s t) v)); auto.
Save PC_assenv_liftenv.
Hint Resolve PC_assenv_liftenv.
Goal
forall t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp id (comp t v)) u /\ e_relSLstar _ (comp t v) u.
intros; exists (comp t v); auto 6.
Save PC_assenv_idl.
Hint Resolve PC_assenv_idl.
Goal
forall s v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp id v)) u /\ e_relSLstar _ (comp s v) u.
intros; exists (comp s v); auto 7.
Save PC1_assenv_idr.
Hint Resolve PC1_assenv_idr.
Goal
forall s t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t id)) u /\ e_relSLstar _ (comp s t) u.
intros; exists (comp s t); auto 7.
Save PC2_assenv_idr.
Hint Resolve PC2_assenv_idr.
Goal
forall s s' t v : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t v)) u /\ e_relSLstar _ (comp (comp s' t) v) u.
intros; exists (comp s' (comp t v)); auto 6.
Save PC_assenv_ctxt_l.
Hint Resolve PC_assenv_ctxt_l.
Goal
forall s t t' v : sub_explicits,
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t v)) u /\ e_relSLstar _ (comp (comp s t') v) u.
intros; exists (comp s (comp t' v)); auto 6.
Save PC1_assenv_ctxt_r.
Hint Resolve PC1_assenv_ctxt_r.
Goal
forall s t v v' : sub_explicits,
e_relSL _ v v' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t v)) u /\ e_relSLstar _ (comp (comp s t) v') u.
intros; exists (comp s (comp t v')); auto 6.
Save PC2_assenv_ctxt_r.
Hint Resolve PC2_assenv_ctxt_r.
Goal
forall s t v x' : sub_explicits,
e_relSL _ (comp s t) x' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp t v)) u /\ e_relSLstar _ (comp x' v) u.
intros s t v x' H; pattern s, t, x' in |- *; apply case_SLcomp; auto.
Save PC_assenv_ctxt_r.
Hint Resolve PC_assenv_ctxt_r.
Goal
forall (a : terms) (s : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (cons (env a id) (comp s id)) u /\ e_relSLstar _ (cons a s) u.
intros; exists (cons a s); split; red in |- *.
apply star_trans1 with (cons a (comp s id)); auto.
auto.
Save PC_mapenv_idr.
Hint Resolve PC_mapenv_idr.
Goal
forall (a a' : terms) (s t : sub_explicits),
e_relSL _ a a' ->
exists u : sub_explicits,
e_relSLstar _ (cons (env a t) (comp s t)) u /\
e_relSLstar _ (comp (cons a' s) t) u.
intros; exists (cons (env a' t) (comp s t)); auto 6.
Save PC1_mapenv_ctxt_l.
Hint Resolve PC1_mapenv_ctxt_l.
Goal
forall (a : terms) (s s' t : sub_explicits),
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (cons (env a t) (comp s t)) u /\
e_relSLstar _ (comp (cons a s') t) u.
intros; exists (cons (env a t) (comp s' t)); auto 6.
Save PC2_mapenv_ctxt_l.
Hint Resolve PC2_mapenv_ctxt_l.
Goal
forall (a : terms) (s t t' : sub_explicits),
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (cons (env a t) (comp s t)) u /\
e_relSLstar _ (comp (cons a s) t') u.
intros; exists (cons (env a t') (comp s t')); split; red in |- *.
apply star_trans1 with (cons (env a t') (comp s t)); auto.
auto.
Save PC_mapenv_ctxt_r.
Hint Resolve PC_mapenv_ctxt_r.
Goal
forall (a : terms) (s t x' : sub_explicits),
e_relSL _ (cons a s) x' ->
exists u : sub_explicits,
e_relSLstar _ (cons (env a t) (comp s t)) u /\ e_relSLstar _ (comp x' t) u.
intros a s t x' H; pattern x' in |- *; apply case_SLcons with a s; auto.
Save PC_mapenv_ctxt_l.
Hint Resolve PC_mapenv_ctxt_l.
Goal
forall (a' : terms) (s : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ s u /\ e_relSLstar _ (comp shift (cons a' s)) u.
intros; exists s; auto 6.
Save PC1_shiftcons_ctxt_r.
Hint Resolve PC1_shiftcons_ctxt_r.
Goal
forall (a : terms) (s s' : sub_explicits),
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ s u /\ e_relSLstar _ (comp shift (cons a s')) u.
intros; exists s'; auto 6.
Save PC2_shiftcons_ctxt_r.
Hint Resolve PC2_shiftcons_ctxt_r.
Goal
forall (a : terms) (s x' : sub_explicits),
e_relSL _ (cons a s) x' ->
exists u : sub_explicits,
e_relSLstar _ s u /\ e_relSLstar _ (comp shift x') u.
intros a s x' H; pattern x' in |- *; apply case_SLcons with a s; auto.
Save PC_shiftcons_ctxt_r.
Goal
exists u : sub_explicits,
e_relSLstar _ (comp id shift) u /\ e_relSLstar _ (comp shift id) u.
intros; exists shift; auto 6.
Save PC_shiftlift1_liftid.
Hint Resolve PC_shiftlift1_liftid.
Goal
forall s s' : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (comp s shift) u /\ e_relSLstar _ (comp shift (lift s')) u.
intros; exists (comp s' shift); auto 6.
Save PC_shiftlift1_ctxt_r.
Hint Resolve PC_shiftlift1_ctxt_r.
Goal
forall s x' : sub_explicits,
e_relSL _ (lift s) x' ->
exists u : sub_explicits,
e_relSLstar _ (comp s shift) u /\ e_relSLstar _ (comp shift x') u.
intros s x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_shiftlift1_ctxt_r'.
Hint Resolve PC_shiftlift1_ctxt_r'.
Goal
forall s t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift (lift t))) u /\
e_relSLstar _ (comp shift (lift (comp s t))) u.
intros; exists (comp s (comp t shift)); split; red in |- *.
auto.
apply star_trans1 with (comp (comp s t) shift); auto.
Save PC_shiftlift2_lift1.
Hint Resolve PC_shiftlift2_lift1.
Goal
forall s t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift (comp (lift t) v))) u /\
e_relSLstar _ (comp shift (comp (lift (comp s t)) v)) u.
intros; exists (comp s (comp t (comp shift v))); split; red in |- *.
auto.
apply star_trans1 with (comp (comp s t) (comp shift v)); auto.
Save PC_shiftlift2_lift2.
Hint Resolve PC_shiftlift2_lift2.
Goal
forall (a : terms) (s t : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift (cons a t))) u /\
e_relSLstar _ (comp shift (cons a (comp s t))) u.
intros; exists (comp s t); auto 7.
Save PC_shiftlift2_liftenv.
Hint Resolve PC_shiftlift2_liftenv.
Goal
forall t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp id (comp shift t)) u /\
e_relSLstar _ (comp shift (comp id t)) u.
intros; exists (comp shift t); auto 7.
Save PC_shiftlift2_liftid.
Hint Resolve PC_shiftlift2_liftid.
Goal
forall s : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift id)) u /\
e_relSLstar _ (comp shift (lift s)) u.
intros; exists (comp s shift); auto 7.
Save PC_shiftlift2_idr.
Hint Resolve PC_shiftlift2_idr.
Goal
forall s s' t : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift t)) u /\
e_relSLstar _ (comp shift (comp (lift s') t)) u.
intros; exists (comp s' (comp shift t)); auto 6.
Save PC1_shiftlift2_ctxt_r.
Hint Resolve PC1_shiftlift2_ctxt_r.
Goal
forall s t t' : sub_explicits,
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift t)) u /\
e_relSLstar _ (comp shift (comp (lift s) t')) u.
intros; exists (comp s (comp shift t')); auto 6.
Save PC2_shiftlift2_ctxt_r.
Hint Resolve PC2_shiftlift2_ctxt_r.
Goal
forall s t x' : sub_explicits,
e_relSL _ (comp (lift s) t) x' ->
exists u : sub_explicits,
e_relSLstar _ (comp s (comp shift t)) u /\ e_relSLstar _ (comp shift x') u.
intros s t x' H; pattern t, x' in |- *; apply case_SLcomp2 with s; auto.
intros; pattern s, x'0 in |- *; apply case_SLlift; auto.
Save PC_shiftlift2_ctxt_r.
Hint Resolve PC_shiftlift2_ctxt_r.
Goal
forall t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (lift (comp id t)) u /\ e_relSLstar _ (comp id (lift t)) u.
intros; exists (lift t); auto 7.
Save PC1_lift1_liftid.
Hint Resolve PC1_lift1_liftid.
Goal
forall s : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (lift (comp s id)) u /\ e_relSLstar _ (comp (lift s) id) u.
intros; exists (lift s); auto 7.
Save PC2_lift1_liftid.
Hint Resolve PC2_lift1_liftid.
Goal
forall s s' t : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (lift (comp s t)) u /\
e_relSLstar _ (comp (lift s') (lift t)) u.
intros; exists (lift (comp s' t)); auto 6.
Save PC_lift1_ctxt_l.
Hint Resolve PC_lift1_ctxt_l.
Goal
forall s t t' : sub_explicits,
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (lift (comp s t)) u /\
e_relSLstar _ (comp (lift s) (lift t')) u.
intros; exists (lift (comp s t')); auto 6.
Save PC_lift1_ctxt_r.
Hint Resolve PC_lift1_ctxt_r.
Goal
forall s t x' : sub_explicits,
e_relSL _ (lift s) x' ->
exists u : sub_explicits,
e_relSLstar _ (lift (comp s t)) u /\ e_relSLstar _ (comp x' (lift t)) u.
intros s t x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_lift1_ctxt_l'.
Hint Resolve PC_lift1_ctxt_l'.
Goal
forall s t x' : sub_explicits,
e_relSL _ (lift t) x' ->
exists u : sub_explicits,
e_relSLstar _ (lift (comp s t)) u /\ e_relSLstar _ (comp (lift s) x') u.
intros a t x' H; pattern t, x' in |- *; apply case_SLlift; auto.
Save PC_lift1_ctxt_r'.
Hint Resolve PC_lift1_ctxt_r'.
Goal
forall s t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t)) (lift v)) u /\
e_relSLstar _ (comp (lift s) (lift (comp t v))) u.
intros; exists (lift (comp s (comp t v))); split; red in |- *.
apply star_trans1 with (lift (comp (comp s t) v)); auto.
auto.
Save PC_lift2_lift1.
Hint Resolve PC_lift2_lift1.
Goal
forall s t1 t2 v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t1)) (comp (lift t2) v)) u /\
e_relSLstar _ (comp (lift s) (comp (lift (comp t1 t2)) v)) u.
intros; exists (comp (lift (comp s (comp t1 t2))) v); split; red in |- *.
apply star_trans1 with (comp (lift (comp (comp s t1) t2)) v); auto 6.
auto.
Save PC_lift2_lift2.
Hint Resolve PC_lift2_lift2.
Goal
forall (a : terms) (s t v : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t)) (cons a v)) u /\
e_relSLstar _ (comp (lift s) (cons a (comp t v))) u.
intros; exists (cons a (comp s (comp t v))); split; red in |- *.
apply star_trans1 with (cons a (comp (comp s t) v)); auto.
auto.
Save PC_lift2_liftenv.
Hint Resolve PC_lift2_liftenv.
Goal
forall t v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp id t)) v) u /\
e_relSLstar _ (comp id (comp (lift t) v)) u.
intros; exists (comp (lift t) v); auto 8.
Save PC1_lift2_liftid.
Hint Resolve PC1_lift2_liftid.
Goal
forall s v : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s id)) v) u /\
e_relSLstar _ (comp (lift s) (comp id v)) u.
intros; exists (comp (lift s) v); auto 8.
Save PC2_lift2_liftid.
Hint Resolve PC2_lift2_liftid.
Goal
forall s t : sub_explicits,
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t)) id) u /\
e_relSLstar _ (comp (lift s) (lift t)) u.
intros; exists (lift (comp s t)); auto 6.
Save PC_lift2_idr.
Hint Resolve PC_lift2_idr.
Goal
forall s s' t v : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t)) v) u /\
e_relSLstar _ (comp (lift s') (comp (lift t) v)) u.
intros; exists (comp (lift (comp s' t)) v); auto 7.
Save PC_lift2_ctxt_l.
Hint Resolve PC_lift2_ctxt_l.
Goal
forall s t t' v : sub_explicits,
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t)) v) u /\
e_relSLstar _ (comp (lift s) (comp (lift t') v)) u.
intros; exists (comp (lift (comp s t')) v); auto 7.
Save PC1_lift2_ctxt_r.
Hint Resolve PC1_lift2_ctxt_r.
Goal
forall s t v v' : sub_explicits,
e_relSL _ v v' ->
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t)) v) u /\
e_relSLstar _ (comp (lift s) (comp (lift t) v')) u.
intros; exists (comp (lift (comp s t)) v'); auto 6.
Save PC2_lift2_ctxt_r.
Hint Resolve PC2_lift2_ctxt_r.
Goal
forall s t v x' : sub_explicits,
e_relSL _ (lift s) x' ->
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t)) v) u /\
e_relSLstar _ (comp x' (comp (lift t) v)) u.
intros s t v x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_lift2_ctxt_l'.
Hint Resolve PC_lift2_ctxt_l'.
Goal
forall s t v x' : sub_explicits,
e_relSL _ (comp (lift t) v) x' ->
exists u : sub_explicits,
e_relSLstar _ (comp (lift (comp s t)) v) u /\
e_relSLstar _ (comp (lift s) x') u.
intros s t v x' H; pattern v, x' in |- *; apply case_SLcomp2 with t; auto.
intros; pattern t, x'0 in |- *; apply case_SLlift; auto.
Save PC_lift2_ctxt_r.
Hint Resolve PC_lift2_ctxt_r.
Goal
forall (a : terms) (t : sub_explicits),
exists u : sub_explicits,
e_relSLstar _ (cons a (comp id t)) u /\
e_relSLstar _ (comp id (cons a t)) u.
intros; exists (cons a t); auto 7.
Save PC_liftenv_liftid.
Hint Resolve PC_liftenv_liftid.
Goal
forall (a : terms) (s s' t : sub_explicits),
e_relSL _ s s' ->
exists u : sub_explicits,
e_relSLstar _ (cons a (comp s t)) u /\
e_relSLstar _ (comp (lift s') (cons a t)) u.
intros; exists (cons a (comp s' t)); auto 6.
Save PC_liftenv_ctxt_l.
Hint Resolve PC_liftenv_ctxt_l.
Goal
forall (a a' : terms) (s t : sub_explicits),
e_relSL _ a a' ->
exists u : sub_explicits,
e_relSLstar _ (cons a (comp s t)) u /\
e_relSLstar _ (comp (lift s) (cons a' t)) u.
intros; exists (cons a' (comp s t)); auto 6.
Save PC1_liftenv_ctxt_r.
Hint Resolve PC1_liftenv_ctxt_r.
Goal
forall (a : terms) (s t t' : sub_explicits),
e_relSL _ t t' ->
exists u : sub_explicits,
e_relSLstar _ (cons a (comp s t)) u /\
e_relSLstar _ (comp (lift s) (cons a t')) u.
intros; exists (cons a (comp s t')); auto 6.
Save PC2_liftenv_ctxt_r.
Hint Resolve PC2_liftenv_ctxt_r.
Goal
forall (a : terms) (s t x' : sub_explicits),
e_relSL _ (lift s) x' ->
exists u : sub_explicits,
e_relSLstar _ (cons a (comp s t)) u /\ e_relSLstar _ (comp x' (cons a t)) u.
intros a s t x' H; pattern s, x' in |- *; apply case_SLlift; auto.
Save PC_liftenv_ctxt_l'.
Hint Resolve PC_liftenv_ctxt_l'.
Goal
forall (a : terms) (s t x' : sub_explicits),
e_relSL _ (cons a t) x' ->
exists u : sub_explicits,
e_relSLstar _ (cons a (comp s t)) u /\ e_relSLstar _ (comp (lift s) x') u.
intros a s t x' H; pattern x' in |- *; apply case_SLcons with a t; auto.
Save PC_liftenv_ctxt_r.
Hint Resolve PC_liftenv_ctxt_r.
Goal exists u : sub_explicits, e_relSLstar _ id u /\ e_relSLstar _ id u.
intros; exists id; auto.
Save PC_idl_idr.
Hint Resolve PC_idl_idr.
Goal
forall s s' : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits, e_relSLstar _ s u /\ e_relSLstar _ (comp id s') u.
intros; exists s'; auto 6.
Save PC_idl_ctxt_r.
Hint Resolve PC_idl_ctxt_r.
Goal
forall s s' : sub_explicits,
e_relSL _ s s' ->
exists u : sub_explicits, e_relSLstar _ s u /\ e_relSLstar _ (comp s' id) u.
intros; exists s'; auto 6.
Save PC_idr_ctxt_l.
Hint Resolve PC_idr_ctxt_l.
Goal
forall a a' : terms,
e_relSL _ a a' ->
exists u : terms, e_relSLstar _ a u /\ e_relSLstar _ (env a' id) u.
intros; exists a'; auto 6.
Save PC_id_ctxt_l.
Hint Resolve PC_id_ctxt_l.
|
Require Export Qsyntax.
Require Export Field_Theory_Q.
Require Export Q_ordered_field_properties.
Lemma Qpositive_in_Q_Archimedean_inf:forall qp:Qpositive, {z:Z | (Qpos qp)<=z /\ (z-(Qpos qp))<= Qone}.
Theorem Q_Archimedean_inf:forall q:Q, {z:Z | q<=z /\ (z-q)<= Qone}.
Definition up_Q q:= proj1_sig (Q_Archimedean_inf q).
Definition up_Q_property q := proj2_sig (Q_Archimedean_inf q): q <= (up_Q q) /\ (up_Q q) - q <= Qone.
Lemma Q_Archimedean_nat_inf:forall q:Q, {n:nat | q<=n }.
|
Require Export GeoCoq.Tarski_dev.Ch13_2_length.
Section Angles_1.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma ang_exists : forall A B C, A <> B -> C <> B -> exists a, Q_CongA a /\ a A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)), @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_CongA Tn a) (a A B C)) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_CongA Tn a) (a A B C)) *)
exists (fun D E F => CongA A B C D E F).
(* Goal: and (@Q_CongA Tn (fun D E F : @Tpoint Tn => @CongA Tn A B C D E F)) (@CongA Tn A B C A B C) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @Q_CongA Tn (fun D E F : @Tpoint Tn => @CongA Tn A B C D E F) *)
unfold Q_CongA.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A0 B0 C0 X Y Z) (@CongA Tn A B C X Y Z)))))) *)
exists A.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B0 C0 X Y Z) (@CongA Tn A B C X Y Z))))) *)
exists B.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C0 B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C0 X Y Z) (@CongA Tn A B C X Y Z)))) *)
exists C.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z))) *)
split; auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z)) *)
split; auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
intros.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
auto.
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
Qed.
Lemma ex_points_ang : forall a , Q_CongA a -> exists A, exists B, exists C, a A B C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA Tn a), @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
unfold Q_CongA in H.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
ex_and H A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
ex_and H0 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
ex_and H C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
assert(HH:= H1 A B C).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
destruct HH.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C)) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
exists C.
(* Goal: a A B C *)
apply H2.
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
Qed.
End Angles_1.
Ltac ang_instance a A B C :=
assert(tempo_ang:= ex_points_ang a);
match goal with
|H: Q_CongA a |- _ => assert(tempo_H:=H); apply tempo_ang in tempo_H;
elim tempo_H; intros A ; let tempo_HP := fresh "tempo_HP" in intro tempo_HP; clear tempo_H;
elim tempo_HP; intro B; let tempo_HQ := fresh "tempo_HQ" in intro tempo_HQ ; clear tempo_HP ;
elim tempo_HQ; intro C; intro; clear tempo_HQ
end;
clear tempo_ang.
Section Angles_2.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma ang_conga : forall a A B C A' B' C', Q_CongA a -> a A B C -> a A' B' C' -> CongA A B C A' B' C'.
Lemma is_ang_conga : forall A B C A' B' C' a, Ang A B C a -> Ang A' B' C' a -> CongA A B C A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang Tn A B C a) (_ : @Ang Tn A' B' C' a), @CongA Tn A B C A' B' C' *)
intros.
(* Goal: @CongA Tn A B C A' B' C' *)
unfold Ang in *.
(* Goal: @CongA Tn A B C A' B' C' *)
spliter.
(* Goal: @CongA Tn A B C A' B' C' *)
eapply (ang_conga a); auto.
Qed.
Lemma is_ang_conga_is_ang : forall A B C A' B' C' a, Ang A B C a -> CongA A B C A' B' C' -> Ang A' B' C' a.
Lemma not_conga_not_ang : forall A B C A' B' C' a , Q_CongA a -> ~(CongA A B C A' B' C') -> a A B C -> ~(a A' B' C').
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA Tn a) (_ : not (@CongA Tn A B C A' B' C')) (_ : a A B C), not (a A' B' C') *)
intros.
(* Goal: not (a A' B' C') *)
intro.
(* Goal: False *)
assert(HH:=ang_conga a A B C A' B' C' H H1 H2).
(* Goal: False *)
contradiction.
Qed.
Lemma not_conga_is_ang : forall A B C A' B' C' a , ~(CongA A B C A' B' C') -> Ang A B C a -> ~(a A' B' C').
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : not (@CongA Tn A B C A' B' C')) (_ : @Ang Tn A B C a), not (a A' B' C') *)
intros.
(* Goal: not (a A' B' C') *)
unfold Ang in H0.
(* Goal: not (a A' B' C') *)
spliter.
(* Goal: not (a A' B' C') *)
intro.
(* Goal: False *)
apply H.
(* Goal: @CongA Tn A B C A' B' C' *)
apply (ang_conga a); auto.
Qed.
Lemma not_cong_is_ang1 : forall A B C A' B' C' a , ~(CongA A B C A' B' C') -> Ang A B C a -> ~(Ang A' B' C' a).
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : not (@CongA Tn A B C A' B' C')) (_ : @Ang Tn A B C a), not (@Ang Tn A' B' C' a) *)
intros.
(* Goal: not (@Ang Tn A' B' C' a) *)
intro.
(* Goal: False *)
unfold Ang in *.
(* Goal: False *)
spliter.
(* Goal: False *)
apply H.
(* Goal: @CongA Tn A B C A' B' C' *)
apply (ang_conga a); auto.
Qed.
Lemma ex_eqa : forall a1 a2, (exists A , exists B, exists C, Ang A B C a1 /\ Ang A B C a2) -> EqA a1 a2.
Proof.
(* Goal: forall (a1 a2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2))))), @EqA Tn a1 a2 *)
intros.
(* Goal: @EqA Tn a1 a2 *)
ex_and H A.
(* Goal: @EqA Tn a1 a2 *)
ex_and H0 B.
(* Goal: @EqA Tn a1 a2 *)
ex_and H C.
(* Goal: @EqA Tn a1 a2 *)
assert(HH:=H).
(* Goal: @EqA Tn a1 a2 *)
assert(HH0:=H0).
(* Goal: @EqA Tn a1 a2 *)
unfold Ang in HH.
(* Goal: @EqA Tn a1 a2 *)
unfold Ang in HH0.
(* Goal: @EqA Tn a1 a2 *)
spliter.
(* Goal: @EqA Tn a1 a2 *)
unfold EqA.
(* Goal: forall A B C : @Tpoint Tn, iff (a1 A B C) (a2 A B C) *)
repeat split; auto; intro.
(* Goal: a1 A0 B0 C0 *)
(* Goal: a2 A0 B0 C0 *)
assert(CongA A B C A0 B0 C0).
(* Goal: a1 A0 B0 C0 *)
(* Goal: a2 A0 B0 C0 *)
(* Goal: @CongA Tn A B C A0 B0 C0 *)
eapply (is_ang_conga _ _ _ _ _ _ a1); auto.
(* Goal: a1 A0 B0 C0 *)
(* Goal: a2 A0 B0 C0 *)
(* Goal: @Ang Tn A0 B0 C0 a1 *)
split; auto.
(* Goal: a1 A0 B0 C0 *)
(* Goal: a2 A0 B0 C0 *)
assert(Ang A0 B0 C0 a2).
(* Goal: a1 A0 B0 C0 *)
(* Goal: a2 A0 B0 C0 *)
(* Goal: @Ang Tn A0 B0 C0 a2 *)
apply (is_ang_conga_is_ang A B C); auto.
(* Goal: a1 A0 B0 C0 *)
(* Goal: a2 A0 B0 C0 *)
unfold Ang in H7.
(* Goal: a1 A0 B0 C0 *)
(* Goal: a2 A0 B0 C0 *)
tauto.
(* Goal: a1 A0 B0 C0 *)
assert(CongA A B C A0 B0 C0).
(* Goal: a1 A0 B0 C0 *)
(* Goal: @CongA Tn A B C A0 B0 C0 *)
eapply (is_ang_conga _ _ _ _ _ _ a2); auto.
(* Goal: a1 A0 B0 C0 *)
(* Goal: @Ang Tn A0 B0 C0 a2 *)
split; auto.
(* Goal: a1 A0 B0 C0 *)
assert(Ang A0 B0 C0 a1).
(* Goal: a1 A0 B0 C0 *)
(* Goal: @Ang Tn A0 B0 C0 a1 *)
apply (is_ang_conga_is_ang A B C); auto.
(* Goal: a1 A0 B0 C0 *)
unfold Ang in H7.
(* Goal: a1 A0 B0 C0 *)
tauto.
Qed.
Lemma all_eqa : forall A B C a1 a2, Ang A B C a1 -> Ang A B C a2 -> EqA a1 a2.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (a1 a2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang Tn A B C a1) (_ : @Ang Tn A B C a2), @EqA Tn a1 a2 *)
intros.
(* Goal: @EqA Tn a1 a2 *)
apply ex_eqa.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2)))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2)) *)
exists C.
(* Goal: and (@Ang Tn A B C a1) (@Ang Tn A B C a2) *)
split; auto.
Qed.
Lemma is_ang_distinct : forall A B C a , Ang A B C a -> A <> B /\ C <> B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang Tn A B C a), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
unfold Ang in H.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
unfold Q_CongA in H.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
ex_and H A0.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
ex_and H1 B0.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
ex_and H C0.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HH:= H2 A B C).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
destruct HH.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
apply H4 in H0.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
unfold CongA in H0.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
tauto.
Qed.
Lemma null_ang : forall A B C D a1 a2, Ang A B A a1 -> Ang C D C a2 -> EqA a1 a2.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (a1 a2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang Tn A B A a1) (_ : @Ang Tn C D C a2), @EqA Tn a1 a2 *)
intros.
(* Goal: @EqA Tn a1 a2 *)
eapply (all_eqa A B A).
(* Goal: @Ang Tn A B A a2 *)
(* Goal: @Ang Tn A B A a1 *)
apply H.
(* Goal: @Ang Tn A B A a2 *)
eapply (is_ang_conga_is_ang C D C).
(* Goal: @CongA Tn C D C A B A *)
(* Goal: @Ang Tn C D C a2 *)
auto.
(* Goal: @CongA Tn C D C A B A *)
eapply l11_21_b.
(* Goal: @Out Tn B A A *)
(* Goal: @Out Tn D C C *)
apply out_trivial.
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) C D) *)
apply is_ang_distinct in H0.
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) C D) *)
tauto.
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
apply is_ang_distinct in H.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
tauto.
Qed.
Lemma flat_ang : forall A B C A' B' C' a1 a2, Bet A B C -> Bet A' B' C' -> Ang A B C a1 -> Ang A' B' C' a2 -> EqA a1 a2.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (a1 a2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Bet Tn A B C) (_ : @Bet Tn A' B' C') (_ : @Ang Tn A B C a1) (_ : @Ang Tn A' B' C' a2), @EqA Tn a1 a2 *)
intros.
(* Goal: @EqA Tn a1 a2 *)
eapply (all_eqa A B C).
(* Goal: @Ang Tn A B C a2 *)
(* Goal: @Ang Tn A B C a1 *)
apply H1.
(* Goal: @Ang Tn A B C a2 *)
eapply (is_ang_conga_is_ang A' B' C').
(* Goal: @CongA Tn A' B' C' A B C *)
(* Goal: @Ang Tn A' B' C' a2 *)
apply H2.
(* Goal: @CongA Tn A' B' C' A B C *)
apply is_ang_distinct in H1.
(* Goal: @CongA Tn A' B' C' A B C *)
apply is_ang_distinct in H2.
(* Goal: @CongA Tn A' B' C' A B C *)
spliter.
(* Goal: @CongA Tn A' B' C' A B C *)
eapply conga_line; auto.
Qed.
Lemma ang_distinct: forall a A B C, Q_CongA a -> a A B C -> A <> B /\ C <> B.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : a A B C), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(Ang A B C a).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
(* Goal: @Ang Tn A B C a *)
split; auto.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
apply (is_ang_distinct _ _ _ a); auto.
Qed.
Lemma ex_ang : forall A B C, B <> A -> B <> C -> exists a, Q_CongA a /\ a A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) B A)) (_ : not (@eq (@Tpoint Tn) B C)), @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_CongA Tn a) (a A B C)) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_CongA Tn a) (a A B C)) *)
exists (fun X Y Z => CongA A B C X Y Z).
(* Goal: and (@Q_CongA Tn (fun X Y Z : @Tpoint Tn => @CongA Tn A B C X Y Z)) (@CongA Tn A B C A B C) *)
unfold Q_CongA.
(* Goal: and (@ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A0 B0 C0 X Y Z) (@CongA Tn A B C X Y Z))))))) (@CongA Tn A B C A B C) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A0 B0 C0 X Y Z) (@CongA Tn A B C X Y Z)))))) *)
exists A.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B0 C0 X Y Z) (@CongA Tn A B C X Y Z))))) *)
exists B.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C0 B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C0 X Y Z) (@CongA Tn A B C X Y Z)))) *)
exists C.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z))) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z)) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z)) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
intros.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
intro.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: @CongA Tn A B C X Y Z *)
auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
intro.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @CongA Tn A B C X Y Z *)
auto.
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
Qed.
Lemma anga_exists : forall A B C, A <> B -> C <> B -> Acute A B C -> exists a, Q_CongA_Acute a /\ a A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) C B)) (_ : @Acute Tn A B C), @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_CongA_Acute Tn a) (a A B C)) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_CongA_Acute Tn a) (a A B C)) *)
exists (fun D E F => CongA A B C D E F).
(* Goal: and (@Q_CongA_Acute Tn (fun D E F : @Tpoint Tn => @CongA Tn A B C D E F)) (@CongA Tn A B C A B C) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @Q_CongA_Acute Tn (fun D E F : @Tpoint Tn => @CongA Tn A B C D E F) *)
unfold Q_CongA.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @Q_CongA_Acute Tn (fun D E F : @Tpoint Tn => @CongA Tn A B C D E F) *)
exists A.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (@Acute Tn A B0 C0) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B0 C0 X Y Z) (@CongA Tn A B C X Y Z)))) *)
exists B.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (@Acute Tn A B C0) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C0 X Y Z) (@CongA Tn A B C X Y Z))) *)
exists C.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: and (@Acute Tn A B C) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z)) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
(* Goal: @Acute Tn A B C *)
auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
intros.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
split; auto.
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
Qed.
Lemma anga_is_ang : forall a, Q_CongA_Acute a -> Q_CongA a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn a), @Q_CongA Tn a *)
intros.
(* Goal: @Q_CongA Tn a *)
unfold Q_CongA_Acute in H.
(* Goal: @Q_CongA Tn a *)
unfold Q_CongA.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)))))) *)
ex_and H A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)))))) *)
ex_and H0 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)))))) *)
ex_and H C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)))))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z))))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)))) *)
exists C.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z))) *)
apply acute_distincts in H.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z))) *)
spliter.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z))) *)
split.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)) *)
split.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z) *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z) *)
intros.
(* Goal: iff (@CongA Tn A B C X Y Z) (a X Y Z) *)
split.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, a X Y Z *)
intro.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
assert(Ang X Y Z a).
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: @Ang Tn X Y Z a *)
unfold Ang.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: and (@Q_CongA Tn a) (a X Y Z) *)
split.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: @Q_CongA Tn a *)
unfold Q_CongA.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)))))) *)
exists A.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z))))) *)
exists B.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)))) *)
exists C.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z))) *)
split.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
assumption.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z)) *)
split.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z) *)
(* Goal: not (@eq (@Tpoint Tn) C B) *)
assumption.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (a X Y Z) *)
auto.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
assert(HH:= H0 X Y Z).
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: a X Y Z *)
apply HH.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
(* Goal: @CongA Tn A B C X Y Z *)
auto.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
unfold Ang in H3.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
spliter.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
auto.
(* Goal: forall _ : a X Y Z, @CongA Tn A B C X Y Z *)
intro.
(* Goal: @CongA Tn A B C X Y Z *)
apply H0.
(* Goal: a X Y Z *)
auto.
Qed.
Lemma ex_points_anga : forall a , Q_CongA_Acute a -> exists A, exists B, exists C, a A B C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn a), @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
assert(HH:=H).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
apply anga_is_ang in H.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
ang_instance a A B C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C)) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
exists C.
(* Goal: a A B C *)
assumption.
Qed.
End Angles_2.
Ltac anga_instance a A B C :=
assert(tempo_anga:= ex_points_anga a);
match goal with
|H: Q_CongA_Acute a |- _ => assert(tempo_H:=H); apply tempo_anga in tempo_H;
elim tempo_H; intros A ;
let tempo_HP := fresh "tempo_HP" in
intro tempo_HP; clear tempo_H;
elim tempo_HP; intro B;
let tempo_HQ := fresh "tempo_HQ" in
intro tempo_HQ ; clear tempo_HP ;
elim tempo_HQ; intro C; intro; clear tempo_HQ
end;
clear tempo_anga.
Require Import Setoid.
Section Angles_3.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma anga_conga : forall a A B C A' B' C', Q_CongA_Acute a -> a A B C -> a A' B' C' -> CongA A B C A' B' C'.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C A' B' C' : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C) (_ : a A' B' C'), @CongA Tn A B C A' B' C' *)
intros.
(* Goal: @CongA Tn A B C A' B' C' *)
apply (ang_conga a); auto.
(* Goal: @Q_CongA Tn a *)
apply anga_is_ang.
(* Goal: @Q_CongA_Acute Tn a *)
auto.
Qed.
Lemma is_anga_to_is_ang : forall A B C a, Ang_Acute A B C a -> Ang A B C a.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang_Acute Tn A B C a), @Ang Tn A B C a *)
intros.
(* Goal: @Ang Tn A B C a *)
unfold Ang_Acute in H.
(* Goal: @Ang Tn A B C a *)
unfold Ang.
(* Goal: and (@Q_CongA Tn a) (a A B C) *)
spliter.
(* Goal: and (@Q_CongA Tn a) (a A B C) *)
split.
(* Goal: a A B C *)
(* Goal: @Q_CongA Tn a *)
apply anga_is_ang.
(* Goal: a A B C *)
(* Goal: @Q_CongA_Acute Tn a *)
auto.
(* Goal: a A B C *)
auto.
Qed.
Lemma is_anga_conga : forall A B C A' B' C' a, Ang_Acute A B C a -> Ang_Acute A' B' C' a -> CongA A B C A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang_Acute Tn A B C a) (_ : @Ang_Acute Tn A' B' C' a), @CongA Tn A B C A' B' C' *)
intros.
(* Goal: @CongA Tn A B C A' B' C' *)
unfold Ang_Acute in *.
(* Goal: @CongA Tn A B C A' B' C' *)
spliter.
(* Goal: @CongA Tn A B C A' B' C' *)
apply (anga_conga a); auto.
Qed.
Lemma is_anga_conga_is_anga : forall A B C A' B' C' a, Ang_Acute A B C a -> CongA A B C A' B' C' -> Ang_Acute A' B' C' a.
Lemma not_conga_is_anga : forall A B C A' B' C' a , ~ CongA A B C A' B' C' -> Ang_Acute A B C a -> ~(a A' B' C').
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : not (@CongA Tn A B C A' B' C')) (_ : @Ang_Acute Tn A B C a), not (a A' B' C') *)
intros.
(* Goal: not (a A' B' C') *)
unfold Ang_Acute in H0.
(* Goal: not (a A' B' C') *)
spliter.
(* Goal: not (a A' B' C') *)
intro.
(* Goal: False *)
apply H.
(* Goal: @CongA Tn A B C A' B' C' *)
apply (anga_conga a); auto.
Qed.
Lemma not_cong_is_anga1 : forall A B C A' B' C' a , ~ CongA A B C A' B' C' -> Ang_Acute A B C a -> ~ Ang_Acute A' B' C' a.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : not (@CongA Tn A B C A' B' C')) (_ : @Ang_Acute Tn A B C a), not (@Ang_Acute Tn A' B' C' a) *)
intros.
(* Goal: not (@Ang_Acute Tn A' B' C' a) *)
intro.
(* Goal: False *)
unfold Ang_Acute in *.
(* Goal: False *)
spliter.
(* Goal: False *)
apply H.
(* Goal: @CongA Tn A B C A' B' C' *)
apply (anga_conga a); auto.
Qed.
Lemma ex_eqaa : forall a1 a2, (exists A , exists B, exists C, Ang_Acute A B C a1 /\ Ang_Acute A B C a2) -> EqA a1 a2.
Proof.
(* Goal: forall (a1 a2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang_Acute Tn A B C a1) (@Ang_Acute Tn A B C a2))))), @EqA Tn a1 a2 *)
intros.
(* Goal: @EqA Tn a1 a2 *)
apply ex_eqa.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2)))) *)
ex_and H A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2)))) *)
ex_and H0 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2)))) *)
ex_and H C.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2)))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang Tn A B C a1) (@Ang Tn A B C a2)) *)
exists C.
(* Goal: and (@Ang Tn A B C a1) (@Ang Tn A B C a2) *)
split; apply is_anga_to_is_ang; auto.
Qed.
Lemma all_eqaa : forall A B C a1 a2, Ang_Acute A B C a1 -> Ang_Acute A B C a2 -> EqA a1 a2.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (a1 a2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang_Acute Tn A B C a1) (_ : @Ang_Acute Tn A B C a2), @EqA Tn a1 a2 *)
intros.
(* Goal: @EqA Tn a1 a2 *)
apply ex_eqaa.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang_Acute Tn A B C a1) (@Ang_Acute Tn A B C a2)))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang_Acute Tn A B C a1) (@Ang_Acute Tn A B C a2))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Ang_Acute Tn A B C a1) (@Ang_Acute Tn A B C a2)) *)
exists C.
(* Goal: and (@Ang_Acute Tn A B C a1) (@Ang_Acute Tn A B C a2) *)
split; auto.
Qed.
Lemma is_anga_distinct : forall A B C a , Ang_Acute A B C a -> A <> B /\ C <> B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang_Acute Tn A B C a), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
apply (is_ang_distinct A B C a).
(* Goal: @Ang Tn A B C a *)
apply is_anga_to_is_ang.
(* Goal: @Ang_Acute Tn A B C a *)
auto.
Qed.
Global Instance eqA_equivalence : Equivalence EqA.
Proof.
(* Goal: @Equivalence (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
split.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: @Symmetric (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: @Reflexive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
unfold Reflexive.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: @Symmetric (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: forall x : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop, @EqA Tn x x *)
intros.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: @Symmetric (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: @EqA Tn x x *)
unfold EqA.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: @Symmetric (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: forall A B C : @Tpoint Tn, iff (x A B C) (x A B C) *)
intros;tauto.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: @Symmetric (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
unfold Symmetric, EqA.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: forall (x y : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall A B C : @Tpoint Tn, iff (x A B C) (y A B C)) (A B C : @Tpoint Tn), iff (y A B C) (x A B C) *)
intros.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
(* Goal: iff (y A B C) (x A B C) *)
firstorder.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqA Tn) *)
unfold Transitive, EqA.
(* Goal: forall (x y z : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall A B C : @Tpoint Tn, iff (x A B C) (y A B C)) (_ : forall A B C : @Tpoint Tn, iff (y A B C) (z A B C)) (A B C : @Tpoint Tn), iff (x A B C) (z A B C) *)
intros.
(* Goal: iff (x A B C) (z A B C) *)
rewrite H.
(* Goal: iff (y A B C) (z A B C) *)
apply H0.
Qed.
Lemma null_anga : forall A B C D a1 a2, Ang_Acute A B A a1 -> Ang_Acute C D C a2 -> EqA a1 a2.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (a1 a2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Ang_Acute Tn A B A a1) (_ : @Ang_Acute Tn C D C a2), @EqA Tn a1 a2 *)
intros.
(* Goal: @EqA Tn a1 a2 *)
eapply (all_eqaa A B A).
(* Goal: @Ang_Acute Tn A B A a2 *)
(* Goal: @Ang_Acute Tn A B A a1 *)
apply H.
(* Goal: @Ang_Acute Tn A B A a2 *)
eapply (is_anga_conga_is_anga C D C).
(* Goal: @CongA Tn C D C A B A *)
(* Goal: @Ang_Acute Tn C D C a2 *)
auto.
(* Goal: @CongA Tn C D C A B A *)
eapply l11_21_b.
(* Goal: @Out Tn B A A *)
(* Goal: @Out Tn D C C *)
apply out_trivial.
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) C D) *)
apply is_anga_distinct in H0.
(* Goal: @Out Tn B A A *)
(* Goal: not (@eq (@Tpoint Tn) C D) *)
tauto.
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
apply is_anga_distinct in H.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
tauto.
Qed.
Lemma anga_distinct: forall a A B C, Q_CongA_Acute a -> a A B C -> A <> B /\ C <> B.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(Ang_Acute A B C a).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
(* Goal: @Ang_Acute Tn A B C a *)
split; auto.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
apply (is_anga_distinct _ _ _ a); auto.
Qed.
Lemma out_is_len_eq : forall A B C l, Out A B C -> Len A B l -> Len A C l -> B = C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Out Tn A B C) (_ : @Len Tn A B l) (_ : @Len Tn A C l), @eq (@Tpoint Tn) B C *)
intros.
(* Goal: @eq (@Tpoint Tn) B C *)
assert(Cong A B A C).
(* Goal: @eq (@Tpoint Tn) B C *)
(* Goal: @Cong Tn A B A C *)
apply (is_len_cong _ _ _ _ l); auto.
(* Goal: @eq (@Tpoint Tn) B C *)
assert(A <> C).
(* Goal: @eq (@Tpoint Tn) B C *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
unfold Out in H.
(* Goal: @eq (@Tpoint Tn) B C *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
spliter.
(* Goal: @eq (@Tpoint Tn) B C *)
(* Goal: not (@eq (@Tpoint Tn) A C) *)
auto.
(* Goal: @eq (@Tpoint Tn) B C *)
eapply (l6_11_uniqueness A A C C ); Cong.
(* Goal: @Out Tn A C C *)
apply out_trivial.
(* Goal: not (@eq (@Tpoint Tn) C A) *)
auto.
Qed.
Lemma out_len_eq : forall A B C l, Q_Cong l -> Out A B C -> l A B -> l A C -> B = C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l) (_ : @Out Tn A B C) (_ : l A B) (_ : l A C), @eq (@Tpoint Tn) B C *)
intros.
(* Goal: @eq (@Tpoint Tn) B C *)
apply (out_is_len_eq A _ _ l).
(* Goal: @Len Tn A C l *)
(* Goal: @Len Tn A B l *)
(* Goal: @Out Tn A B C *)
auto.
(* Goal: @Len Tn A C l *)
(* Goal: @Len Tn A B l *)
split; auto.
(* Goal: @Len Tn A C l *)
split; auto.
Qed.
Lemma ex_anga : forall A B C, Acute A B C -> exists a, Q_CongA_Acute a /\ a A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Acute Tn A B C), @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_CongA_Acute Tn a) (a A B C)) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_CongA_Acute Tn a) (a A B C)) *)
exists (fun X Y Z => CongA A B C X Y Z).
(* Goal: and (@Q_CongA_Acute Tn (fun X Y Z : @Tpoint Tn => @CongA Tn A B C X Y Z)) (@CongA Tn A B C A B C) *)
unfold Q_CongA_Acute.
(* Goal: and (@ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (@Acute Tn A0 B0 C0) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A0 B0 C0 X Y Z) (@CongA Tn A B C X Y Z)))))) (@CongA Tn A B C A B C) *)
assert (HH := acute_distincts A B C H).
(* Goal: and (@ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (@Acute Tn A0 B0 C0) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A0 B0 C0 X Y Z) (@CongA Tn A B C X Y Z)))))) (@CongA Tn A B C A B C) *)
spliter.
(* Goal: and (@ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (@Acute Tn A0 B0 C0) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A0 B0 C0 X Y Z) (@CongA Tn A B C X Y Z)))))) (@CongA Tn A B C A B C) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (@Acute Tn A0 B0 C0) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A0 B0 C0 X Y Z) (@CongA Tn A B C X Y Z))))) *)
exists A.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (@Acute Tn A B0 C0) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B0 C0 X Y Z) (@CongA Tn A B C X Y Z)))) *)
exists B.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @ex (@Tpoint Tn) (fun C0 : @Tpoint Tn => and (@Acute Tn A B C0) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C0 X Y Z) (@CongA Tn A B C X Y Z))) *)
exists C.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: and (@Acute Tn A B C) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z)) *)
split; auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
intros.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
intros.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: iff (@CongA Tn A B C X Y Z) (@CongA Tn A B C X Y Z) *)
split.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
intro.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: @CongA Tn A B C X Y Z *)
auto.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, @CongA Tn A B C X Y Z *)
intro.
(* Goal: @CongA Tn A B C A B C *)
(* Goal: @CongA Tn A B C X Y Z *)
auto.
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
Qed.
Lemma not_null_ang_ang : forall a, Q_CongA_nNull a -> Q_CongA a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_nNull Tn a), @Q_CongA Tn a *)
intros.
(* Goal: @Q_CongA Tn a *)
unfold Q_CongA_nNull in H.
(* Goal: @Q_CongA Tn a *)
spliter; auto.
Qed.
Lemma not_null_ang_def_equiv : forall a, Q_CongA_nNull a <-> (Q_CongA a /\ exists A, exists B, exists C, a A B C /\ ~Out B A C).
Proof.
(* Goal: forall a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop, iff (@Q_CongA_nNull Tn a) (and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C))))))) *)
intros.
(* Goal: iff (@Q_CongA_nNull Tn a) (and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C))))))) *)
split.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: forall _ : @Q_CongA_nNull Tn a, and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
intro.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
unfold Q_CongA_nNull in H.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
spliter.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
assert(HH:= H).
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
unfold Q_CongA in HH.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
ex_and HH A.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
ex_and H1 B.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
ex_and H2 C.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))) *)
split.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C))))) *)
(* Goal: @Q_CongA Tn a *)
auto.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C))))) *)
exists A.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))) *)
exists B.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C))) *)
exists C.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (a A B C) (not (@Out Tn B A C)) *)
assert(HH:= H3 A B C).
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (a A B C) (not (@Out Tn B A C)) *)
destruct HH.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (a A B C) (not (@Out Tn B A C)) *)
assert(a A B C).
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (a A B C) (not (@Out Tn B A C)) *)
(* Goal: a A B C *)
apply H4.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (a A B C) (not (@Out Tn B A C)) *)
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: and (a A B C) (not (@Out Tn B A C)) *)
split.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: not (@Out Tn B A C) *)
(* Goal: a A B C *)
auto.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: not (@Out Tn B A C) *)
apply (H0 A B C).
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
(* Goal: a A B C *)
auto.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Out Tn B A C)))))), @Q_CongA_nNull Tn a *)
intros.
(* Goal: @Q_CongA_nNull Tn a *)
spliter.
(* Goal: @Q_CongA_nNull Tn a *)
ex_and H0 A.
(* Goal: @Q_CongA_nNull Tn a *)
ex_and H1 B.
(* Goal: @Q_CongA_nNull Tn a *)
ex_and H0 C.
(* Goal: @Q_CongA_nNull Tn a *)
unfold Q_CongA_nNull.
(* Goal: and (@Q_CongA Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Out Tn B A C)) *)
split; auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Out Tn B A C) *)
intros.
(* Goal: not (@Out Tn B0 A0 C0) *)
assert(CongA A0 B0 C0 A B C).
(* Goal: not (@Out Tn B0 A0 C0) *)
(* Goal: @CongA Tn A0 B0 C0 A B C *)
apply (ang_conga a); auto.
(* Goal: not (@Out Tn B0 A0 C0) *)
intro.
(* Goal: False *)
apply H1.
(* Goal: @Out Tn B A C *)
apply (l11_21_a A0 B0 C0); auto.
Qed.
Lemma not_flat_ang_def_equiv : forall a, Q_CongA_nFlat a <-> (Q_CongA a /\ exists A, exists B, exists C, a A B C /\ ~Bet A B C).
Proof.
(* Goal: forall a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop, iff (@Q_CongA_nFlat Tn a) (and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C))))))) *)
intros.
(* Goal: iff (@Q_CongA_nFlat Tn a) (and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C))))))) *)
split.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: forall _ : @Q_CongA_nFlat Tn a, and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
intro.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
unfold Q_CongA_nFlat in H.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
spliter.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
assert(HH:= H).
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
unfold Q_CongA in HH.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
ex_and HH A.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
ex_and H1 B.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
ex_and H2 C.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))) *)
split.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C))))) *)
(* Goal: @Q_CongA Tn a *)
auto.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C))))) *)
exists A.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))) *)
exists B.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C))) *)
exists C.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (a A B C) (not (@Bet Tn A B C)) *)
assert(HH:= H3 A B C).
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (a A B C) (not (@Bet Tn A B C)) *)
destruct HH.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (a A B C) (not (@Bet Tn A B C)) *)
assert(a A B C).
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (a A B C) (not (@Bet Tn A B C)) *)
(* Goal: a A B C *)
apply H4.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (a A B C) (not (@Bet Tn A B C)) *)
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: and (a A B C) (not (@Bet Tn A B C)) *)
split.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: not (@Bet Tn A B C) *)
(* Goal: a A B C *)
auto.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: not (@Bet Tn A B C) *)
apply (H0 A B C).
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
(* Goal: a A B C *)
auto.
(* Goal: forall _ : and (@Q_CongA Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (not (@Bet Tn A B C)))))), @Q_CongA_nFlat Tn a *)
intros.
(* Goal: @Q_CongA_nFlat Tn a *)
spliter.
(* Goal: @Q_CongA_nFlat Tn a *)
ex_and H0 A.
(* Goal: @Q_CongA_nFlat Tn a *)
ex_and H1 B.
(* Goal: @Q_CongA_nFlat Tn a *)
ex_and H0 C.
(* Goal: @Q_CongA_nFlat Tn a *)
unfold Q_CongA_nFlat.
(* Goal: and (@Q_CongA Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Bet Tn A B C)) *)
split; auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Bet Tn A B C) *)
intros.
(* Goal: not (@Bet Tn A0 B0 C0) *)
assert(CongA A0 B0 C0 A B C).
(* Goal: not (@Bet Tn A0 B0 C0) *)
(* Goal: @CongA Tn A0 B0 C0 A B C *)
apply (ang_conga a); auto.
(* Goal: not (@Bet Tn A0 B0 C0) *)
intro.
(* Goal: False *)
apply H1.
(* Goal: @Bet Tn A B C *)
apply (bet_conga__bet A0 B0 C0); auto.
Qed.
Lemma ang_const : forall a A B, Q_CongA a -> A <> B -> exists C, a A B C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : not (@eq (@Tpoint Tn) A B)), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
unfold Q_CongA in H.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
ex_and H A0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
ex_and H1 B0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
ex_and H C0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
apply(swap_diff) in H1.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
assert(HH:= H2 A0 B0 C0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
destruct HH.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
assert(a A0 B0 C0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
(* Goal: a A0 B0 C0 *)
apply H3.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
(* Goal: @CongA Tn A0 B0 C0 A0 B0 C0 *)
apply conga_refl; auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
assert(HH :=not_col_exists A B H0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
ex_and HH P.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
induction(eq_dec_points A0 C0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
subst C0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
(* Goal: a A B A *)
assert(HH:= (H2 A B A)).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
(* Goal: a A B A *)
destruct HH.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
(* Goal: a A B A *)
apply H7.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
(* Goal: @CongA Tn A0 B0 A0 A B A *)
apply conga_trivial_1; auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
assert(HH:=angle_construction_2 A0 B0 C0 A B P H H7 H1).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
ex_and HH C; auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
exists C.
(* Goal: a A B C *)
apply H2.
(* Goal: @CongA Tn A0 B0 C0 A B C *)
auto.
Qed.
End Angles_3.
Ltac ang_instance1 a A B C :=
assert(tempo_ang:= ang_const a A B);
match goal with
|H: Q_CongA a |- _ => assert(tempo_H:= H);apply tempo_ang in tempo_H; ex_elim tempo_H C
end;
clear tempo_ang.
Section Angles_4.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma ang_sym : forall a A B C, Q_CongA a -> a A B C -> a C B A.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : a A B C), a C B A *)
intros.
(* Goal: a C B A *)
unfold Q_CongA in H.
(* Goal: a C B A *)
ex_and H A0.
(* Goal: a C B A *)
ex_and H1 B0.
(* Goal: a C B A *)
ex_and H C0.
(* Goal: a C B A *)
assert(HH:= H2 A B C).
(* Goal: a C B A *)
destruct HH.
(* Goal: a C B A *)
apply H4 in H0.
(* Goal: a C B A *)
apply conga_right_comm in H0.
(* Goal: a C B A *)
assert(HH:= H2 C B A).
(* Goal: a C B A *)
destruct HH.
(* Goal: a C B A *)
apply H5.
(* Goal: @CongA Tn A0 B0 C0 C B A *)
auto.
Qed.
Lemma ang_not_null_lg : forall a l A B C, Q_CongA a -> Q_Cong l -> a A B C -> l A B -> ~ Q_Cong_Null l.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : @Q_Cong Tn l) (_ : a A B C) (_ : l A B), not (@Q_Cong_Null Tn l) *)
intros.
(* Goal: not (@Q_Cong_Null Tn l) *)
intro.
(* Goal: False *)
unfold Q_CongA in H.
(* Goal: False *)
unfold Q_Cong_Null in H3.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold Q_Cong in H0.
(* Goal: False *)
ex_and H A0.
(* Goal: False *)
ex_and H5 B0.
(* Goal: False *)
ex_and H C0.
(* Goal: False *)
assert(HH:= H6 A B C).
(* Goal: False *)
destruct HH.
(* Goal: False *)
assert(CongA A0 B0 C0 A B C).
(* Goal: False *)
(* Goal: @CongA Tn A0 B0 C0 A B C *)
apply H8.
(* Goal: False *)
(* Goal: a A B C *)
auto.
(* Goal: False *)
apply conga_distinct in H8.
(* Goal: a A B C *)
(* Goal: False *)
spliter.
(* Goal: a A B C *)
(* Goal: False *)
ex_and H0 A1.
(* Goal: a A B C *)
(* Goal: False *)
ex_and H14 B1.
(* Goal: a A B C *)
(* Goal: False *)
assert(HH:= H0 A B).
(* Goal: a A B C *)
(* Goal: False *)
destruct HH.
(* Goal: a A B C *)
(* Goal: False *)
ex_and H4 A'.
(* Goal: a A B C *)
(* Goal: False *)
assert(HH:= H0 A' A').
(* Goal: a A B C *)
(* Goal: False *)
destruct HH.
(* Goal: a A B C *)
(* Goal: False *)
assert(Cong A1 B1 A' A').
(* Goal: a A B C *)
(* Goal: False *)
(* Goal: @Cong Tn A1 B1 A' A' *)
apply H17.
(* Goal: a A B C *)
(* Goal: False *)
(* Goal: l A' A' *)
auto.
(* Goal: a A B C *)
(* Goal: False *)
assert(Cong A1 B1 A B).
(* Goal: a A B C *)
(* Goal: False *)
(* Goal: @Cong Tn A1 B1 A B *)
apply H15.
(* Goal: a A B C *)
(* Goal: False *)
(* Goal: l A B *)
auto.
(* Goal: a A B C *)
(* Goal: False *)
apply cong_identity in H17.
(* Goal: a A B C *)
(* Goal: l A' A' *)
(* Goal: False *)
subst B1.
(* Goal: a A B C *)
(* Goal: l A' A' *)
(* Goal: False *)
apply cong_symmetry in H19.
(* Goal: a A B C *)
(* Goal: l A' A' *)
(* Goal: False *)
apply cong_identity in H19.
(* Goal: a A B C *)
(* Goal: l A' A' *)
(* Goal: False *)
contradiction.
(* Goal: a A B C *)
(* Goal: l A' A' *)
auto.
(* Goal: a A B C *)
auto.
Qed.
Lemma ang_distincts : forall a A B C, Q_CongA a -> a A B C -> A <> B /\ C <> B.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : a A B C), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HH:= ex_lg A B).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
ex_and HH la.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HH:= ex_lg C B).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
ex_and HH lc.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HH:= ang_not_null_lg a la A B C H H1 H0 H2).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(a C B A).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
(* Goal: a C B A *)
apply ang_sym; auto.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HQ:= ang_not_null_lg a lc C B A H H3 H5 H4).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
split; intro; subst B.
(* Goal: False *)
(* Goal: False *)
apply HH.
(* Goal: False *)
(* Goal: @Q_Cong_Null Tn la *)
unfold Q_Cong_Null.
(* Goal: False *)
(* Goal: and (@Q_Cong Tn la) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => la A A)) *)
split.
(* Goal: False *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => la A A) *)
(* Goal: @Q_Cong Tn la *)
auto.
(* Goal: False *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => la A A) *)
exists A.
(* Goal: False *)
(* Goal: la A A *)
auto.
(* Goal: False *)
apply HQ.
(* Goal: @Q_Cong_Null Tn lc *)
unfold Q_Cong_Null.
(* Goal: and (@Q_Cong Tn lc) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => lc A A)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => lc A A) *)
(* Goal: @Q_Cong Tn lc *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => lc A A) *)
exists C.
(* Goal: lc C C *)
auto.
Qed.
Lemma anga_sym : forall a A B C, Q_CongA_Acute a -> a A B C -> a C B A.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C), a C B A *)
intros.
(* Goal: a C B A *)
unfold Q_CongA_Acute in H.
(* Goal: a C B A *)
ex_and H A0.
(* Goal: a C B A *)
ex_and H1 B0.
(* Goal: a C B A *)
ex_and H C0.
(* Goal: a C B A *)
assert(HH:= H1 A B C).
(* Goal: a C B A *)
destruct HH.
(* Goal: a C B A *)
apply H3 in H0.
(* Goal: a C B A *)
apply conga_right_comm in H0.
(* Goal: a C B A *)
assert(HH:= H1 C B A).
(* Goal: a C B A *)
destruct HH.
(* Goal: a C B A *)
apply H4.
(* Goal: @CongA Tn A0 B0 C0 C B A *)
auto.
Qed.
Lemma anga_not_null_lg : forall a l A B C, Q_CongA_Acute a -> Q_Cong l -> a A B C -> l A B -> ~ Q_Cong_Null l.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : @Q_Cong Tn l) (_ : a A B C) (_ : l A B), not (@Q_Cong_Null Tn l) *)
intros.
(* Goal: not (@Q_Cong_Null Tn l) *)
intro.
(* Goal: False *)
unfold Q_CongA_Acute in H.
(* Goal: False *)
unfold Q_Cong_Null in H3.
(* Goal: False *)
spliter.
(* Goal: False *)
unfold Q_Cong in H0.
(* Goal: False *)
ex_and H A0.
(* Goal: False *)
ex_and H5 B0.
(* Goal: False *)
ex_and H C0.
(* Goal: False *)
assert(HH:= H5 A B C).
(* Goal: False *)
destruct HH.
(* Goal: False *)
assert(CongA A0 B0 C0 A B C).
(* Goal: False *)
(* Goal: @CongA Tn A0 B0 C0 A B C *)
apply H7.
(* Goal: False *)
(* Goal: a A B C *)
auto.
(* Goal: False *)
apply conga_distinct in H8.
(* Goal: False *)
spliter.
(* Goal: False *)
ex_and H0 A1.
(* Goal: False *)
ex_and H13 B1.
(* Goal: False *)
assert(HH:= H0 A B).
(* Goal: False *)
destruct HH.
(* Goal: False *)
ex_and H4 A'.
(* Goal: False *)
assert(HH:= H0 A' A').
(* Goal: False *)
destruct HH.
(* Goal: False *)
assert(Cong A1 B1 A' A').
(* Goal: False *)
(* Goal: @Cong Tn A1 B1 A' A' *)
apply H16.
(* Goal: False *)
(* Goal: l A' A' *)
auto.
(* Goal: False *)
assert(Cong A1 B1 A B).
(* Goal: False *)
(* Goal: @Cong Tn A1 B1 A B *)
apply H14.
(* Goal: False *)
(* Goal: l A B *)
auto.
(* Goal: False *)
apply cong_identity in H17.
(* Goal: False *)
subst B1.
(* Goal: False *)
apply cong_symmetry in H18.
(* Goal: False *)
apply cong_identity in H18.
(* Goal: False *)
contradiction.
Qed.
Lemma anga_distincts : forall a A B C, Q_CongA_Acute a -> a A B C -> A <> B /\ C <> B.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C), and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
intros.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HH:= ex_lg A B).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
ex_and HH la.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HH:= ex_lg C B).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
ex_and HH lc.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HH:= anga_not_null_lg a la A B C H H1 H0 H2).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(a C B A).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
(* Goal: a C B A *)
apply anga_sym; auto.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
assert(HQ:= anga_not_null_lg a lc C B A H H3 H5 H4).
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (not (@eq (@Tpoint Tn) C B)) *)
split; intro; subst B.
(* Goal: False *)
(* Goal: False *)
apply HH.
(* Goal: False *)
(* Goal: @Q_Cong_Null Tn la *)
unfold Q_Cong_Null.
(* Goal: False *)
(* Goal: and (@Q_Cong Tn la) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => la A A)) *)
split.
(* Goal: False *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => la A A) *)
(* Goal: @Q_Cong Tn la *)
auto.
(* Goal: False *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => la A A) *)
exists A.
(* Goal: False *)
(* Goal: la A A *)
auto.
(* Goal: False *)
apply HQ.
(* Goal: @Q_Cong_Null Tn lc *)
unfold Q_Cong_Null.
(* Goal: and (@Q_Cong Tn lc) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => lc A A)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => lc A A) *)
(* Goal: @Q_Cong Tn lc *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => lc A A) *)
exists C.
(* Goal: lc C C *)
auto.
Qed.
Lemma ang_const_o : forall a A B P, ~Col A B P -> Q_CongA a -> Q_CongA_nNull a -> Q_CongA_nFlat a -> exists C, a A B C /\ OS A B C P.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B P : @Tpoint Tn) (_ : not (@Col Tn A B P)) (_ : @Q_CongA Tn a) (_ : @Q_CongA_nNull Tn a) (_ : @Q_CongA_nFlat Tn a), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(HH:= H0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
unfold Q_CongA in HH.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
ex_and HH A0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
ex_and H3 B0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
ex_and H4 C0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
apply(swap_diff) in H4.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(HH:= H5 A0 B0 C0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
destruct HH.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(a A0 B0 C0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: a A0 B0 C0 *)
apply H6.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: @CongA Tn A0 B0 C0 A0 B0 C0 *)
apply conga_refl; auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(HH:=ang_distincts a A0 B0 C0 H0 H8).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(A0 <> C0).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: not (@eq (@Tpoint Tn) A0 C0) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: False *)
subst C0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: False *)
unfold Q_CongA_nNull in H1.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: False *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: False *)
assert(HH:=H11 A0 B0 A0 H8).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: False *)
apply HH.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: @Out Tn B0 A0 A0 *)
apply out_trivial; auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(A <> B).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: False *)
subst B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: False *)
apply H.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: @Col Tn A A P *)
Col.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(HH:=angle_construction_2 A0 B0 C0 A B P H10 H9 H4).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
ex_and HH C; auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
exists C.
(* Goal: and (a A B C) (@OS Tn A B C P) *)
assert(a A B C).
(* Goal: and (a A B C) (@OS Tn A B C P) *)
(* Goal: a A B C *)
assert(HH:= H5 A B C).
(* Goal: and (a A B C) (@OS Tn A B C P) *)
(* Goal: a A B C *)
destruct HH.
(* Goal: and (a A B C) (@OS Tn A B C P) *)
(* Goal: a A B C *)
apply H15.
(* Goal: and (a A B C) (@OS Tn A B C P) *)
(* Goal: @CongA Tn A0 B0 C0 A B C *)
auto.
(* Goal: and (a A B C) (@OS Tn A B C P) *)
split.
(* Goal: @OS Tn A B C P *)
(* Goal: a A B C *)
auto.
(* Goal: @OS Tn A B C P *)
induction H14.
(* Goal: @OS Tn A B C P *)
(* Goal: @OS Tn A B C P *)
auto.
(* Goal: @OS Tn A B C P *)
unfold Q_CongA_nNull in H1.
(* Goal: @OS Tn A B C P *)
spliter.
(* Goal: @OS Tn A B C P *)
assert(HH:= H16 A B C H15).
(* Goal: @OS Tn A B C P *)
unfold Q_CongA_nFlat in H2.
(* Goal: @OS Tn A B C P *)
spliter.
(* Goal: @OS Tn A B C P *)
assert(Hh:=H17 A B C H15).
(* Goal: @OS Tn A B C P *)
apply False_ind.
(* Goal: False *)
assert(HH0:=ang_distincts a A B C H0 H15).
(* Goal: False *)
spliter.
(* Goal: False *)
assert(HP:=or_bet_out A B C).
(* Goal: False *)
induction HP.
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: False *)
induction H20.
(* Goal: False *)
(* Goal: False *)
contradiction.
(* Goal: False *)
contradiction.
Qed.
Lemma anga_const : forall a A B, Q_CongA_Acute a -> A <> B -> exists C, a A B C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : not (@eq (@Tpoint Tn) A B)), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
apply anga_is_ang in H.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => a A B C) *)
apply ang_const; auto.
Qed.
End Angles_4.
Ltac anga_instance1 a A B C :=
assert(tempo_anga:= anga_const a A B);
match goal with
|H: Q_CongA_Acute a |- _ => assert(tempo_H:= H); apply tempo_anga in tempo_H; ex_elim tempo_H C
end;
clear tempo_anga.
Section Angles_5.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma null_anga_null_anga' : forall a, Q_CongA_Null_Acute a <-> is_null_anga' a.
Proof.
(* Goal: forall a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop, iff (@Q_CongA_Null_Acute Tn a) (@is_null_anga' Tn a) *)
intro.
(* Goal: iff (@Q_CongA_Null_Acute Tn a) (@is_null_anga' Tn a) *)
split.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: forall _ : @Q_CongA_Null_Acute Tn a, @is_null_anga' Tn a *)
intro.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: @is_null_anga' Tn a *)
unfold Q_CongA_Null_Acute in H.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: @is_null_anga' Tn a *)
unfold is_null_anga'.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@Out Tn B A C))))) *)
spliter.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: and (@Q_CongA_Acute Tn a) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@Out Tn B A C))))) *)
split.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@Out Tn B A C)))) *)
(* Goal: @Q_CongA_Acute Tn a *)
auto.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@Out Tn B A C)))) *)
anga_instance a A B C.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@Out Tn B A C)))) *)
assert(HH:= H0 A B C H1).
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@Out Tn B A C)))) *)
exists A.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@Out Tn B A C))) *)
exists B.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@Out Tn B A C)) *)
exists C.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
(* Goal: and (a A B C) (@Out Tn B A C) *)
split; auto.
(* Goal: forall _ : @is_null_anga' Tn a, @Q_CongA_Null_Acute Tn a *)
intro.
(* Goal: @Q_CongA_Null_Acute Tn a *)
unfold is_null_anga' in H.
(* Goal: @Q_CongA_Null_Acute Tn a *)
unfold Q_CongA_Null_Acute.
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
spliter.
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
ex_and H0 A.
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
ex_and H1 B.
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
ex_and H0 C.
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
split; auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B0 A0 C0 *)
assert(CongA A B C A0 B0 C0).
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @CongA Tn A B C A0 B0 C0 *)
apply (anga_conga a); auto.
(* Goal: @Out Tn B0 A0 C0 *)
apply (l11_21_a A B C); auto.
Qed.
Lemma is_null_anga_out : forall a A B C, Q_CongA_Acute a -> a A B C -> Q_CongA_Null_Acute a -> Out B A C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C) (_ : @Q_CongA_Null_Acute Tn a), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B A C *)
unfold Q_CongA_Null_Acute in H1.
(* Goal: @Out Tn B A C *)
spliter.
(* Goal: @Out Tn B A C *)
assert(HH:= (H2 A B C)).
(* Goal: @Out Tn B A C *)
apply HH.
(* Goal: a A B C *)
auto.
Qed.
Lemma acute_not_bet : forall A B C, Acute A B C -> ~Bet A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Acute Tn A B C), not (@Bet Tn A B C) *)
intros.
(* Goal: not (@Bet Tn A B C) *)
unfold Acute in H.
(* Goal: not (@Bet Tn A B C) *)
ex_and H A0.
(* Goal: not (@Bet Tn A B C) *)
ex_and H0 B0.
(* Goal: not (@Bet Tn A B C) *)
ex_and H C0.
(* Goal: not (@Bet Tn A B C) *)
unfold LtA in H0.
(* Goal: not (@Bet Tn A B C) *)
spliter.
(* Goal: not (@Bet Tn A B C) *)
unfold LeA in H0.
(* Goal: not (@Bet Tn A B C) *)
ex_and H0 P.
(* Goal: not (@Bet Tn A B C) *)
unfold InAngle in H0.
(* Goal: not (@Bet Tn A B C) *)
spliter.
(* Goal: not (@Bet Tn A B C) *)
ex_and H5 X.
(* Goal: not (@Bet Tn A B C) *)
intro.
(* Goal: False *)
apply conga_distinct in H2.
(* Goal: False *)
spliter.
(* Goal: False *)
assert(A<>C) by (intro; Between).
(* Goal: False *)
induction H6.
(* Goal: False *)
(* Goal: False *)
subst X.
(* Goal: False *)
(* Goal: False *)
apply H1.
(* Goal: False *)
(* Goal: @CongA Tn A B C A0 B0 C0 *)
apply conga_line; auto.
(* Goal: False *)
assert(Bet A0 B0 P).
(* Goal: False *)
(* Goal: @Bet Tn A0 B0 P *)
apply (bet_conga__bet A B C); auto.
(* Goal: False *)
assert(Bet A0 B0 C0).
(* Goal: False *)
(* Goal: @Bet Tn A0 B0 C0 *)
unfold Out in H6.
(* Goal: False *)
(* Goal: @Bet Tn A0 B0 C0 *)
spliter.
(* Goal: False *)
(* Goal: @Bet Tn A0 B0 C0 *)
induction H15.
(* Goal: False *)
(* Goal: @Bet Tn A0 B0 C0 *)
(* Goal: @Bet Tn A0 B0 C0 *)
eBetween.
(* Goal: False *)
(* Goal: @Bet Tn A0 B0 C0 *)
eBetween.
(* Goal: False *)
apply H1.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
apply (conga_line A B C); auto.
Qed.
Lemma anga_acute : forall a A B C , Q_CongA_Acute a -> a A B C -> Acute A B C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C), @Acute Tn A B C *)
intros.
(* Goal: @Acute Tn A B C *)
unfold Q_CongA_Acute in H.
(* Goal: @Acute Tn A B C *)
ex_and H A0.
(* Goal: @Acute Tn A B C *)
ex_and H1 B0.
(* Goal: @Acute Tn A B C *)
ex_and H C0.
(* Goal: @Acute Tn A B C *)
assert(HH:= acute_lea_acute A B C A0 B0 C0).
(* Goal: @Acute Tn A B C *)
apply HH.
(* Goal: @LeA Tn A B C A0 B0 C0 *)
(* Goal: @Acute Tn A0 B0 C0 *)
auto.
(* Goal: @LeA Tn A B C A0 B0 C0 *)
unfold LeA.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A0 B0 C0) (@CongA Tn A B C A0 B0 P)) *)
exists C0.
(* Goal: and (@InAngle Tn C0 A0 B0 C0) (@CongA Tn A B C A0 B0 C0) *)
split.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: @InAngle Tn C0 A0 B0 C0 *)
unfold InAngle.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A0 X C0) (or (@eq (@Tpoint Tn) X B0) (@Out Tn B0 X C0)))))) *)
apply acute_distincts in H.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A0 X C0) (or (@eq (@Tpoint Tn) X B0) (@Out Tn B0 X C0)))))) *)
spliter.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: and (not (@eq (@Tpoint Tn) A0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (and (not (@eq (@Tpoint Tn) C0 B0)) (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A0 X C0) (or (@eq (@Tpoint Tn) X B0) (@Out Tn B0 X C0)))))) *)
repeat split; auto.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Bet Tn A0 X C0) (or (@eq (@Tpoint Tn) X B0) (@Out Tn B0 X C0))) *)
exists C0.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: and (@Bet Tn A0 C0 C0) (or (@eq (@Tpoint Tn) C0 B0) (@Out Tn B0 C0 C0)) *)
split.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: or (@eq (@Tpoint Tn) C0 B0) (@Out Tn B0 C0 C0) *)
(* Goal: @Bet Tn A0 C0 C0 *)
Between.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: or (@eq (@Tpoint Tn) C0 B0) (@Out Tn B0 C0 C0) *)
right.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: @Out Tn B0 C0 C0 *)
apply out_trivial.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
(* Goal: not (@eq (@Tpoint Tn) C0 B0) *)
auto.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
assert(HP:= H1 A B C).
(* Goal: @CongA Tn A B C A0 B0 C0 *)
destruct HP.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
apply conga_sym.
(* Goal: @CongA Tn A0 B0 C0 A B C *)
apply H3.
(* Goal: a A B C *)
auto.
Qed.
Lemma not_null_not_col : forall a A B C, Q_CongA_Acute a -> ~ Q_CongA_Null_Acute a -> a A B C -> ~Col A B C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : not (@Q_CongA_Null_Acute Tn a)) (_ : a A B C), not (@Col Tn A B C) *)
intros.
(* Goal: not (@Col Tn A B C) *)
intro.
(* Goal: False *)
apply H0.
(* Goal: @Q_CongA_Null_Acute Tn a *)
unfold Q_CongA_Null_Acute.
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
split.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
(* Goal: @Q_CongA_Acute Tn a *)
auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
assert(Acute A B C).
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
(* Goal: @Acute Tn A B C *)
apply (anga_acute a); auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B0 A0 C0 *)
assert(Out B A C).
(* Goal: @Out Tn B0 A0 C0 *)
(* Goal: @Out Tn B A C *)
apply acute_col__out; auto.
(* Goal: @Out Tn B0 A0 C0 *)
assert(HH:= anga_conga a A B C A0 B0 C0 H H1 H4).
(* Goal: @Out Tn B0 A0 C0 *)
apply (l11_21_a A B C); auto.
Qed.
Lemma ang_cong_ang : forall a A B C A' B' C', Q_CongA a -> a A B C -> CongA A B C A' B' C' -> a A' B' C'.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C A' B' C' : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : a A B C) (_ : @CongA Tn A B C A' B' C'), a A' B' C' *)
intros.
(* Goal: a A' B' C' *)
assert(Ang A B C a).
(* Goal: a A' B' C' *)
(* Goal: @Ang Tn A B C a *)
unfold Ang.
(* Goal: a A' B' C' *)
(* Goal: and (@Q_CongA Tn a) (a A B C) *)
split; auto.
(* Goal: a A' B' C' *)
assert(Ang A' B' C' a).
(* Goal: a A' B' C' *)
(* Goal: @Ang Tn A' B' C' a *)
apply (is_ang_conga_is_ang A B C); auto.
(* Goal: a A' B' C' *)
unfold Ang in H3.
(* Goal: a A' B' C' *)
tauto.
Qed.
Lemma is_null_ang_out : forall a A B C, Q_CongA a -> a A B C -> Q_CongA_Null a -> Out B A C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : a A B C) (_ : @Q_CongA_Null Tn a), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B A C *)
unfold Q_CongA_Null in H1.
(* Goal: @Out Tn B A C *)
spliter.
(* Goal: @Out Tn B A C *)
assert(HH:= (H2 A B C)).
(* Goal: @Out Tn B A C *)
apply HH.
(* Goal: a A B C *)
auto.
Qed.
Lemma out_null_ang : forall a A B C, Q_CongA a -> a A B C -> Out B A C -> Q_CongA_Null a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : a A B C) (_ : @Out Tn B A C), @Q_CongA_Null Tn a *)
intros.
(* Goal: @Q_CongA_Null Tn a *)
unfold Q_CongA_Null.
(* Goal: and (@Q_CongA Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
split.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
(* Goal: @Q_CongA Tn a *)
auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B0 A0 C0 *)
assert(HH:=l11_21_a A B C A0 B0 C0 H1).
(* Goal: @Out Tn B0 A0 C0 *)
apply HH.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
apply (ang_conga a); auto.
Qed.
Lemma bet_flat_ang : forall a A B C, Q_CongA a -> a A B C -> Bet A B C -> Ang_Flat a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA Tn a) (_ : a A B C) (_ : @Bet Tn A B C), @Ang_Flat Tn a *)
intros.
(* Goal: @Ang_Flat Tn a *)
unfold Ang_Flat.
(* Goal: and (@Q_CongA Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Bet Tn A B C) *)
split.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Bet Tn A B C *)
(* Goal: @Q_CongA Tn a *)
auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Bet Tn A B C *)
intros.
(* Goal: @Bet Tn A0 B0 C0 *)
assert(HH:=bet_conga__bet A B C A0 B0 C0 H1).
(* Goal: @Bet Tn A0 B0 C0 *)
apply HH.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
apply (ang_conga a); auto.
Qed.
Lemma out_null_anga : forall a A B C, Q_CongA_Acute a -> a A B C -> Out B A C -> Q_CongA_Null_Acute a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C) (_ : @Out Tn B A C), @Q_CongA_Null_Acute Tn a *)
intros.
(* Goal: @Q_CongA_Null_Acute Tn a *)
unfold Q_CongA_Null_Acute.
(* Goal: and (@Q_CongA_Acute Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C) *)
split.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
(* Goal: @Q_CongA_Acute Tn a *)
auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B0 A0 C0 *)
assert(HH:=l11_21_a A B C A0 B0 C0 H1).
(* Goal: @Out Tn B0 A0 C0 *)
apply HH.
(* Goal: @CongA Tn A B C A0 B0 C0 *)
apply (anga_conga a); auto.
Qed.
Lemma anga_not_flat : forall a, Q_CongA_Acute a -> Q_CongA_nFlat a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn a), @Q_CongA_nFlat Tn a *)
intros.
(* Goal: @Q_CongA_nFlat Tn a *)
unfold Q_CongA_nFlat.
(* Goal: and (@Q_CongA Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Bet Tn A B C)) *)
split.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Bet Tn A B C) *)
(* Goal: @Q_CongA Tn a *)
apply anga_is_ang in H.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Bet Tn A B C) *)
(* Goal: @Q_CongA Tn a *)
auto.
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Bet Tn A B C) *)
intros.
(* Goal: not (@Bet Tn A B C) *)
assert(HH:= anga_acute a A B C H H0).
(* Goal: not (@Bet Tn A B C) *)
unfold Q_CongA_Acute in H.
(* Goal: not (@Bet Tn A B C) *)
ex_and H A0.
(* Goal: not (@Bet Tn A B C) *)
ex_and H1 B0.
(* Goal: not (@Bet Tn A B C) *)
ex_and H C0.
(* Goal: not (@Bet Tn A B C) *)
assert(HP:= H1 A B C).
(* Goal: not (@Bet Tn A B C) *)
apply acute_not_bet.
(* Goal: @Acute Tn A B C *)
auto.
Qed.
Lemma anga_const_o : forall a A B P, ~Col A B P -> ~ Q_CongA_Null_Acute a -> Q_CongA_Acute a -> exists C, a A B C /\ OS A B C P.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B P : @Tpoint Tn) (_ : not (@Col Tn A B P)) (_ : not (@Q_CongA_Null_Acute Tn a)) (_ : @Q_CongA_Acute Tn a), @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(Q_CongA a).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: @Q_CongA Tn a *)
apply anga_is_ang; auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(Q_CongA_nNull a).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: @Q_CongA_nNull Tn a *)
unfold Q_CongA_nNull.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: and (@Q_CongA Tn a) (forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Out Tn B A C)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Out Tn B A C) *)
(* Goal: @Q_CongA Tn a *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: forall (A B C : @Tpoint Tn) (_ : a A B C), not (@Out Tn B A C) *)
intros A' B' C' HP.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: not (@Out Tn B' A' C') *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: False *)
apply H0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: @Q_CongA_Null_Acute Tn a *)
eapply (out_null_anga a A' B' C'); auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(Q_CongA_nFlat a).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: @Q_CongA_nFlat Tn a *)
apply anga_not_flat.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
(* Goal: @Q_CongA_Acute Tn a *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
assert(HH:= ang_const_o a A B P H H2 H3 H4).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (a A B C) (@OS Tn A B C P)) *)
auto.
Qed.
Lemma anga_conga_anga : forall a A B C A' B' C' , Q_CongA_Acute a -> a A B C -> CongA A B C A' B' C' -> a A' B' C'.
Lemma anga_out_anga : forall a A B C A' C', Q_CongA_Acute a -> a A B C -> Out B A A' -> Out B C C' -> a A' B C'.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C A' C' : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C) (_ : @Out Tn B A A') (_ : @Out Tn B C C'), a A' B C' *)
intros.
(* Goal: a A' B C' *)
assert(HH:= H).
(* Goal: a A' B C' *)
unfold Q_CongA_Acute in HH.
(* Goal: a A' B C' *)
ex_and HH A0.
(* Goal: a A' B C' *)
ex_and H3 B0.
(* Goal: a A' B C' *)
ex_and H4 C0.
(* Goal: a A' B C' *)
assert(HP:= H4 A B C).
(* Goal: a A' B C' *)
destruct HP.
(* Goal: a A' B C' *)
assert(CongA A0 B0 C0 A B C).
(* Goal: a A' B C' *)
(* Goal: @CongA Tn A0 B0 C0 A B C *)
apply H6.
(* Goal: a A' B C' *)
(* Goal: a A B C *)
auto.
(* Goal: a A' B C' *)
assert(HP:= anga_distincts a A B C H H0).
(* Goal: a A' B C' *)
spliter.
(* Goal: a A' B C' *)
assert(CongA A B C A' B C').
(* Goal: a A' B C' *)
(* Goal: @CongA Tn A B C A' B C' *)
apply (out_conga A B C A B C).
(* Goal: a A' B C' *)
(* Goal: @Out Tn B C C' *)
(* Goal: @Out Tn B A A' *)
(* Goal: @Out Tn B C C *)
(* Goal: @Out Tn B A A *)
(* Goal: @CongA Tn A B C A B C *)
apply conga_refl; auto.
(* Goal: a A' B C' *)
(* Goal: @Out Tn B C C' *)
(* Goal: @Out Tn B A A' *)
(* Goal: @Out Tn B C C *)
(* Goal: @Out Tn B A A *)
apply out_trivial; auto.
(* Goal: a A' B C' *)
(* Goal: @Out Tn B C C' *)
(* Goal: @Out Tn B A A' *)
(* Goal: @Out Tn B C C *)
apply out_trivial; auto.
(* Goal: a A' B C' *)
(* Goal: @Out Tn B C C' *)
(* Goal: @Out Tn B A A' *)
auto.
(* Goal: a A' B C' *)
(* Goal: @Out Tn B C C' *)
auto.
(* Goal: a A' B C' *)
assert(HH:= H4 A' B C').
(* Goal: a A' B C' *)
destruct HH.
(* Goal: a A' B C' *)
apply H11.
(* Goal: @CongA Tn A0 B0 C0 A' B C' *)
apply (conga_trans _ _ _ A B C); auto.
Qed.
Lemma out_out_anga : forall a A B C A' B' C', Q_CongA_Acute a -> Out B A C -> Out B' A' C' -> a A B C -> a A' B' C'.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C A' B' C' : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : @Out Tn B A C) (_ : @Out Tn B' A' C') (_ : a A B C), a A' B' C' *)
intros.
(* Goal: a A' B' C' *)
assert(CongA A B C A' B' C').
(* Goal: a A' B' C' *)
(* Goal: @CongA Tn A B C A' B' C' *)
apply l11_21_b; auto.
(* Goal: a A' B' C' *)
apply (anga_conga_anga a A B C); auto.
Qed.
Lemma is_null_all : forall a A B, A <> B -> Q_CongA_Null_Acute a -> a A B A.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Q_CongA_Null_Acute Tn a), a A B A *)
intros.
(* Goal: a A B A *)
unfold Q_CongA_Null_Acute in H0.
(* Goal: a A B A *)
spliter.
(* Goal: a A B A *)
assert(HH:= H0).
(* Goal: a A B A *)
unfold Q_CongA_Acute in HH.
(* Goal: a A B A *)
ex_and HH A0.
(* Goal: a A B A *)
ex_and H2 B0.
(* Goal: a A B A *)
ex_and H3 C0.
(* Goal: a A B A *)
apply acute_distincts in H2.
(* Goal: a A B A *)
spliter.
(* Goal: a A B A *)
apply H3.
(* Goal: @CongA Tn A0 B0 C0 A B A *)
assert (a A0 B0 C0).
(* Goal: @CongA Tn A0 B0 C0 A B A *)
(* Goal: a A0 B0 C0 *)
apply H3.
(* Goal: @CongA Tn A0 B0 C0 A B A *)
(* Goal: @CongA Tn A0 B0 C0 A0 B0 C0 *)
apply conga_refl; auto.
(* Goal: @CongA Tn A0 B0 C0 A B A *)
assert(HH:= (H1 A0 B0 C0 H5)).
(* Goal: @CongA Tn A0 B0 C0 A B A *)
apply l11_21_b; auto.
(* Goal: @Out Tn B A A *)
apply out_trivial.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
Qed.
Lemma anga_col_out : forall a A B C, Q_CongA_Acute a -> a A B C -> Col A B C -> Out B A C.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C) (_ : @Col Tn A B C), @Out Tn B A C *)
intros.
(* Goal: @Out Tn B A C *)
assert(Acute A B C).
(* Goal: @Out Tn B A C *)
(* Goal: @Acute Tn A B C *)
apply (anga_acute a); auto.
(* Goal: @Out Tn B A C *)
unfold Col in H1.
(* Goal: @Out Tn B A C *)
induction H1.
(* Goal: @Out Tn B A C *)
(* Goal: @Out Tn B A C *)
apply acute_not_bet in H2.
(* Goal: @Out Tn B A C *)
(* Goal: @Out Tn B A C *)
contradiction.
(* Goal: @Out Tn B A C *)
unfold Out.
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (or (@Bet Tn B A C) (@Bet Tn B C A))) *)
apply (anga_distinct a A B C) in H.
(* Goal: a A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (or (@Bet Tn B A C) (@Bet Tn B C A))) *)
spliter.
(* Goal: a A B C *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (or (@Bet Tn B A C) (@Bet Tn B C A))) *)
repeat split; auto.
(* Goal: a A B C *)
(* Goal: or (@Bet Tn B A C) (@Bet Tn B C A) *)
induction H1.
(* Goal: a A B C *)
(* Goal: or (@Bet Tn B A C) (@Bet Tn B C A) *)
(* Goal: or (@Bet Tn B A C) (@Bet Tn B C A) *)
right.
(* Goal: a A B C *)
(* Goal: or (@Bet Tn B A C) (@Bet Tn B C A) *)
(* Goal: @Bet Tn B C A *)
auto.
(* Goal: a A B C *)
(* Goal: or (@Bet Tn B A C) (@Bet Tn B C A) *)
left.
(* Goal: a A B C *)
(* Goal: @Bet Tn B A C *)
Between.
(* Goal: a A B C *)
auto.
Qed.
Lemma ang_not_lg_null : forall a la lc A B C, Q_Cong la -> Q_Cong lc -> Q_CongA a ->
la A B -> lc C B -> a A B C -> ~ Q_Cong_Null la /\ ~ Q_Cong_Null lc.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (la lc : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_Cong Tn la) (_ : @Q_Cong Tn lc) (_ : @Q_CongA Tn a) (_ : la A B) (_ : lc C B) (_ : a A B C), and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lc)) *)
intros.
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lc)) *)
assert(HH:=ang_distincts a A B C H1 H4).
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lc)) *)
spliter.
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lc)) *)
split.
(* Goal: not (@Q_Cong_Null Tn lc) *)
(* Goal: not (@Q_Cong_Null Tn la) *)
intro.
(* Goal: not (@Q_Cong_Null Tn lc) *)
(* Goal: False *)
unfold Q_Cong_Null in H7.
(* Goal: not (@Q_Cong_Null Tn lc) *)
(* Goal: False *)
spliter.
(* Goal: not (@Q_Cong_Null Tn lc) *)
(* Goal: False *)
ex_and H8 P.
(* Goal: not (@Q_Cong_Null Tn lc) *)
(* Goal: False *)
assert(HH:= lg_cong la A B P P H H2 H9).
(* Goal: not (@Q_Cong_Null Tn lc) *)
(* Goal: False *)
apply cong_identity in HH.
(* Goal: not (@Q_Cong_Null Tn lc) *)
(* Goal: False *)
contradiction.
(* Goal: not (@Q_Cong_Null Tn lc) *)
intro.
(* Goal: False *)
unfold Q_Cong_Null in H7.
(* Goal: False *)
spliter.
(* Goal: False *)
ex_and H8 P.
(* Goal: False *)
assert(HH:= lg_cong lc C B P P H0 H3 H9).
(* Goal: False *)
apply cong_identity in HH.
(* Goal: False *)
contradiction.
Qed.
Lemma anga_not_lg_null : forall a la lc A B C, Q_Cong la -> Q_Cong lc ->
Q_CongA_Acute a -> la A B -> lc C B -> a A B C -> ~ Q_Cong_Null la /\ ~ Q_Cong_Null lc.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (la lc : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_Cong Tn la) (_ : @Q_Cong Tn lc) (_ : @Q_CongA_Acute Tn a) (_ : la A B) (_ : lc C B) (_ : a A B C), and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lc)) *)
intros.
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lc)) *)
apply anga_is_ang in H1.
(* Goal: and (not (@Q_Cong_Null Tn la)) (not (@Q_Cong_Null Tn lc)) *)
apply(ang_not_lg_null a la lc A B C); auto.
Qed.
Lemma anga_col_null : forall a A B C, Q_CongA_Acute a -> a A B C -> Col A B C -> Out B A C /\ Q_CongA_Null_Acute a.
Proof.
(* Goal: forall (a : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C : @Tpoint Tn) (_ : @Q_CongA_Acute Tn a) (_ : a A B C) (_ : @Col Tn A B C), and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
intros.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
assert(HH:= anga_distincts a A B C H H0).
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
spliter.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
assert(Out B A C).
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Out Tn B A C *)
induction H1.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Out Tn B A C *)
(* Goal: @Out Tn B A C *)
assert(HP:=anga_acute a A B C H H0).
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Out Tn B A C *)
(* Goal: @Out Tn B A C *)
assert(HH:=acute_not_bet A B C HP).
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Out Tn B A C *)
(* Goal: @Out Tn B A C *)
contradiction.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Out Tn B A C *)
induction H1.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Out Tn B A C *)
(* Goal: @Out Tn B A C *)
unfold Out.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Out Tn B A C *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (or (@Bet Tn B A C) (@Bet Tn B C A))) *)
repeat split; auto.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Out Tn B A C *)
unfold Out.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (or (@Bet Tn B A C) (@Bet Tn B C A))) *)
repeat split; auto.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: or (@Bet Tn B A C) (@Bet Tn B C A) *)
left.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
(* Goal: @Bet Tn B A C *)
Between.
(* Goal: and (@Out Tn B A C) (@Q_CongA_Null_Acute Tn a) *)
split.
(* Goal: @Q_CongA_Null_Acute Tn a *)
(* Goal: @Out Tn B A C *)
auto.
(* Goal: @Q_CongA_Null_Acute Tn a *)
apply (out_null_anga a A B C); auto.
Qed.
Lemma eqA_preserves_ang: forall a b, Q_CongA a -> EqA a b -> Q_CongA b.
Proof.
(* Goal: forall (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA Tn a) (_ : @EqA Tn a b), @Q_CongA Tn b *)
intros.
(* Goal: @Q_CongA Tn b *)
unfold Q_CongA in *.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z)))))) *)
decompose [ex and] H.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z)))))) *)
exists x.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) x B)) (and (not (@eq (@Tpoint Tn) C B)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn x B C X Y Z) (b X Y Z))))) *)
exists x0.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (not (@eq (@Tpoint Tn) x x0)) (and (not (@eq (@Tpoint Tn) C x0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn x x0 C X Y Z) (b X Y Z)))) *)
exists x1.
(* Goal: and (not (@eq (@Tpoint Tn) x x0)) (and (not (@eq (@Tpoint Tn) x1 x0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn x x0 x1 X Y Z) (b X Y Z))) *)
split.
(* Goal: and (not (@eq (@Tpoint Tn) x1 x0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn x x0 x1 X Y Z) (b X Y Z)) *)
(* Goal: not (@eq (@Tpoint Tn) x x0) *)
assumption.
(* Goal: and (not (@eq (@Tpoint Tn) x1 x0)) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn x x0 x1 X Y Z) (b X Y Z)) *)
split.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn x x0 x1 X Y Z) (b X Y Z) *)
(* Goal: not (@eq (@Tpoint Tn) x1 x0) *)
assumption.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn x x0 x1 X Y Z) (b X Y Z) *)
intros.
(* Goal: iff (@CongA Tn x x0 x1 X Y Z) (b X Y Z) *)
rewrite H4.
(* Goal: iff (a X Y Z) (b X Y Z) *)
unfold EqA in H0.
(* Goal: iff (a X Y Z) (b X Y Z) *)
apply H0.
Qed.
Lemma eqA_preserves_anga : forall a b, Q_CongA_Acute a -> Q_CongA b -> EqA a b -> Q_CongA_Acute b.
Proof.
(* Goal: forall (a b : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_CongA_Acute Tn a) (_ : @Q_CongA Tn b) (_ : @EqA Tn a b), @Q_CongA_Acute Tn b *)
intros.
(* Goal: @Q_CongA_Acute Tn b *)
assert (Q_CongA a).
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @Q_CongA Tn a *)
apply eqA_preserves_ang with b;auto.
(* Goal: @Q_CongA_Acute Tn b *)
(* Goal: @EqA Tn b a *)
symmetry;auto.
(* Goal: @Q_CongA_Acute Tn b *)
unfold EqA in H1.
(* Goal: @Q_CongA_Acute Tn b *)
anga_instance a A B C.
(* Goal: @Q_CongA_Acute Tn b *)
assert(HH:= H1 A B C).
(* Goal: @Q_CongA_Acute Tn b *)
destruct HH.
(* Goal: @Q_CongA_Acute Tn b *)
unfold Q_CongA_Acute.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Acute Tn A B C) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z))))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Acute Tn A B C) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z)))) *)
exists B.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Acute Tn A B C) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z))) *)
exists C.
(* Goal: and (@Acute Tn A B C) (forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z)) *)
split.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
unfold Q_CongA_Acute in H.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
ex_and H A'.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
ex_and H6 B'.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
ex_and H C'.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
assert(a A' B' C').
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
assert(HP:= H6 A B C).
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
destruct HP.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
assert(CongA A B C A' B' C') by (apply conga_sym;auto).
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
assert(HP:=is_ang_conga_is_ang A B C A' B' C' a).
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
assert(Ang A' B' C' a).
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
(* Goal: @Ang Tn A' B' C' a *)
apply HP.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @Ang Tn A B C a *)
split; auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
(* Goal: @CongA Tn A B C A' B' C' *)
auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
unfold Ang in H10.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
spliter.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
(* Goal: a A' B' C' *)
auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Acute Tn A B C *)
apply (acute_lea_acute _ _ _ A' B' C').
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @LeA Tn A B C A' B' C' *)
(* Goal: @Acute Tn A' B' C' *)
auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @LeA Tn A B C A' B' C' *)
unfold LeA.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@InAngle Tn P A' B' C') (@CongA Tn A B C A' B' P)) *)
exists C'.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: and (@InAngle Tn C' A' B' C') (@CongA Tn A B C A' B' C') *)
split.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @InAngle Tn C' A' B' C' *)
assert (HH:= is_ang_distinct A' B' C' a).
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @InAngle Tn C' A' B' C' *)
assert( A' <> B' /\ C' <> B').
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @InAngle Tn C' A' B' C' *)
(* Goal: and (not (@eq (@Tpoint Tn) A' B')) (not (@eq (@Tpoint Tn) C' B')) *)
apply HH.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @InAngle Tn C' A' B' C' *)
(* Goal: @Ang Tn A' B' C' a *)
split; auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @InAngle Tn C' A' B' C' *)
spliter.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @CongA Tn A B C A' B' C' *)
(* Goal: @InAngle Tn C' A' B' C' *)
apply inangle3123; auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @CongA Tn A B C A' B' C' *)
eapply (is_ang_conga _ _ _ _ _ _ a).
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Ang Tn A' B' C' a *)
(* Goal: @Ang Tn A B C a *)
split; auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
(* Goal: @Ang Tn A' B' C' a *)
split; auto.
(* Goal: forall X Y Z : @Tpoint Tn, iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
intros.
(* Goal: iff (@CongA Tn A B C X Y Z) (b X Y Z) *)
split.
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: forall _ : @CongA Tn A B C X Y Z, b X Y Z *)
intro.
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
assert(HH:= H1 X Y Z).
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
destruct HH.
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
assert(Ang X Y Z a).
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
(* Goal: @Ang Tn X Y Z a *)
eapply (is_ang_conga_is_ang A B C).
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
(* Goal: @CongA Tn A B C X Y Z *)
(* Goal: @Ang Tn A B C a *)
split; auto.
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
(* Goal: @CongA Tn A B C X Y Z *)
auto.
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
unfold Ang in H9.
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
spliter.
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
(* Goal: b X Y Z *)
auto.
(* Goal: forall _ : b X Y Z, @CongA Tn A B C X Y Z *)
intro.
(* Goal: @CongA Tn A B C X Y Z *)
assert(HH:= H1 X Y Z).
(* Goal: @CongA Tn A B C X Y Z *)
destruct HH.
(* Goal: @CongA Tn A B C X Y Z *)
assert(a X Y Z).
(* Goal: @CongA Tn A B C X Y Z *)
(* Goal: a X Y Z *)
auto.
(* Goal: @CongA Tn A B C X Y Z *)
eapply (is_ang_conga _ _ _ _ _ _ a).
(* Goal: @Ang Tn X Y Z a *)
(* Goal: @Ang Tn A B C a *)
split; auto.
(* Goal: @Ang Tn X Y Z a *)
split; auto.
Qed.
End Angles_5. |
Require Import abp_base.
Section BOOL.
Variable b : bool.
Parameter andb orb : bool -> bool -> bool.
Parameter notb : bool -> bool.
Axiom andb1 : b = andb true b.
Axiom andb2 : false = andb false b.
Axiom orb1 : true = orb true b.
Axiom orb2 : b = orb false b.
Axiom notb1 : false = notb true.
Axiom notb2 : true = notb false.
End BOOL.
Section BIT.
Parameter bit : Set.
Parameter e0 e1 : bit.
Parameter eqb : bit -> bit -> bool.
Parameter toggle : bit -> bit.
Variable b : bit.
Axiom Toggle1 : e1 = toggle e0.
Axiom Toggle2 : e0 = toggle e1.
Axiom bit1 : true = eqb b b.
Axiom bit2 : false = eqb b (toggle b).
Axiom bit3 : false = eqb (toggle b) b.
End BIT.
Section DATA.
Parameter D : Set.
Parameter eqD : D -> D -> bool.
Parameter ifD : bool -> D -> D -> D.
Variable d e : D.
Axiom eqD5 : d = ifD true d e.
Axiom eqD6 : e = ifD false d e.
Axiom eqD7 : true = eqD d d.
Axiom eqD8 : ifD (eqD d e) d e = e.
Axiom EQDi : ~ EQ D one.
End DATA.
Goal forall d e : D, d = e -> true = eqD d e.
intros.
elim H.
apply eqD7.
Save eqD_elim.
Goal forall d e : D, true = eqD d e -> d = e.
intros.
elim (eqD8 d e).
elim H.
elim eqD5.
apply refl_equal.
Save eqD_intro.
Goal forall d e : D, false = eqD d e -> d <> e.
intros.
red in |- *; intro.
cut (forall P : bool -> Prop, P true -> P false); intro L.
apply
(L
(fun P : bool =>
match P return Prop with
| true => True
| false => False
end)).
exact I.
intros.
elimtype (eqD d e = false).
elim H0.
elim eqD7.
assumption.
apply sym_equal.
assumption.
Save eqD_intro'.
Section FRAME1.
Parameter frame : Set.
Variable b b1 b2 : bit.
Variable d e : frame.
Parameter tuple : bit -> frame.
Parameter sce : frame.
Parameter eqf : frame -> frame -> bool.
Parameter iff : bool -> frame -> frame -> frame.
Axiom eqf1 : true = eqf sce sce.
Axiom eqf2 : false = eqf sce (tuple b).
Axiom eqf3 : false = eqf (tuple b) sce.
Axiom eqf4 : eqb b1 b2 = eqf (tuple b1) (tuple b2).
Axiom eqf5 : d = iff true d e.
Axiom eqf6 : e = iff false d e.
Axiom eqf7 : true = eqf d d.
Axiom eqf8 : iff (eqf d e) d e = e.
Axiom EQfi : ~ EQ frame one.
Axiom EQfD : ~ EQ frame D.
End FRAME1.
Goal forall d e : frame, d = e -> true = eqf d e.
intros.
elim H.
apply eqf7.
Save eqf_elim.
Goal forall d e : frame, true = eqf d e -> d = e.
intros.
elim (eqf8 d e).
elim H.
elim eqf5.
apply refl_equal.
Save eqf_intro.
Goal forall d e : frame, false = eqf d e -> d <> e.
intros.
red in |- *; intro.
cut (forall P : bool -> Prop, P true -> P false); intro L.
apply
(L
(fun P : bool =>
match P return Prop with
| true => True
| false => False
end)).
exact I.
intros.
elimtype (eqf d e = false).
elim H0.
elim eqf7.
assumption.
apply sym_equal.
assumption.
Save eqf_intro'.
Section FRAME2.
Parameter Frame : Set.
Variable b b1 b2 : bit.
Variable d d1 d2 : D.
Variable e e' : Frame.
Parameter Tuple : bit -> D -> Frame.
Parameter lce : Frame.
Parameter eqF : Frame -> Frame -> bool.
Parameter ifF : bool -> Frame -> Frame -> Frame.
Axiom eqF1 : true = eqF lce lce.
Axiom eqF2 : false = eqF lce (Tuple b d).
Axiom eqF3 : false = eqF (Tuple b d) lce.
Axiom eqF4 : andb (eqb b1 b2) (eqD d1 d2) = eqF (Tuple b1 d1) (Tuple b2 d2).
Axiom eqF5 : e' = ifF true e' e.
Axiom eqF6 : e = ifF false e' e.
Axiom eqF7 : true = eqF e e.
Axiom eqF8 : ifF (eqF e e') e e' = e'.
Axiom EQFi : ~ EQ Frame one.
Axiom EQFD : ~ EQ Frame D.
Axiom EQFf : ~ EQ Frame frame.
End FRAME2.
Hint Resolve EQFf .
Goal forall d e : Frame, d = e -> true = eqF d e.
intros.
elim H.
apply eqF7.
Save eqF_elim.
Goal forall d e : Frame, true = eqF d e -> d = e.
intros.
elim (eqF8 d e).
elim H.
elim eqF5.
apply refl_equal.
Save eqF_intro.
Goal forall d e : Frame, false = eqF d e -> d <> e.
intros.
red in |- *; intro.
cut (forall P : bool -> Prop, P true -> P false); intro L.
apply
(L
(fun P : bool =>
match P return Prop with
| true => True
| false => False
end)).
exact I.
intros.
elimtype (eqF d e = false).
elim H0.
elim eqF7.
assumption.
apply sym_equal.
assumption.
Save eqF_intro'.
Parameter K : one -> proc.
Parameter L : one -> proc.
Parameter S : one -> proc.
Parameter Sn : bit -> proc.
Parameter Sn_d : D -> bit -> proc.
Parameter Tn_d : D -> bit -> proc.
Parameter R : one -> proc.
Parameter Rn : bit -> proc.
Section PROC.
Variable b : bit.
Variable j : one.
Variable d : D.
Axiom
ChanK :
Frame +
(fun x : Frame =>
seq (ia Frame r2 x)
(seq
(alt (seq (ia one int i) (ia Frame s3 x))
(seq (ia one int i) (ia Frame s3 lce)))
(K i))) = K j.
Axiom
ChanL :
frame +
(fun n : frame =>
seq (ia frame r5 n)
(seq
(alt (seq (ia one int i) (ia frame s6 n))
(seq (ia one int i) (ia frame s6 sce)))
(L i))) = L j.
Axiom ProcS : seq (Sn e0) (seq (Sn e1) (S i)) = S j.
Axiom ProcSn : D + (fun d : D => seq (ia D r1 d) (Sn_d d b)) = Sn b.
Axiom ProcSn_d : seq (ia Frame s2 (Tuple b d)) (Tn_d d b) = Sn_d d b.
Axiom
ProcTn_d :
alt
(seq (alt (ia frame r6 (tuple (toggle b))) (ia frame r6 sce))
(Sn_d d b)) (ia frame r6 (tuple b)) = Tn_d d b.
Axiom ProcR : seq (Rn e1) (seq (Rn e0) (R i)) = R j.
Axiom
ProcRn :
alt
(seq
(alt (D + (fun d : D => ia Frame r3 (Tuple b d))) (ia Frame r3 lce))
(seq (ia frame s5 (tuple b)) (Rn b)))
(D +
(fun d : D =>
seq (ia Frame r3 (Tuple (toggle b) d))
(seq (ia D s4 d) (ia frame s5 (tuple (toggle b)))))) =
Rn b.
End PROC.
Definition H :=
ehcons r2
(ehcons r3
(ehcons r5
(ehcons r6 (ehcons s2 (ehcons s3 (ehcons s5 (ehcons s6 ehnil))))))).
Definition ABP := enc H (mer (S i) (mer (K i) (mer (L i) (R i)))).
Definition X := enc H (mer (S i) (mer (K i) (mer (L i) (R i)))).
Definition X1 (d : D) :=
enc H
(mer (seq (Sn_d d e0) (seq (Sn e1) (S i))) (mer (K i) (mer (L i) (R i)))).
Definition X2 (d : D) :=
enc H
(mer (seq (Tn_d d e0) (seq (Sn e1) (S i)))
(mer (K i)
(mer (L i) (seq (ia frame s5 (tuple e0)) (seq (Rn e0) (R i)))))).
Definition Y :=
enc H (mer (seq (Sn e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))).
Definition Y1 (d : D) :=
enc H
(mer (seq (Sn_d d e1) (S i)) (mer (K i) (mer (L i) (seq (Rn e0) (R i))))).
Definition Y2 (d : 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))))).
Goal r1 <> r2.
discriminate.
Save neqr1r2.
Goal r1 <> r3.
discriminate.
Save neqr1r3.
Goal r1 <> r5.
discriminate.
Save neqr1r5.
Goal r1 <> r6.
discriminate.
Save neqr1r6.
Goal r1 <> s2.
discriminate.
Save neqr1s2.
Goal r1 <> s3.
discriminate.
Save neqr1s3.
Goal r1 <> s4.
discriminate.
Save neqr1s4.
Goal r1 <> s5.
discriminate.
Save neqr1s5.
Goal r1 <> s6.
discriminate.
Save neqr1s6.
Goal r1 <> c2.
discriminate.
Save neqr1c2.
Goal r1 <> c3.
discriminate.
Save neqr1c3.
Goal r1 <> c5.
discriminate.
Save neqr1c5.
Goal r1 <> c6.
discriminate.
Save neqr1c6.
Goal r1 <> int.
discriminate.
Save neqr1int.
Goal r1 <> tau.
discriminate.
Save neqr1tau.
Hint Resolve neqr1r2 neqr1r3 neqr1r5 neqr1r6 neqr1s2 neqr1s3 neqr1s4 neqr1s5
neqr1s6 neqr1c2 neqr1c3 neqr1c5 neqr1c6 neqr1int neqr1tau.
Goal r2 <> r1.
discriminate.
Save neqr2r1.
Goal r2 <> r3.
discriminate.
Save neqr2r3.
Goal r2 <> r5.
discriminate.
Save neqr2r5.
Goal r2 <> r6.
discriminate.
Save neqr2r6.
Goal r2 <> s2.
discriminate.
Save neqr2s2.
Goal r2 <> s3.
discriminate.
Save neqr2s3.
Goal r2 <> s4.
discriminate.
Save neqr2s4.
Goal r2 <> s5.
discriminate.
Save neqr2s5.
Goal r2 <> s6.
discriminate.
Save neqr2s6.
Goal r2 <> c2.
discriminate.
Save neqr2c2.
Goal r2 <> c3.
discriminate.
Save neqr2c3.
Goal r2 <> c5.
discriminate.
Save neqr2c5.
Goal r2 <> c6.
discriminate.
Save neqr2c6.
Goal r2 <> int.
discriminate.
Save neqr2int.
Goal r2 <> tau.
discriminate.
Save neqr2tau.
Hint Resolve neqr2r1 neqr2r3 neqr2r5 neqr2r6 neqr2s2 neqr2s3 neqr2s4 neqr2s5
neqr2s6 neqr2c2 neqr2c3 neqr2c5 neqr2c6 neqr2int neqr2tau.
Goal r3 <> r1.
discriminate.
Save neqr3r1.
Goal r3 <> r2.
discriminate.
Save neqr3r2.
Goal r3 <> r5.
discriminate.
Save neqr3r5.
Goal r3 <> r6.
discriminate.
Save neqr3r6.
Goal r3 <> s2.
discriminate.
Save neqr3s2.
Goal r3 <> s3.
discriminate.
Save neqr3s3.
Goal r3 <> s4.
discriminate.
Save neqr3s4.
Goal r3 <> s5.
discriminate.
Save neqr3s5.
Goal r3 <> s6.
discriminate.
Save neqr3s6.
Goal r3 <> c2.
discriminate.
Save neqr3c2.
Goal r3 <> c3.
discriminate.
Save neqr3c3.
Goal r3 <> c5.
discriminate.
Save neqr3c5.
Goal r3 <> c6.
discriminate.
Save neqr3c6.
Goal r3 <> int.
discriminate.
Save neqr3int.
Goal r3 <> tau.
discriminate.
Save neqr3tau.
Hint Resolve neqr3r2 neqr3r1 neqr3r5 neqr3r6 neqr3s2 neqr3s3 neqr3s4 neqr3s5
neqr3s6 neqr3c2 neqr3c3 neqr3c5 neqr3c6 neqr3int neqr3tau.
Goal r5 <> r1.
discriminate.
Save neqr5r1.
Goal r5 <> r2.
discriminate.
Save neqr5r2.
Goal r5 <> r3.
discriminate.
Save neqr5r3.
Goal r5 <> r6.
discriminate.
Save neqr5r6.
Goal r5 <> s2.
discriminate.
Save neqr5s2.
Goal r5 <> s3.
discriminate.
Save neqr5s3.
Goal r5 <> s4.
discriminate.
Save neqr5s4.
Goal r5 <> s5.
discriminate.
Save neqr5s5.
Goal r5 <> s6.
discriminate.
Save neqr5s6.
Goal r5 <> c2.
discriminate.
Save neqr5c2.
Goal r5 <> c3.
discriminate.
Save neqr5c3.
Goal r5 <> c5.
discriminate.
Save neqr5c5.
Goal r5 <> c6.
discriminate.
Save neqr5c6.
Goal r5 <> int.
discriminate.
Save neqr5int.
Goal r5 <> tau.
discriminate.
Save neqr5tau.
Hint Resolve neqr5r2 neqr5r3 neqr5r1 neqr5r6 neqr5s2 neqr5s3 neqr5s4 neqr5s5
neqr5s6 neqr5c2 neqr5c3 neqr5c5 neqr5c6 neqr5int neqr5tau.
Goal r6 <> r1.
discriminate.
Save neqr6r1.
Goal r6 <> r2.
discriminate.
Save neqr6r2.
Goal r6 <> r3.
discriminate.
Save neqr6r3.
Goal r6 <> r5.
discriminate.
Save neqr6r5.
Goal r6 <> s2.
discriminate.
Save neqr6s2.
Goal r6 <> s3.
discriminate.
Save neqr6s3.
Goal r6 <> s4.
discriminate.
Save neqr6s4.
Goal r6 <> s5.
discriminate.
Save neqr6s5.
Goal r6 <> s6.
discriminate.
Save neqr6s6.
Goal r6 <> c2.
discriminate.
Save neqr6c2.
Goal r6 <> c3.
discriminate.
Save neqr6c3.
Goal r6 <> c5.
discriminate.
Save neqr6c5.
Goal r6 <> c6.
discriminate.
Save neqr6c6.
Goal r6 <> int.
discriminate.
Save neqr6int.
Goal r6 <> tau.
discriminate.
Save neqr6tau.
Hint Resolve neqr6r2 neqr6r3 neqr1r5 neqr6r1 neqr6s2 neqr6s3 neqr6s4 neqr6s5
neqr6s6 neqr6c2 neqr6c3 neqr6c5 neqr6c6 neqr6int neqr6tau.
Goal s2 <> r1.
discriminate.
Save neqs2r1.
Goal s2 <> r2.
discriminate.
Save neqs2r2.
Goal s2 <> r3.
discriminate.
Save neqs2r3.
Goal s2 <> r5.
discriminate.
Save neqs2r5.
Goal s2 <> r6.
discriminate.
Save neqs2r6.
Goal s2 <> s3.
discriminate.
Save neqs2s3.
Goal s2 <> s4.
discriminate.
Save neqs2s4.
Goal s2 <> s5.
discriminate.
Save neqs2s5.
Goal s2 <> s6.
discriminate.
Save neqs2s6.
Goal s2 <> c2.
discriminate.
Save neqs2c2.
Goal s2 <> c3.
discriminate.
Save neqs2c3.
Goal s2 <> c5.
discriminate.
Save neqs2c5.
Goal s2 <> c6.
discriminate.
Save neqs2c6.
Goal s2 <> int.
discriminate.
Save neqs2int.
Goal s2 <> tau.
discriminate.
Save neqs2tau.
Hint Resolve neqs2r2 neqs2r3 neqs2r5 neqs2r6 neqs2r1 neqs2s3 neqs2s4 neqs2s5
neqs2s6 neqs2c2 neqs2c3 neqs2c5 neqs2c6 neqs2int neqs2tau.
Goal s3 <> r1.
discriminate.
Save neqs3r1.
Goal s3 <> r2.
discriminate.
Save neqs3r2.
Goal s3 <> r3.
discriminate.
Save neqs3r3.
Goal s3 <> r5.
discriminate.
Save neqs3r5.
Goal s3 <> r6.
discriminate.
Save neqs3r6.
Goal s3 <> s2.
discriminate.
Save neqs3s2.
Goal s3 <> s4.
discriminate.
Save neqs3s4.
Goal s3 <> s5.
discriminate.
Save neqs3s5.
Goal s3 <> s6.
discriminate.
Save neqs3s6.
Goal s3 <> c2.
discriminate.
Save neqs3c2.
Goal s3 <> c3.
discriminate.
Save neqs3c3.
Goal s3 <> c5.
discriminate.
Save neqs3c5.
Goal s3 <> c6.
discriminate.
Save neqs3c6.
Goal s3 <> int.
discriminate.
Save neqs3int.
Goal s3 <> tau.
discriminate.
Save neqs3tau.
Hint Resolve neqs3r2 neqs3r3 neqs3r5 neqs3r6 neqs3s2 neqs3s4 neqs3s5 neqs3s6
neqs3c2 neqs3c3 neqs3c5 neqs3c6 neqs3int neqs3tau.
Goal s4 <> r1.
discriminate.
Save neqs4r1.
Goal s4 <> r2.
discriminate.
Save neqs4r2.
Goal s4 <> r3.
discriminate.
Save neqs4r3.
Goal s4 <> r5.
discriminate.
Save neqs4r5.
Goal s4 <> r6.
discriminate.
Save neqs4r6.
Goal s4 <> s2.
discriminate.
Save neqs4s2.
Goal s4 <> s3.
discriminate.
Save neqs4s3.
Goal s4 <> s5.
discriminate.
Save neqs4s5.
Goal s4 <> s6.
discriminate.
Save neqs4s6.
Goal s4 <> c2.
discriminate.
Save neqs4c2.
Goal s4 <> c3.
discriminate.
Save neqs4c3.
Goal s4 <> c5.
discriminate.
Save neqs4c5.
Goal s4 <> c6.
discriminate.
Save neqs4c6.
Goal s4 <> int.
discriminate.
Save neqs4int.
Goal s4 <> tau.
discriminate.
Save neqs4tau.
Hint Resolve neqs4r2 neqs4r3 neqs4r5 neqs4r6 neqs4s2 neqs4s3 neqs4s5 neqs4s6
neqs4c2 neqs4c3 neqs4c5 neqs4c6 neqs4int neqs4tau.
Goal s5 <> r1.
discriminate.
Save neqs5r1.
Goal s5 <> r2.
discriminate.
Save neqs5r2.
Goal s5 <> r3.
discriminate.
Save neqs5r3.
Goal s5 <> r5.
discriminate.
Save neqs5r5.
Goal s5 <> r6.
discriminate.
Save neqs5r6.
Goal s5 <> s2.
discriminate.
Save neqs5s2.
Goal s5 <> s3.
discriminate.
Save neqs5s3.
Goal s5 <> s4.
discriminate.
Save neqs5s4.
Goal s5 <> s6.
discriminate.
Save neqs5s6.
Goal s5 <> c2.
discriminate.
Save neqs5c2.
Goal s5 <> c3.
discriminate.
Save neqs5c3.
Goal s5 <> c5.
discriminate.
Save neqs5c5.
Goal s5 <> c6.
discriminate.
Save neqs5c6.
Goal s5 <> int.
discriminate.
Save neqs5int.
Goal s5 <> tau.
discriminate.
Save neqs5tau.
Hint Resolve neqs5r2 neqs5r3 neqs5r5 neqs5r6 neqs5s2 neqs5s3 neqs5s4 neqs5r1
neqs5s6 neqr1c2 neqs5c3 neqs5c5 neqs5c6 neqs5int neqs5tau.
Goal s6 <> r1.
discriminate.
Save neqs6r1.
Goal s6 <> r2.
discriminate.
Save neqs6r2.
Goal s6 <> r3.
discriminate.
Save neqs6r3.
Goal s6 <> r5.
discriminate.
Save neqs6r5.
Goal s6 <> r6.
discriminate.
Save neqs6r6.
Goal s6 <> s2.
discriminate.
Save neqs6s2.
Goal s6 <> s3.
discriminate.
Save neqs6s3.
Goal s6 <> s4.
discriminate.
Save neqs6s4.
Goal s6 <> s5.
discriminate.
Save neqs6s5.
Goal s6 <> c2.
discriminate.
Save neqs6c2.
Goal s6 <> c3.
discriminate.
Save neqs6c3.
Goal s6 <> c5.
discriminate.
Save neqs6c5.
Goal s6 <> c6.
discriminate.
Save neqs6c6.
Goal s6 <> int.
discriminate.
Save neqs6int.
Goal s6 <> tau.
discriminate.
Save neqs6tau.
Hint Resolve neqs6r2 neqs6r3 neqs6r5 neqs6r6 neqs6s2 neqs6s3 neqs6s4 neqs6s5
neqs6r1 neqs6c2 neqs6c3 neqs6c5 neqs6c6 neqs6int neqs6tau.
Goal c2 <> r1.
discriminate.
Save neqc2r1.
Goal c2 <> r2.
discriminate.
Save neqc2r2.
Goal c2 <> r3.
discriminate.
Save neqc2r3.
Goal c2 <> r5.
discriminate.
Save neqc2r5.
Goal c2 <> r6.
discriminate.
Save neqc2r6.
Goal c2 <> s2.
discriminate.
Save neqc2s2.
Goal c2 <> s3.
discriminate.
Save neqc2s3.
Goal c2 <> s4.
discriminate.
Save neqc2s4.
Goal c2 <> s5.
discriminate.
Save neqc2s5.
Goal c2 <> s6.
discriminate.
Save neqc2s6.
Goal c2 <> c3.
discriminate.
Save neqc2c3.
Goal c2 <> c5.
discriminate.
Save neqc2c5.
Goal c2 <> c6.
discriminate.
Save neqc1c6.
Goal c2 <> int.
discriminate.
Save neqc2int.
Goal c2 <> tau.
discriminate.
Save neqc2tau.
Hint Resolve neqc2r2 neqc2r3 neqc2r5 neqc2r6 neqc2s2 neqc2s3 neqc2s4 neqc2s5
neqc2s6 neqc2c3 neqc2c5 neqc2int neqc2tau.
Goal c3 <> r1.
discriminate.
Save neqc3r1.
Goal c3 <> r2.
discriminate.
Save neqc3r2.
Goal c3 <> r3.
discriminate.
Save neqc3r3.
Goal c3 <> r5.
discriminate.
Save neqc3r5.
Goal c3 <> r6.
discriminate.
Save neqc3r6.
Goal c3 <> s2.
discriminate.
Save neqc3s2.
Goal c3 <> s3.
discriminate.
Save neqc3s3.
Goal c3 <> s4.
discriminate.
Save neqc3s4.
Goal c3 <> s5.
discriminate.
Save neqc3s5.
Goal c3 <> s6.
discriminate.
Save neqc3s6.
Goal c3 <> c2.
discriminate.
Save neqc3c2.
Goal c3 <> c5.
discriminate.
Save neqc3c5.
Goal c3 <> c6.
discriminate.
Save neqc3c6.
Goal c3 <> int.
discriminate.
Save neqc3int.
Goal c3 <> tau.
discriminate.
Save neqc3tau.
Hint Resolve neqc3r2 neqc3r3 neqc3r5 neqc3r6 neqc3s2 neqc3s3 neqc3s4 neqc3s5
neqc3s6 neqc3c2 neqc3r1 neqc3c5 neqc3c6 neqc3int neqc3tau.
Goal c5 <> r1.
discriminate.
Save neqc5r1.
Goal c5 <> r2.
discriminate.
Save neqc5r2.
Goal c5 <> r3.
discriminate.
Save neqc5r3.
Goal c5 <> r5.
discriminate.
Save neqc5r5.
Goal c5 <> r6.
discriminate.
Save neqc5r6.
Goal c5 <> s2.
discriminate.
Save neqc5s2.
Goal c5 <> s3.
discriminate.
Save neqc5s3.
Goal c5 <> s4.
discriminate.
Save neqc5s4.
Goal c5 <> s5.
discriminate.
Save neqc5s5.
Goal c5 <> s6.
discriminate.
Save neqc5s6.
Goal c5 <> c2.
discriminate.
Save neqc5c2.
Goal c5 <> c3.
discriminate.
Save neqc5c3.
Goal c5 <> c6.
discriminate.
Save neqc5c6.
Goal c5 <> int.
discriminate.
Save neqc5int.
Goal c5 <> tau.
discriminate.
Save neqc5tau.
Hint Resolve neqc5r2 neqc5r3 neqc5r5 neqc5r6 neqc5s2 neqc5s3 neqc5s4 neqc5s5
neqc5s6 neqc5c2 neqc5c3 neqc5r1 neqc5c6 neqc5int neqc5tau.
Goal c6 <> r1.
discriminate.
Save neqc6r1.
Goal c6 <> r2.
discriminate.
Save neqc6r2.
Goal c6 <> r3.
discriminate.
Save neqc6r3.
Goal c6 <> r5.
discriminate.
Save neqc6r5.
Goal c6 <> r6.
discriminate.
Save neqc6r6.
Goal c6 <> s2.
discriminate.
Save neqc6s2.
Goal c6 <> s3.
discriminate.
Save neqc6s3.
Goal c6 <> s4.
discriminate.
Save neqc6s4.
Goal c6 <> s5.
discriminate.
Save neqc6s5.
Goal c6 <> s6.
discriminate.
Save neqc6s6.
Goal c6 <> c2.
discriminate.
Save neqc6c2.
Goal c6 <> c3.
discriminate.
Save neqc6c3.
Goal c6 <> c5.
discriminate.
Save neqc6c5.
Goal c6 <> int.
discriminate.
Save neqc6int.
Goal c6 <> tau.
discriminate.
Save neqc6tau.
Hint Resolve neqc6r2 neqc6r3 neqc6r5 neqc6r6 neqc6s2 neqc6s3 neqc6s4 neqc6s5
neqc6s6 neqc6c2 neqc6c3 neqc6c5 neqc6r1 neqc6int neqc6tau.
Goal int <> r1.
discriminate.
Save neqintr1.
Goal int <> r2.
discriminate.
Save neqintr2.
Goal int <> r3.
discriminate.
Save neqintr3.
Goal int <> r5.
discriminate.
Save neqintr5.
Goal int <> r6.
discriminate.
Save neqintr6.
Goal int <> s2.
discriminate.
Save neqints2.
Goal int <> s3.
discriminate.
Save neqints3.
Goal int <> s4.
discriminate.
Save neqints4.
Goal int <> s5.
discriminate.
Save neqints5.
Goal int <> s6.
discriminate.
Save neqints6.
Goal int <> c2.
discriminate.
Save neqintc2.
Goal int <> c3.
discriminate.
Save neqintc3.
Goal int <> c5.
discriminate.
Save neqintc5.
Goal int <> c6.
discriminate.
Save neqintc6.
Goal int <> tau.
discriminate.
Save neqinttau.
Hint Resolve neqintr2 neqintr3 neqintr5 neqintr6 neqints2 neqints3 neqints4
neqints5 neqints6 neqintc2 neqintc3 neqintc5 neqintc6 neqintr1 neqinttau.
Goal tau <> r1.
discriminate.
Save neqtaur1.
Goal tau <> r2.
discriminate.
Save neqtaur2.
Goal tau <> r3.
discriminate.
Save neqtaur3.
Goal tau <> r5.
discriminate.
Save neqtaur5.
Goal tau <> r6.
discriminate.
Save neqtaur6.
Goal tau <> s2.
discriminate.
Save neqtaus2.
Goal tau <> s3.
discriminate.
Save neqtaus3.
Goal tau <> s4.
discriminate.
Save neqtaus4.
Goal tau <> s5.
discriminate.
Save neqtaus5.
Goal tau <> s6.
discriminate.
Save neqtaus6.
Goal tau <> c2.
discriminate.
Save neqtauc2.
Goal tau <> c3.
discriminate.
Save neqtauc3.
Goal tau <> c5.
discriminate.
Save neqtauc5.
Goal tau <> c6.
discriminate.
Save neqtauc6.
Goal tau <> int.
discriminate.
Save neqtauint.
Hint Resolve neqtaur2 neqtaur3 neqtaur5 neqtaur6 neqtaus2 neqtaus3 neqtaus4
neqtaus5 neqtaus6 neqtauc2 neqtauc3 neqtauc5 neqtauc6 neqtauint neqtaur1.
Goal forall a : act, a = r2 -> In_ehlist a H.
intros a b.
unfold In_ehlist, H in |- *.
auto.
Save HLemmar2.
Goal forall a : act, a = r3 -> In_ehlist a H.
intros a b.
unfold In_ehlist, H in |- *.
auto.
Save HLemmar3.
Goal forall a : act, a = r5 -> In_ehlist a H.
intros a b.
unfold In_ehlist, H in |- *.
auto.
Save HLemmar5.
Goal forall a : act, a = r6 -> In_ehlist a H.
intros a b.
unfold In_ehlist, H in |- *.
auto.
Save HLemmar6.
Goal forall a : act, a = s2 -> In_ehlist a H.
intros a b.
unfold In_ehlist, H in |- *.
auto 10.
Save HLemmas2.
Goal forall a : act, a = s3 -> In_ehlist a H.
intros a b.
unfold In_ehlist, H in |- *.
auto 10.
Save HLemmas3.
Goal forall a : act, a = s5 -> In_ehlist a H.
intros a b.
unfold In_ehlist, H in |- *.
auto 10.
Save HLemmas5.
Goal forall a : act, a = s6 -> In_ehlist a H.
intros a b.
unfold In_ehlist, H in |- *.
auto 10.
Save HLemmas6.
Goal
forall a : act,
a <> r2 ->
a <> r3 ->
a <> r5 ->
a <> r6 -> a <> s2 -> a <> s3 -> a <> s5 -> a <> s6 -> ~ In_ehlist a H.
intros a b b0 b1 b2 b3 b4 b5 b6.
red in |- *. unfold In_ehlist, H in |- *.
intro I1. elim I1. assumption.
intro I2. elim I2. assumption.
intro I3. elim I3. assumption.
intro I4. elim I4. assumption.
intro I5. elim I5. assumption.
intro I6. elim I6. assumption.
intro I7. elim I7. assumption.
intro I8. elim I8. assumption.
intro. assumption.
Save HLemma.
Hint Resolve HLemmar2 HLemmar3 HLemmar5 HLemmar6 HLemmas2 HLemmas3 HLemmas5
HLemmas6 HLemma.
Goal ~ In_ehlist r1 H.
apply HLemma; auto.
Save Inr1H.
Goal In_ehlist r2 H.
auto.
Save Inr2H.
Goal In_ehlist r3 H.
auto.
Save Inr3H.
Goal In_ehlist r5 H.
auto.
Save Inr5H.
Goal In_ehlist r6 H.
auto.
Save Inr6H.
Goal In_ehlist s2 H.
auto.
Save Ins2H.
Goal In_ehlist s3 H.
auto.
Save Ins3H.
Goal ~ In_ehlist s4 H.
apply HLemma; auto.
Save Ins4H.
Goal In_ehlist s5 H.
auto.
Save Ins5H.
Goal In_ehlist s6 H.
auto.
Save Ins6H.
Goal ~ In_ehlist int H.
apply HLemma; auto.
Save InintH.
Goal ~ In_ehlist c2 H.
apply HLemma; auto.
Save Inc2H.
Goal ~ In_ehlist c3 H.
apply HLemma; auto.
Save Inc3H.
Goal ~ In_ehlist c5 H.
apply HLemma; auto.
Save Inc5H.
Goal ~ In_ehlist c6 H.
apply HLemma; auto.
Save Inc6H.
Definition I' := ehcons c2 (ehcons c3 (ehcons c5 (ehcons c6 ehnil))).
Definition I'' := ehcons int ehnil.
Goal In_ehlist c2 I'.
unfold In_ehlist, I' in |- *.
left; apply refl_equal.
Save Inc2I.
Goal In_ehlist c3 I'.
unfold In_ehlist, I' in |- *.
right; left; apply refl_equal.
Save Inc3I.
Goal In_ehlist c5 I'.
unfold In_ehlist, I' in |- *.
right; right; left; apply refl_equal.
Save Inc5I.
Goal In_ehlist c6 I'.
unfold In_ehlist, I' in |- *.
right; right; right; left; apply refl_equal.
Save Inc6I.
Goal ~ In_ehlist int I'.
red in |- *. unfold In_ehlist, I' in |- *.
intro; elim H0. intro. apply neqintc2. assumption.
intro; elim H1. intro. apply neqintc3. assumption.
intro; elim H2. intro. apply neqintc5. assumption.
intro; elim H3. intro. apply neqintc6. assumption.
intro; assumption.
Save InintI.
Goal ~ In_ehlist s4 I'.
red in |- *. unfold In_ehlist, I' in |- *.
intro; elim H0. intro. apply neqs4c2. assumption.
intro; elim H1. intro. apply neqs4c3. assumption.
intro; elim H2. intro. apply neqs4c5. assumption.
intro; elim H3. intro. apply neqs4c6. assumption.
intro; assumption.
Save Ins4I.
Goal ~ In_ehlist r1 I'.
red in |- *. unfold In_ehlist, I' in |- *.
intro; elim H0. intro. apply neqr1c2. assumption.
intro; elim H1. intro. apply neqr1c3. assumption.
intro; elim H2. intro. apply neqr1c5. assumption.
intro; elim H3. intro. apply neqr1c6. assumption.
intro; assumption.
Save Inr1I.
Goal In_ehlist int I''.
unfold In_ehlist, I'' in |- *.
left. apply refl_equal.
Save InintI''.
Goal ~ In_ehlist s4 I''.
red in |- *. unfold In_ehlist, I'' in |- *.
intro; elim H0. intro. apply neqints4.
apply sym_equal. assumption.
intro. assumption.
Save Ins4I''.
Goal ~ In_ehlist r1 I''.
red in |- *; unfold In_ehlist, I'' in |- *.
intro; elim H0. intro. apply neqintr1.
apply sym_equal. assumption.
intro; assumption.
Save Inr1I''.
Goal ~ In_ehlist tau I''.
red in |- *; unfold In_ehlist, I'' in |- *.
intro; elim H0. intro. apply neqinttau.
apply sym_equal. assumption.
intro; assumption.
Save IntauI''.
|
Require Export GeoCoq.Meta_theory.Parallel_postulates.parallel_postulates.
Require Export GeoCoq.Meta_theory.Parallel_postulates.par_trans_NID.
Section T13.
Context `{TE:Tarski_euclidean}.
Lemma cop_npar__inter_exists : forall A1 B1 A2 B2,
Coplanar A1 B1 A2 B2 -> ~ Par A1 B1 A2 B2 -> exists X, Col X A1 B1 /\ Col X A2 B2.
Proof.
(* Goal: forall (A1 B1 A2 B2 : @Tpoint Tn) (_ : @Coplanar Tn A1 B1 A2 B2) (_ : not (@Par Tn A1 B1 A2 B2)), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
induction (eq_dec_points A1 B1).
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
subst; exists A2; Col.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
induction (eq_dec_points A2 B2).
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
subst; exists A1; Col.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
induction (inter_dec A1 B1 A2 B2).
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
exfalso.
(* Goal: False *)
apply H0.
(* Goal: @Par Tn A1 B1 A2 B2 *)
unfold Par.
(* Goal: or (@Par_strict Tn A1 B1 A2 B2) (and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) A2 B2)) (and (@Col Tn A1 A2 B2) (@Col Tn B1 A2 B2)))) *)
left.
(* Goal: @Par_strict Tn A1 B1 A2 B2 *)
unfold Par_strict.
(* Goal: and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) A2 B2)) (and (@Coplanar Tn A1 B1 A2 B2) (not (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)))))) *)
repeat split; assumption.
Qed.
Lemma cop_npar__inter : forall A1 B1 A2 B2, A1 <> B1 -> A2 <> B2 ->
Coplanar A1 B1 A2 B2 -> ~ Par A1 B1 A2 B2 -> exists X, Inter A1 B1 A2 B2 X.
Proof.
(* Goal: forall (A1 B1 A2 B2 : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A1 B1)) (_ : not (@eq (@Tpoint Tn) A2 B2)) (_ : @Coplanar Tn A1 B1 A2 B2) (_ : not (@Par Tn A1 B1 A2 B2)), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Inter Tn A1 B1 A2 B2 X) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Inter Tn A1 B1 A2 B2 X) *)
destruct (cop_npar__inter_exists A1 B1 A2 B2) as [X []].
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Inter Tn A1 B1 A2 B2 X) *)
(* Goal: not (@Par Tn A1 B1 A2 B2) *)
(* Goal: @Coplanar Tn A1 B1 A2 B2 *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Inter Tn A1 B1 A2 B2 X) *)
(* Goal: not (@Par Tn A1 B1 A2 B2) *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => @Inter Tn A1 B1 A2 B2 X) *)
exists X.
(* Goal: @Inter Tn A1 B1 A2 B2 X *)
split.
(* Goal: and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1)))) (and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X)) *)
(* Goal: not (@eq (@Tpoint Tn) A2 B2) *)
assumption.
(* Goal: and (@ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1)))) (and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X)) *)
split.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
induction (col_dec A2 A1 B1).
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
exists B2.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
(* Goal: and (@Col Tn B2 A2 B2) (not (@Col Tn B2 A1 B1)) *)
split.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
(* Goal: not (@Col Tn B2 A1 B1) *)
(* Goal: @Col Tn B2 A2 B2 *)
Col.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
(* Goal: not (@Col Tn B2 A1 B1) *)
intro.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
(* Goal: False *)
apply H2.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
(* Goal: @Par Tn A1 B1 A2 B2 *)
right.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
(* Goal: and (not (@eq (@Tpoint Tn) A1 B1)) (and (not (@eq (@Tpoint Tn) A2 B2)) (and (@Col Tn A1 A2 B2) (@Col Tn B1 A2 B2))) *)
repeat split; ColR.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P A2 B2) (not (@Col Tn P A1 B1))) *)
exists A2.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
(* Goal: and (@Col Tn A2 A2 B2) (not (@Col Tn A2 A1 B1)) *)
split; Col.
(* Goal: and (@Col Tn A1 B1 X) (@Col Tn A2 B2 X) *)
split; Col.
Qed.
Lemma parallel_uniqueness :
forall A1 A2 B1 B2 C1 C2 P : Tpoint,
Par A1 A2 B1 B2 -> Col P B1 B2 ->
Par A1 A2 C1 C2 -> Col P C1 C2 ->
Col C1 B1 B2 /\ Col C2 B1 B2.
Proof.
(* Goal: forall (A1 A2 B1 B2 C1 C2 P : @Tpoint Tn) (_ : @Par Tn A1 A2 B1 B2) (_ : @Col Tn P B1 B2) (_ : @Par Tn A1 A2 C1 C2) (_ : @Col Tn P C1 C2), and (@Col Tn C1 B1 B2) (@Col Tn C2 B1 B2) *)
apply tarski_s_euclid_implies_playfair.
(* Goal: @tarski_s_parallel_postulate Tn *)
unfold tarski_s_parallel_postulate; apply euclid.
Qed.
Lemma par_trans : forall A1 A2 B1 B2 C1 C2,
Par A1 A2 B1 B2 -> Par B1 B2 C1 C2 -> Par A1 A2 C1 C2.
Proof.
(* Goal: forall (A1 A2 B1 B2 C1 C2 : @Tpoint Tn) (_ : @Par Tn A1 A2 B1 B2) (_ : @Par Tn B1 B2 C1 C2), @Par Tn A1 A2 C1 C2 *)
intros.
(* Goal: @Par Tn A1 A2 C1 C2 *)
apply playfair_implies_par_trans with B1 B2; [|assumption..].
(* Goal: @playfair_s_postulate Tn *)
unfold playfair_s_postulate.
(* Goal: forall (A1 A2 B1 B2 C1 C2 P : @Tpoint Tn) (_ : @Par Tn A1 A2 B1 B2) (_ : @Col Tn P B1 B2) (_ : @Par Tn A1 A2 C1 C2) (_ : @Col Tn P C1 C2), and (@Col Tn C1 B1 B2) (@Col Tn C2 B1 B2) *)
apply parallel_uniqueness.
Qed.
Lemma inter__npar : forall A1 A2 B1 B2 X,
Inter A1 A2 B1 B2 X -> ~ Par A1 A2 B1 B2.
Proof.
(* Goal: forall (A1 A2 B1 B2 X : @Tpoint Tn) (_ : @Inter Tn A1 A2 B1 B2 X), not (@Par Tn A1 A2 B1 B2) *)
intros.
(* Goal: not (@Par Tn A1 A2 B1 B2) *)
destruct H as [HA [[P []] []]].
(* Goal: not (@Par Tn A1 A2 B1 B2) *)
induction 1.
(* Goal: False *)
(* Goal: False *)
apply (par_not_col A1 A2 B1 B2 X); Col.
(* Goal: False *)
spliter.
(* Goal: False *)
apply H0, (col3 B1 B2); Col.
Qed.
Lemma l12_16 : forall A1 A2 B1 B2 C1 C2 X,
Par A1 A2 B1 B2 -> Coplanar B1 B2 C1 C2 -> Inter A1 A2 C1 C2 X -> exists Y, Inter B1 B2 C1 C2 Y.
Proof.
(* Goal: forall (A1 A2 B1 B2 C1 C2 X : @Tpoint Tn) (_ : @Par Tn A1 A2 B1 B2) (_ : @Coplanar Tn B1 B2 C1 C2) (_ : @Inter Tn A1 A2 C1 C2 X), @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => @Inter Tn B1 B2 C1 C2 Y) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => @Inter Tn B1 B2 C1 C2 Y) *)
assert_diffs.
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => @Inter Tn B1 B2 C1 C2 Y) *)
apply cop_npar__inter; auto.
(* Goal: not (@Par Tn B1 B2 C1 C2) *)
(* Goal: not (@eq (@Tpoint Tn) C1 C2) *)
destruct H1.
(* Goal: not (@Par Tn B1 B2 C1 C2) *)
(* Goal: not (@eq (@Tpoint Tn) C1 C2) *)
auto.
(* Goal: not (@Par Tn B1 B2 C1 C2) *)
intro.
(* Goal: False *)
apply inter__npar in H1.
(* Goal: False *)
apply H1.
(* Goal: @Par Tn A1 A2 C1 C2 *)
apply par_trans with B1 B2; assumption.
Qed.
Lemma par_dec : forall A B C D, Par A B C D \/ ~ Par A B C D.
Proof.
(* Goal: forall A B C D : @Tpoint Tn, or (@Par Tn A B C D) (not (@Par Tn A B C D)) *)
exact (par_trans__par_dec par_trans).
Qed.
Lemma par_not_par : forall A B C D P Q, Par A B C D -> ~Par A B P Q -> ~Par C D P Q.
Proof.
(* Goal: forall (A B C D P Q : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : not (@Par Tn A B P Q)), not (@Par Tn C D P Q) *)
intros A B C D P Q HPar HNPar.
(* Goal: not (@Par Tn C D P Q) *)
intro HNPar'.
(* Goal: False *)
apply HNPar.
(* Goal: @Par Tn A B P Q *)
apply par_trans with C D; Par.
Qed.
Lemma cop_par__inter : forall A B C D P Q,
Par A B C D -> ~Par A B P Q -> Coplanar C D P Q ->
exists Y, Col P Q Y /\ Col C D Y.
Proof.
(* Goal: forall (A B C D P Q : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : not (@Par Tn A B P Q)) (_ : @Coplanar Tn C D P Q), @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
intros A B C D P Q HPar HNPar HCop.
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
destruct (cop_npar__inter_exists C D P Q) as [Y []].
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
(* Goal: not (@Par Tn C D P Q) *)
(* Goal: @Coplanar Tn C D P Q *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
(* Goal: not (@Par Tn C D P Q) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
(* Goal: False *)
apply HNPar, par_trans with C D; assumption.
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
exists Y; split; Col.
Qed.
Lemma l12_19 :
forall A B C D ,
~Col A B C -> Par A B C D -> Par B C D A ->
Cong A B C D /\ Cong B C D A /\ TS B D A C /\ TS A C B D.
Lemma l12_20_bis :
forall A B C D,
Par A B C D -> Cong A B C D -> TS B D A C ->
Par B C D A /\ Cong B C D A /\ TS A C B D.
Lemma l12_20 :
forall A B C D,
Par A B C D -> Cong A B C D -> TS A C B D ->
Par B C D A /\ Cong B C D A /\ TS A C B D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : @Cong Tn A B C D) (_ : @TS Tn A C B D), and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
intros.
(* Goal: and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
assert(TS B D A C).
(* Goal: and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
(* Goal: @TS Tn B D A C *)
apply par_two_sides_two_sides.
(* Goal: and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
(* Goal: @TS Tn A C B D *)
(* Goal: @Par Tn B A D C *)
apply par_comm.
(* Goal: and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
(* Goal: @TS Tn A C B D *)
(* Goal: @Par Tn A B C D *)
assumption.
(* Goal: and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
(* Goal: @TS Tn A C B D *)
assumption.
(* Goal: and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
assert(HH:=l12_20_bis A B C D H H0 H2).
(* Goal: and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
spliter.
(* Goal: and (@Par Tn B C D A) (and (@Cong Tn B C D A) (@TS Tn A C B D)) *)
split.
(* Goal: and (@Cong Tn B C D A) (@TS Tn A C B D) *)
(* Goal: @Par Tn B C D A *)
assumption.
(* Goal: and (@Cong Tn B C D A) (@TS Tn A C B D) *)
split.
(* Goal: @TS Tn A C B D *)
(* Goal: @Cong Tn B C D A *)
assumption.
(* Goal: @TS Tn A C B D *)
assumption.
Qed.
Lemma l12_21_a :
forall A B C D,
TS A C B D ->
(Par A B C D -> CongA B A C D C A).
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @TS Tn A C B D) (_ : @Par Tn A B C D), @CongA Tn B A C D C A *)
apply postulates_in_euclidean_context; simpl; repeat (try (left; reflexivity); right).
Qed.
Lemma l12_21 : forall A B C D,
TS A C B D ->
(CongA B A C D C A <-> Par A B C D).
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @TS Tn A C B D), iff (@CongA Tn B A C D C A) (@Par Tn A B C D) *)
intros.
(* Goal: iff (@CongA Tn B A C D C A) (@Par Tn A B C D) *)
split.
(* Goal: forall _ : @Par Tn A B C D, @CongA Tn B A C D C A *)
(* Goal: forall _ : @CongA Tn B A C D C A, @Par Tn A B C D *)
intro.
(* Goal: forall _ : @Par Tn A B C D, @CongA Tn B A C D C A *)
(* Goal: @Par Tn A B C D *)
apply l12_21_b ; assumption.
(* Goal: forall _ : @Par Tn A B C D, @CongA Tn B A C D C A *)
intro.
(* Goal: @CongA Tn B A C D C A *)
apply l12_21_a; assumption.
Qed.
Lemma l12_22_a : forall A B C D P,
Out P A C -> OS P A B D -> Par A B C D ->
CongA B A P D C P.
Proof.
(* Goal: forall (A B C D P : @Tpoint Tn) (_ : @Out Tn P A C) (_ : @OS Tn P A B D) (_ : @Par Tn A B C D), @CongA Tn B A P D C P *)
cut (forall A B C D P, A <> P -> Bet P A C -> OS P A B D -> Par A B C D -> CongA B A P D C P).
(* Goal: forall (A B C D P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A P)) (_ : @Bet Tn P A C) (_ : @OS Tn P A B D) (_ : @Par Tn A B C D), @CongA Tn B A P D C P *)
(* Goal: forall (_ : forall (A B C D P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A P)) (_ : @Bet Tn P A C) (_ : @OS Tn P A B D) (_ : @Par Tn A B C D), @CongA Tn B A P D C P) (A B C D P : @Tpoint Tn) (_ : @Out Tn P A C) (_ : @OS Tn P A B D) (_ : @Par Tn A B C D), @CongA Tn B A P D C P *)
{
(* Goal: forall (_ : forall (A B C D P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A P)) (_ : @Bet Tn P A C) (_ : @OS Tn P A B D) (_ : @Par Tn A B C D), @CongA Tn B A P D C P) (A B C D P : @Tpoint Tn) (_ : @Out Tn P A C) (_ : @OS Tn P A B D) (_ : @Par Tn A B C D), @CongA Tn B A P D C P *)
intros Haux A B C D P HOut HOS HPar.
(* Goal: @CongA Tn B A P D C P *)
destruct HOut as [HAP [HCP [|]]].
(* Goal: @CongA Tn B A P D C P *)
(* Goal: @CongA Tn B A P D C P *)
apply Haux; trivial.
(* Goal: @CongA Tn B A P D C P *)
apply conga_sym, Haux; Par.
(* Goal: @OS Tn P C D B *)
apply col_one_side with A; Col; Side.
(* BG Goal: forall (A B C D P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A P)) (_ : @Bet Tn P A C) (_ : @OS Tn P A B D) (_ : @Par Tn A B C D), @CongA Tn B A P D C P *)
}
(* Goal: forall (A B C D P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A P)) (_ : @Bet Tn P A C) (_ : @OS Tn P A B D) (_ : @Par Tn A B C D), @CongA Tn B A P D C P *)
intros A B C D P HAP HBet HOS HPar.
(* Goal: @CongA Tn B A P D C P *)
destruct (eq_dec_points A C).
(* Goal: @CongA Tn B A P D C P *)
(* Goal: @CongA Tn B A P D C P *)
{
(* Goal: @CongA Tn B A P D C P *)
subst C.
(* Goal: @CongA Tn B A P D A P *)
apply out2__conga; [|apply out_trivial; auto].
(* Goal: @Out Tn A D B *)
apply col_one_side_out with P; Side.
(* Goal: @Col Tn A D B *)
apply par_id; Par.
(* BG Goal: @CongA Tn B A P D C P *)
}
(* Goal: @CongA Tn B A P D C P *)
destruct (segment_construction B A B A) as [B' []].
(* Goal: @CongA Tn B A P D C P *)
assert_diffs.
(* Goal: @CongA Tn B A P D C P *)
apply conga_trans with B' A C.
(* Goal: @CongA Tn B' A C D C P *)
(* Goal: @CongA Tn B A P B' A C *)
apply l11_14; auto.
(* Goal: @CongA Tn B' A C D C P *)
apply l11_10 with B' C D A; try (apply out_trivial); auto; [|apply l6_6, bet_out; Between].
(* Goal: @CongA Tn B' A C D C A *)
apply l12_21_a; [|apply par_col_par_2 with B; Col].
(* Goal: @TS Tn A C B' D *)
apply l9_2, l9_8_2 with B; [|apply col_one_side with P; Side; Col].
(* Goal: @TS Tn A C B B' *)
assert (HNCol : ~ Col P A B) by (apply one_side_not_col123 with D, HOS).
(* Goal: @TS Tn A C B B' *)
assert (HNCol1 : ~ Col B A C) by (intro; apply HNCol; ColR).
(* Goal: @TS Tn A C B B' *)
repeat split; trivial.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T B')) *)
(* Goal: not (@Col Tn B' A C) *)
intro; apply HNCol1; ColR.
(* Goal: @ex (@Tpoint Tn) (fun T : @Tpoint Tn => and (@Col Tn T A C) (@Bet Tn B T B')) *)
exists A; Col.
Qed.
Lemma l12_22 :
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).
Proof.
(* Goal: forall (A B C D P : @Tpoint Tn) (_ : @Out Tn P A C) (_ : @OS Tn P A B D), iff (@CongA Tn B A P D C P) (@Par Tn A B C D) *)
intros.
(* Goal: iff (@CongA Tn B A P D C P) (@Par Tn A B C D) *)
split; intro.
(* Goal: @CongA Tn B A P D C P *)
(* Goal: @Par Tn A B C D *)
apply (l12_22_b _ _ _ _ P); assumption.
(* Goal: @CongA Tn B A P D C P *)
apply l12_22_a; assumption.
Qed.
Lemma l12_23 :
forall A B C,
~Col A B C ->
exists B', exists C',
TS A C B B' /\ TS A B C C' /\
Bet B' A C' /\ CongA A B C B A C' /\ CongA A C B C A B'.
Lemma cop_npars__inter_exists :
forall A1 B1 A2 B2,
Coplanar A1 B1 A2 B2 -> ~ Par_strict A1 B1 A2 B2 ->
exists X, Col X A1 B1 /\ Col X A2 B2.
Proof.
(* Goal: forall (A1 B1 A2 B2 : @Tpoint Tn) (_ : @Coplanar Tn A1 B1 A2 B2) (_ : not (@Par_strict Tn A1 B1 A2 B2)), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
induction (eq_dec_points A1 B1).
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
subst.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X B1 B1) (@Col Tn X A2 B2)) *)
exists A2.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: and (@Col Tn A2 B1 B1) (@Col Tn A2 A2 B2) *)
Col.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
induction (eq_dec_points A2 B2).
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
subst.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X B2 B2)) *)
exists A1.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: and (@Col Tn A1 A1 B1) (@Col Tn A1 B2 B2) *)
Col.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
induction (inter_dec A1 B1 A2 B2).
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
exfalso.
(* Goal: False *)
apply H0.
(* Goal: @Par_strict Tn A1 B1 A2 B2 *)
repeat split; assumption.
Qed.
Lemma cop2_npar__inter : forall A B A' B' X Y,
Coplanar A B X Y -> Coplanar A' B' X Y -> ~ Par A B A' B' ->
(exists P, Col P X Y /\ (Col P A B \/ Col P A' B')).
Proof.
(* Goal: forall (A B A' B' X Y : @Tpoint Tn) (_ : @Coplanar Tn A B X Y) (_ : @Coplanar Tn A' B' X Y) (_ : not (@Par Tn A B A' B')), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
induction(par_dec A B X Y).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
assert(~ Par A' B' X Y).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: not (@Par Tn A' B' X Y) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: False *)
apply H1.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @Par Tn A B A' B' *)
apply(par_trans _ _ X Y); Par.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
destruct(cop_npar__inter_exists A' B' X Y) as [P []].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: not (@Par Tn A' B' X Y) *)
(* Goal: @Coplanar Tn A' B' X Y *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: not (@Par Tn A' B' X Y) *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
exists P.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B')) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: or (@Col Tn P A B) (@Col Tn P A' B') *)
(* Goal: @Col Tn P X Y *)
Col.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: or (@Col Tn P A B) (@Col Tn P A' B') *)
right.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: @Col Tn P A' B' *)
Col.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
destruct(cop_npar__inter_exists A B X Y) as [P []].
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: not (@Par Tn A B X Y) *)
(* Goal: @Coplanar Tn A B X Y *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
(* Goal: not (@Par Tn A B X Y) *)
assumption.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
exists P.
(* Goal: and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B')) *)
split.
(* Goal: or (@Col Tn P A B) (@Col Tn P A' B') *)
(* Goal: @Col Tn P X Y *)
Col.
(* Goal: or (@Col Tn P A B) (@Col Tn P A' B') *)
left.
(* Goal: @Col Tn P A B *)
Col.
Qed.
Lemma not_par_one_not_par : forall A B A' B' X Y, ~Par A B A' B' -> ~Par A B X Y \/ ~Par A' B' X Y.
Proof.
(* Goal: forall (A B A' B' X Y : @Tpoint Tn) (_ : not (@Par Tn A B A' B')), or (not (@Par Tn A B X Y)) (not (@Par Tn A' B' X Y)) *)
intros.
(* Goal: or (not (@Par Tn A B X Y)) (not (@Par Tn A' B' X Y)) *)
destruct (par_dec A B X Y).
(* Goal: or (not (@Par Tn A B X Y)) (not (@Par Tn A' B' X Y)) *)
(* Goal: or (not (@Par Tn A B X Y)) (not (@Par Tn A' B' X Y)) *)
right.
(* Goal: or (not (@Par Tn A B X Y)) (not (@Par Tn A' B' X Y)) *)
(* Goal: not (@Par Tn A' B' X Y) *)
intro.
(* Goal: or (not (@Par Tn A B X Y)) (not (@Par Tn A' B' X Y)) *)
(* Goal: False *)
apply H.
(* Goal: or (not (@Par Tn A B X Y)) (not (@Par Tn A' B' X Y)) *)
(* Goal: @Par Tn A B A' B' *)
apply par_trans with X Y; Par.
(* Goal: or (not (@Par Tn A B X Y)) (not (@Par Tn A' B' X Y)) *)
left.
(* Goal: not (@Par Tn A B X Y) *)
assumption.
Qed.
Lemma col_par_par_col : forall A B C A' B' C', Col A B C -> Par A B A' B' -> Par B C B' C' -> Col A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Col Tn A B C) (_ : @Par Tn A B A' B') (_ : @Par Tn B C B' C'), @Col Tn A' B' C' *)
intros.
(* Goal: @Col Tn A' B' C' *)
apply par_distincts in H0.
(* Goal: @Col Tn A' B' C' *)
apply par_distincts in H1.
(* Goal: @Col Tn A' B' C' *)
spliter.
(* Goal: @Col Tn A' B' C' *)
assert(Par A B B C).
(* Goal: @Col Tn A' B' C' *)
(* Goal: @Par Tn A B B C *)
right.
(* Goal: @Col Tn A' B' C' *)
(* 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))) *)
repeat split; Col.
(* Goal: @Col Tn A' B' C' *)
assert(Par A' B' B' C').
(* Goal: @Col Tn A' B' C' *)
(* Goal: @Par Tn A' B' B' C' *)
apply (par_trans _ _ A' B').
(* Goal: @Col Tn A' B' C' *)
(* Goal: @Par Tn A' B' B' C' *)
(* Goal: @Par Tn A' B' A' B' *)
Par.
(* Goal: @Col Tn A' B' C' *)
(* Goal: @Par Tn A' B' B' C' *)
apply (par_trans _ _ B C).
(* Goal: @Col Tn A' B' C' *)
(* Goal: @Par Tn B C B' C' *)
(* Goal: @Par Tn A' B' B C *)
apply (par_trans _ _ A B); Par.
(* Goal: @Col Tn A' B' C' *)
(* Goal: @Par Tn B C B' C' *)
Par.
(* Goal: @Col Tn A' B' C' *)
induction H7.
(* Goal: @Col Tn A' B' C' *)
(* Goal: @Col Tn A' B' C' *)
apply False_ind.
(* Goal: @Col Tn A' B' C' *)
(* Goal: False *)
apply H7.
(* Goal: @Col Tn A' B' C' *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A' B') (@Col Tn X B' C')) *)
exists B'.
(* Goal: @Col Tn A' B' C' *)
(* Goal: and (@Col Tn B' A' B') (@Col Tn B' B' C') *)
split; Col.
(* Goal: @Col Tn A' B' C' *)
spliter.
(* Goal: @Col Tn A' B' C' *)
Col.
Qed.
Lemma cop_par_perp__perp : forall A B C D P Q, Par A B C D -> Perp A B P Q -> Coplanar C D P Q ->
Perp C D P Q.
Proof.
(* Goal: forall (A B C D P Q : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : @Perp Tn A B P Q) (_ : @Coplanar Tn C D P Q), @Perp Tn C D P Q *)
apply universal_posidonius_postulate__perpendicular_transversal_postulate.
(* Goal: @universal_posidonius_postulate Tn *)
apply playfair__universal_posidonius_postulate.
(* Goal: @playfair_s_postulate Tn *)
unfold playfair_s_postulate; apply parallel_uniqueness.
Qed.
Lemma cop4_par_perp2__par : forall A B C D E F G H,
Par A B C D -> Perp A B E F -> Perp C D G H ->
Coplanar A B E G -> Coplanar A B E H ->
Coplanar A B F G -> Coplanar A B F H ->
Par E F G H.
Proof.
(* Goal: forall (A B C D E F G H : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : @Perp Tn A B E F) (_ : @Perp Tn C D G H) (_ : @Coplanar Tn A B E G) (_ : @Coplanar Tn A B E H) (_ : @Coplanar Tn A B F G) (_ : @Coplanar Tn A B F H), @Par Tn E F G H *)
apply par_perp_perp_implies_par_perp_2_par.
(* Goal: @perpendicular_transversal_postulate Tn *)
intros A B; intros.
(* Goal: @Perp Tn C D P Q *)
apply (cop_par_perp__perp A B); assumption.
Qed.
End T13.
Section T13_2D.
Context `{T2D:Tarski_2D}.
Context `{TE:@Tarski_euclidean Tn TnEQD}.
Lemma not_par_inter_exists : forall A1 B1 A2 B2,
~ Par A1 B1 A2 B2 -> exists X, Col X A1 B1 /\ Col X A2 B2.
Proof.
(* Goal: forall (A1 B1 A2 B2 : @Tpoint Tn) (_ : not (@Par Tn A1 B1 A2 B2)), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
apply cop_npar__inter_exists.
(* Goal: not (@Par Tn A1 B1 A2 B2) *)
(* Goal: @Coplanar Tn A1 B1 A2 B2 *)
apply all_coplanar.
(* Goal: not (@Par Tn A1 B1 A2 B2) *)
assumption.
Qed.
Lemma l12_16_2D : forall A1 A2 B1 B2 C1 C2 X,
Par A1 A2 B1 B2 -> Inter A1 A2 C1 C2 X -> exists Y, Inter B1 B2 C1 C2 Y.
Proof.
(* Goal: forall (A1 A2 B1 B2 C1 C2 X : @Tpoint Tn) (_ : @Par Tn A1 A2 B1 B2) (_ : @Inter Tn A1 A2 C1 C2 X), @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => @Inter Tn B1 B2 C1 C2 Y) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => @Inter Tn B1 B2 C1 C2 Y) *)
assert (HC := all_coplanar B1 B2 C1 C2).
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => @Inter Tn B1 B2 C1 C2 Y) *)
apply l12_16 with A1 A2 X; assumption.
Qed.
Lemma par_inter : forall A B C D P Q,
Par A B C D -> ~Par A B P Q ->
exists Y, Col P Q Y /\ Col C D Y.
Proof.
(* Goal: forall (A B C D P Q : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : not (@Par Tn A B P Q)), @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
assert (HC := all_coplanar C D P Q).
(* Goal: @ex (@Tpoint Tn) (fun Y : @Tpoint Tn => and (@Col Tn P Q Y) (@Col Tn C D Y)) *)
apply (cop_par__inter A B); assumption.
Qed.
Lemma not_par_strict_inter_exists :
forall A1 B1 A2 B2,
~Par_strict A1 B1 A2 B2 ->
exists X, Col X A1 B1 /\ Col X A2 B2.
Proof.
(* Goal: forall (A1 B1 A2 B2 : @Tpoint Tn) (_ : not (@Par_strict Tn A1 B1 A2 B2)), @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Col Tn X A1 B1) (@Col Tn X A2 B2)) *)
apply (cop_npars__inter_exists).
(* Goal: not (@Par_strict Tn A1 B1 A2 B2) *)
(* Goal: @Coplanar Tn A1 B1 A2 B2 *)
apply all_coplanar.
(* Goal: not (@Par_strict Tn A1 B1 A2 B2) *)
assumption.
Qed.
Lemma not_par_inter : forall A B A' B' X Y, ~Par A B A' B' -> (exists P, Col P X Y /\ (Col P A B \/ Col P A' B')).
Proof.
(* Goal: forall (A B A' B' X Y : @Tpoint Tn) (_ : not (@Par Tn A B A' B')), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
assert (HC := all_coplanar).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Col Tn P X Y) (or (@Col Tn P A B) (@Col Tn P A' B'))) *)
apply (cop2_npar__inter); auto.
Qed.
Lemma par_perp__perp : forall A B C D P Q, Par A B C D -> Perp A B P Q ->
Perp C D P Q.
Proof.
(* Goal: forall (A B C D P Q : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : @Perp Tn A B P Q), @Perp Tn C D P Q *)
intros A B C D P Q HPar HPer.
(* Goal: @Perp Tn C D P Q *)
assert (HCop := all_coplanar C D P Q).
(* Goal: @Perp Tn C D P Q *)
apply (cop_par_perp__perp A B); assumption.
Qed.
Lemma par_perp2__par : forall A B C D E F G H,
Par A B C D -> Perp A B E F -> Perp C D G H ->
Par E F G H.
Proof.
(* Goal: forall (A B C D E F G H : @Tpoint Tn) (_ : @Par Tn A B C D) (_ : @Perp Tn A B E F) (_ : @Perp Tn C D G H), @Par Tn E F G H *)
intros A B C D; intros.
(* Goal: @Par Tn E F G H *)
apply (cop4_par_perp2__par A B C D); try (apply all_coplanar); assumption.
Qed.
End T13_2D. |
Require Import securite.
Lemma POinv1rel6 :
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) ->
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) ->
inv1
(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)) (_ : 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)), inv1 (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)) (_ : 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)), inv1 (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *)
unfold rel6 in |- *.
(* 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)) (_ : and (known_in (triple (B2C (D2B d4)) c2 (Encrypt (Pair (B2C (D2B d6)) (B2C (K2B k1))) (KeyX Bid))) l) (and (@eq AState (MBNaKab d7 d8 d9 k0) (MBNaKab d18 d19 d20 k2)) (and (@eq SState (MABNaNbKeyK d d0 d1 d2 d3) (MABNaNbKeyK d10 d11 d12 d13 d14)) (and (@eq (list C) l l0) (and (@eq D d4 d15) (and (@eq D d5 d16) (and (@eq D d6 d17) (@eq C c c1)))))))), inv1 (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *)
intros Inv0 Inv1 and1.
(* Goal: inv1 (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: inv1 (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 mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrfun ssrbool eqtype.
Require Import BinNat.
Require BinPos Ndec.
Require Export Ring.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Delimit Scope coq_nat_scope with coq_nat.
Notation "m + n" := (plus m n) : coq_nat_scope.
Notation "m - n" := (minus m n) : coq_nat_scope.
Notation "m * n" := (mult m n) : coq_nat_scope.
Notation "m <= n" := (le m n) : coq_nat_scope.
Notation "m < n" := (lt m n) : coq_nat_scope.
Notation "m >= n" := (ge m n) : coq_nat_scope.
Notation "m > n" := (gt m n) : coq_nat_scope.
Delimit Scope N_scope with num.
Delimit Scope nat_scope with N.
Delimit Scope nat_rec_scope with Nrec.
Notation succn := Datatypes.S.
Notation predn := Peano.pred.
Notation "n .+1" := (succn n) (at level 2, left associativity,
format "n .+1") : nat_scope.
Notation "n .+2" := n.+1.+1 (at level 2, left associativity,
format "n .+2") : nat_scope.
Notation "n .+3" := n.+2.+1 (at level 2, left associativity,
format "n .+3") : nat_scope.
Notation "n .+4" := n.+2.+2 (at level 2, left associativity,
format "n .+4") : nat_scope.
Notation "n .-1" := (predn n) (at level 2, left associativity,
format "n .-1") : nat_scope.
Notation "n .-2" := n.-1.-1 (at level 2, left associativity,
format "n .-2") : nat_scope.
Lemma succnK : cancel succn predn. Proof. by []. Qed.
Proof.
(* Goal: @cancel nat nat S Nat.pred *)
by [].
Qed.
Reserved Notation "n .*2" (at level 2, format "n .*2").
Reserved Notation "n ./2" (at level 2, format "n ./2").
Fixpoint eqn m n {struct m} :=
match m, n with
| 0, 0 => true
| m'.+1, n'.+1 => eqn m' n'
| _, _ => false
end.
Lemma eqnP : Equality.axiom eqn.
Canonical nat_eqMixin := EqMixin eqnP.
Canonical nat_eqType := Eval hnf in EqType nat nat_eqMixin.
Arguments eqn !m !n.
Arguments eqnP {x y}.
Lemma eqnE : eqn = eq_op. Proof. by []. Qed.
Proof.
(* Goal: @eq (forall (_ : nat) (_ : nat), bool) eqn (@eq_op nat_eqType) *)
by [].
Qed.
Lemma nat_irrelevance (x y : nat) (E E' : x = y) : E = E'.
Proof.
(* Goal: @eq (@eq nat x y) E E' *)
exact: eq_irrelevance.
Qed.
Definition addn_rec := plus.
Notation "m + n" := (addn_rec m n) : nat_rec_scope.
Definition addn := nosimpl addn_rec.
Notation "m + n" := (addn m n) : nat_scope.
Lemma addnE : addn = addn_rec. Proof. by []. Qed.
Proof.
(* Goal: @eq (forall (_ : nat) (_ : nat), nat) addn addn_rec *)
by [].
Qed.
Lemma add0n : left_id 0 addn. Proof. by []. Qed.
Proof.
(* Goal: @left_id nat nat O addn *)
by [].
Qed.
Lemma add1n n : 1 + n = n.+1. Proof. by []. Qed.
Proof.
(* Goal: @eq nat (addn (S O) n) (S n) *)
by [].
Qed.
Lemma addnS m n : m + n.+1 = (m + n).+1. Proof. by elim: m. Qed.
Proof.
(* Goal: @eq nat (addn m (S n)) (S (addn m n)) *)
by elim: m.
Qed.
Lemma addnCA : left_commutative addn.
Proof.
(* Goal: @left_commutative nat nat addn *)
by move=> m n p; elim: m => //= m; rewrite addnS => <-.
Qed.
Lemma addnC : commutative addn.
Proof.
(* Goal: @commutative nat nat addn *)
by move=> m n; rewrite -{1}[n]addn0 addnCA addn0.
Qed.
Lemma addnA : associative addn.
Proof.
(* Goal: @associative nat addn *)
by move=> m n p; rewrite (addnC n) addnCA addnC.
Qed.
Lemma addnAC : right_commutative addn.
Proof.
(* Goal: @right_commutative nat nat addn *)
by move=> m n p; rewrite -!addnA (addnC n).
Qed.
Lemma addnACA : interchange addn addn.
Proof.
(* Goal: @interchange nat addn addn *)
by move=> m n p q; rewrite -!addnA (addnCA n).
Qed.
Lemma addn_eq0 m n : (m + n == 0) = (m == 0) && (n == 0).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (addn m n) O) (andb (@eq_op nat_eqType m O) (@eq_op nat_eqType n O)) *)
by case: m; case: n.
Qed.
Lemma eqn_add2l p m n : (p + m == p + n) = (m == n).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (addn p m) (addn p n)) (@eq_op nat_eqType m n) *)
by elim: p.
Qed.
Lemma eqn_add2r p m n : (m + p == n + p) = (m == n).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (addn m p) (addn n p)) (@eq_op nat_eqType m n) *)
by rewrite -!(addnC p) eqn_add2l.
Qed.
Lemma addnI : right_injective addn.
Proof.
(* Goal: @right_injective nat nat nat addn *)
by move=> p m n Heq; apply: eqP; rewrite -(eqn_add2l p) Heq eqxx.
Qed.
Lemma addIn : left_injective addn.
Proof.
(* Goal: @left_injective nat nat nat addn *)
move=> p m n; rewrite -!(addnC p); apply addnI.
Qed.
Lemma addn2 m : m + 2 = m.+2. Proof. by rewrite addnC. Qed.
Proof.
(* Goal: @eq nat (addn m (S (S O))) (S (S m)) *)
by rewrite addnC.
Qed.
Lemma addn3 m : m + 3 = m.+3. Proof. by rewrite addnC. Qed.
Proof.
(* Goal: @eq nat (addn m (S (S (S O)))) (S (S (S m))) *)
by rewrite addnC.
Qed.
Lemma addn4 m : m + 4 = m.+4. Proof. by rewrite addnC. Qed.
Proof.
(* Goal: @eq nat (addn m (S (S (S (S O))))) (S (S (S (S m)))) *)
by rewrite addnC.
Qed.
Definition subn_rec := minus.
Notation "m - n" := (subn_rec m n) : nat_rec_scope.
Definition subn := nosimpl subn_rec.
Notation "m - n" := (subn m n) : nat_scope.
Lemma subnE : subn = subn_rec. Proof. by []. Qed.
Proof.
(* Goal: @eq (forall (_ : nat) (_ : nat), nat) subn subn_rec *)
by [].
Qed.
Lemma sub0n : left_zero 0 subn. Proof. by []. Qed.
Proof.
(* Goal: @left_zero nat nat O subn *)
by [].
Qed.
Lemma subnn : self_inverse 0 subn. Proof. by elim. Qed.
Proof.
(* Goal: @self_inverse nat nat O subn *)
by elim.
Qed.
Lemma subn1 n : n - 1 = n.-1. Proof. by case: n => [|[]]. Qed.
Proof.
(* Goal: @eq nat (subn n (S O)) (Nat.pred n) *)
by case: n => [|[]].
Qed.
Lemma subnDl p m n : (p + m) - (p + n) = m - n.
Proof.
(* Goal: @eq nat (subn (addn p m) (addn p n)) (subn m n) *)
by elim: p.
Qed.
Lemma subnDr p m n : (m + p) - (n + p) = m - n.
Proof.
(* Goal: @eq nat (subn (addn m p) (addn n p)) (subn m n) *)
by rewrite -!(addnC p) subnDl.
Qed.
Lemma addKn n : cancel (addn n) (subn^~ n).
Proof.
(* Goal: @cancel nat nat (addn n) (fun x : nat => subn x n) *)
by move=> m; rewrite /= -{2}[n]addn0 subnDl subn0.
Qed.
Lemma addnK n : cancel (addn^~ n) (subn^~ n).
Proof.
(* Goal: @cancel nat nat (fun x : nat => addn x n) (fun x : nat => subn x n) *)
by move=> m; rewrite /= (addnC m) addKn.
Qed.
Lemma subSnn n : n.+1 - n = 1.
Proof.
(* Goal: @eq nat (subn (S n) n) (S O) *)
exact (addnK n 1).
Qed.
Lemma subnDA m n p : n - (m + p) = (n - m) - p.
Proof.
(* Goal: @eq nat (subn n (addn m p)) (subn (subn n m) p) *)
by elim: m n => [|m IHm] [].
Qed.
Lemma subnAC : right_commutative subn.
Proof.
(* Goal: @right_commutative nat nat subn *)
by move=> m n p; rewrite -!subnDA addnC.
Qed.
Lemma subnS m n : m - n.+1 = (m - n).-1.
Proof.
(* Goal: @eq nat (subn m (S n)) (Nat.pred (subn m n)) *)
by rewrite -addn1 subnDA subn1.
Qed.
Lemma subSKn m n : (m.+1 - n).-1 = m - n.
Proof.
(* Goal: @eq nat (Nat.pred (subn (S m) n)) (subn m n) *)
by rewrite -subnS.
Qed.
Definition leq m n := m - n == 0.
Notation "m <= n" := (leq m n) : nat_scope.
Notation "m < n" := (m.+1 <= n) : nat_scope.
Notation "m >= n" := (n <= m) (only parsing) : nat_scope.
Notation "m > n" := (n < m) (only parsing) : nat_scope.
Definition geq := [rel m n | m >= n].
Definition ltn := [rel m n | m < n].
Definition gtn := [rel m n | m > n].
Notation "m <= n <= p" := ((m <= n) && (n <= p)) : nat_scope.
Notation "m < n <= p" := ((m < n) && (n <= p)) : nat_scope.
Notation "m <= n < p" := ((m <= n) && (n < p)) : nat_scope.
Notation "m < n < p" := ((m < n) && (n < p)) : nat_scope.
Lemma ltnS m n : (m < n.+1) = (m <= n). Proof. by []. Qed.
Proof.
(* Goal: @eq bool (leq (S m) (S n)) (leq m n) *)
by [].
Qed.
Lemma ltn0Sn n : 0 < n.+1. Proof. by []. Qed.
Proof.
(* Goal: is_true (leq (S O) (S n)) *)
by [].
Qed.
Lemma leqnn n : n <= n. Proof. by elim: n. Qed.
Proof.
(* Goal: is_true (leq n n) *)
by elim: n.
Qed.
Lemma eq_leq m n : m = n -> m <= n. Proof. by move->. Qed.
Proof.
(* Goal: forall _ : @eq nat m n, is_true (leq m n) *)
by move->.
Qed.
Hint Resolve leqnSn : core.
Lemma leq_pred n : n.-1 <= n. Proof. by case: n => /=. Qed.
Proof.
(* Goal: is_true (leq (Nat.pred n) n) *)
by case: n => /=.
Qed.
Lemma ltn_predK m n : m < n -> n.-1.+1 = n.
Proof.
(* Goal: forall _ : is_true (leq (S m) n), @eq nat (S (Nat.pred n)) n *)
by case: n.
Qed.
Lemma prednK n : 0 < n -> n.-1.+1 = n.
Proof.
(* Goal: forall _ : is_true (leq (S O) n), @eq nat (S (Nat.pred n)) n *)
exact: ltn_predK.
Qed.
Lemma leqNgt m n : (m <= n) = ~~ (n < m).
Proof.
(* Goal: @eq bool (leq m n) (negb (leq (S n) m)) *)
by elim: m n => [|m IHm] [].
Qed.
Lemma ltnNge m n : (m < n) = ~~ (n <= m).
Proof.
(* Goal: @eq bool (leq (S m) n) (negb (leq n m)) *)
by rewrite leqNgt.
Qed.
Lemma ltnn n : n < n = false.
Proof.
(* Goal: @eq bool (leq (S n) n) false *)
by rewrite ltnNge leqnn.
Qed.
Lemma lt0n n : (0 < n) = (n != 0). Proof. by case: n. Qed.
Proof.
(* Goal: @eq bool (leq (S O) n) (negb (@eq_op nat_eqType n O)) *)
by case: n.
Qed.
Lemma eqn0Ngt n : (n == 0) = ~~ (n > 0). Proof. by case: n. Qed.
Proof.
(* Goal: @eq bool (@eq_op nat_eqType n O) (negb (leq (S O) n)) *)
by case: n.
Qed.
Hint Resolve lt0n_neq0 neq0_lt0n : core.
Lemma eqn_leq m n : (m == n) = (m <= n <= m).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType m n) (andb (leq m n) (leq n m)) *)
by elim: m n => [|m IHm] [].
Qed.
Lemma anti_leq : antisymmetric leq.
Proof.
(* Goal: @antisymmetric nat leq *)
by move=> m n; rewrite -eqn_leq => /eqP.
Qed.
Lemma neq_ltn m n : (m != n) = (m < n) || (n < m).
Proof.
(* Goal: @eq bool (negb (@eq_op nat_eqType m n)) (orb (leq (S m) n) (leq (S n) m)) *)
by rewrite eqn_leq negb_and orbC -!ltnNge.
Qed.
Lemma gtn_eqF m n : m < n -> n == m = false.
Proof.
(* Goal: forall _ : is_true (leq (S m) n), @eq bool (@eq_op nat_eqType n m) false *)
by rewrite eqn_leq (leqNgt n) => ->.
Qed.
Lemma ltn_eqF m n : m < n -> m == n = false.
Proof.
(* Goal: forall _ : is_true (leq (S m) n), @eq bool (@eq_op nat_eqType m n) false *)
by move/gtn_eqF; rewrite eq_sym.
Qed.
Lemma ltn_geF m n : m < n -> m >= n = false.
Proof.
(* Goal: forall _ : is_true (leq (S m) n), @eq bool (leq n m) false *)
by rewrite (leqNgt n) => ->.
Qed.
Lemma leq_gtF m n : m <= n -> m > n = false.
Proof.
(* Goal: forall _ : is_true (leq m n), @eq bool (leq (S n) m) false *)
by rewrite (ltnNge n) => ->.
Qed.
Lemma leq_eqVlt m n : (m <= n) = (m == n) || (m < n).
Proof.
(* Goal: @eq bool (leq m n) (orb (@eq_op nat_eqType m n) (leq (S m) n)) *)
by elim: m n => [|m IHm] [].
Qed.
Lemma ltn_neqAle m n : (m < n) = (m != n) && (m <= n).
Proof.
(* Goal: @eq bool (leq (S m) n) (andb (negb (@eq_op nat_eqType m n)) (leq m n)) *)
by rewrite ltnNge leq_eqVlt negb_or -leqNgt eq_sym.
Qed.
Lemma leq_trans n m p : m <= n -> n <= p -> m <= p.
Proof.
(* Goal: forall (_ : is_true (leq m n)) (_ : is_true (leq n p)), is_true (leq m p) *)
by elim: n m p => [|i IHn] [|m] [|p] //; apply: IHn m p.
Qed.
Lemma leq_ltn_trans n m p : m <= n -> n < p -> m < p.
Proof.
(* Goal: forall (_ : is_true (leq m n)) (_ : is_true (leq (S n) p)), is_true (leq (S m) p) *)
by move=> Hmn; apply: leq_trans.
Qed.
Lemma ltnW m n : m < n -> m <= n.
Proof.
(* Goal: forall _ : is_true (leq (S m) n), is_true (leq m n) *)
exact: leq_trans.
Qed.
Hint Resolve ltnW : core.
Lemma leqW m n : m <= n -> m <= n.+1.
Proof.
(* Goal: forall _ : is_true (leq m n), is_true (leq m (S n)) *)
by move=> le_mn; apply: ltnW.
Qed.
Lemma ltn_trans n m p : m < n -> n < p -> m < p.
Proof.
(* Goal: forall (_ : is_true (leq (S m) n)) (_ : is_true (leq (S n) p)), is_true (leq (S m) p) *)
by move=> lt_mn /ltnW; apply: leq_trans.
Qed.
Lemma leq_total m n : (m <= n) || (m >= n).
Proof.
(* Goal: is_true (orb (leq m n) (leq n m)) *)
by rewrite -implyNb -ltnNge; apply/implyP; apply: ltnW.
Qed.
Lemma leP m n : reflect (m <= n)%coq_nat (m <= n).
Arguments leP {m n}.
Lemma le_irrelevance m n le_mn1 le_mn2 : le_mn1 = le_mn2 :> (m <= n)%coq_nat.
Proof.
(* Goal: @eq (le m n) le_mn1 le_mn2 *)
elim: {n}n.+1 {-1}n (erefl n.+1) => // n IHn _ [<-] in le_mn1 le_mn2 *.
pose def_n2 := erefl n; transitivity (eq_ind _ _ le_mn2 _ def_n2) => //.
(* Goal: @eq (le m n) le_mn1 (@eq_ind nat n (le m) le_mn2 n def_n2) *)
move def_n1: {1 4 5 7}n le_mn1 le_mn2 def_n2 => n1 le_mn1.
(* Goal: forall (le_mn2 : le m n) (def_n2 : @eq nat n n1), @eq (le m n1) le_mn1 (@eq_ind nat n (le m) le_mn2 n1 def_n2) *)
case: n1 / le_mn1 def_n1 => [|n1 le_mn1] def_n1 [|n2 le_mn2] def_n2.
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) (S n1) def_n2) *)
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat m (le m) (le_n m) (S n1) def_n2) *)
(* Goal: @eq (le m m) (le_n m) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) m def_n2) *)
(* Goal: @eq (le m m) (le_n m) (@eq_ind nat m (le m) (le_n m) m def_n2) *)
-
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) (S n1) def_n2) *)
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat m (le m) (le_n m) (S n1) def_n2) *)
(* Goal: @eq (le m m) (le_n m) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) m def_n2) *)
(* Goal: @eq (le m m) (le_n m) (@eq_ind nat m (le m) (le_n m) m def_n2) *)
by rewrite [def_n2]eq_axiomK.
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) (S n1) def_n2) *)
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat m (le m) (le_n m) (S n1) def_n2) *)
(* Goal: @eq (le m m) (le_n m) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) m def_n2) *)
-
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) (S n1) def_n2) *)
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat m (le m) (le_n m) (S n1) def_n2) *)
(* Goal: @eq (le m m) (le_n m) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) m def_n2) *)
by move/leP: (le_mn2); rewrite -{1}def_n2 ltnn.
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) (S n1) def_n2) *)
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat m (le m) (le_n m) (S n1) def_n2) *)
-
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) (S n1) def_n2) *)
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat m (le m) (le_n m) (S n1) def_n2) *)
by move/leP: (le_mn1); rewrite {1}def_n2 ltnn.
(* Goal: @eq (le m (S n1)) (le_S m n1 le_mn1) (@eq_ind nat (S n2) (le m) (le_S m n2 le_mn2) (S n1) def_n2) *)
case: def_n2 (def_n2) => ->{n2} def_n2 in le_mn2 *.
by rewrite [def_n2]eq_axiomK /=; congr le_S; apply: IHn.
Qed.
Qed.
Lemma ltP m n : reflect (m < n)%coq_nat (m < n).
Proof.
(* Goal: Bool.reflect (lt m n) (leq (S m) n) *)
exact leP.
Qed.
Arguments ltP {m n}.
Lemma lt_irrelevance m n lt_mn1 lt_mn2 : lt_mn1 = lt_mn2 :> (m < n)%coq_nat.
Proof.
(* Goal: @eq (lt m n) lt_mn1 lt_mn2 *)
exact: (@le_irrelevance m.+1).
Qed.
Variant leq_xor_gtn m n : bool -> bool -> Set :=
| LeqNotGtn of m <= n : leq_xor_gtn m n true false
| GtnNotLeq of n < m : leq_xor_gtn m n false true.
Lemma leqP m n : leq_xor_gtn m n (m <= n) (n < m).
Proof.
(* Goal: leq_xor_gtn m n (leq m n) (leq (S n) m) *)
by rewrite ltnNge; case le_mn: (m <= n); constructor; rewrite // ltnNge le_mn.
Qed.
Variant ltn_xor_geq m n : bool -> bool -> Set :=
| LtnNotGeq of m < n : ltn_xor_geq m n false true
| GeqNotLtn of n <= m : ltn_xor_geq m n true false.
Lemma ltnP m n : ltn_xor_geq m n (n <= m) (m < n).
Proof.
(* Goal: ltn_xor_geq m n (leq n m) (leq (S m) n) *)
by rewrite -(ltnS n); case: leqP; constructor.
Qed.
Variant eqn0_xor_gt0 n : bool -> bool -> Set :=
| Eq0NotPos of n = 0 : eqn0_xor_gt0 n true false
| PosNotEq0 of n > 0 : eqn0_xor_gt0 n false true.
Lemma posnP n : eqn0_xor_gt0 n (n == 0) (0 < n).
Proof.
(* Goal: eqn0_xor_gt0 n (@eq_op nat_eqType n O) (leq (S O) n) *)
by case: n; constructor.
Qed.
Variant compare_nat m n :
bool -> bool -> bool -> bool -> bool -> bool -> Set :=
| CompareNatLt of m < n : compare_nat m n true false true false false false
| CompareNatGt of m > n : compare_nat m n false true false true false false
| CompareNatEq of m = n : compare_nat m n true true false false true true.
Lemma ltngtP m n : compare_nat m n (m <= n) (n <= m) (m < n)
(n < m) (n == m) (m == n).
Proof.
(* Goal: compare_nat m n (leq m n) (leq n m) (leq (S m) n) (leq (S n) m) (@eq_op nat_eqType n m) (@eq_op nat_eqType m n) *)
rewrite !ltn_neqAle [_ == m]eq_sym; case: ltnP => [mn|].
(* Goal: forall _ : is_true (leq m n), compare_nat m n true (leq n m) (andb (negb (@eq_op nat_eqType m n)) true) (andb (negb (@eq_op nat_eqType m n)) (leq n m)) (@eq_op nat_eqType m n) (@eq_op nat_eqType m n) *)
(* Goal: compare_nat m n false (leq n m) (andb (negb (@eq_op nat_eqType m n)) false) (andb (negb (@eq_op nat_eqType m n)) (leq n m)) (@eq_op nat_eqType m n) (@eq_op nat_eqType m n) *)
by rewrite ltnW // gtn_eqF //; constructor.
(* Goal: forall _ : is_true (leq m n), compare_nat m n true (leq n m) (andb (negb (@eq_op nat_eqType m n)) true) (andb (negb (@eq_op nat_eqType m n)) (leq n m)) (@eq_op nat_eqType m n) (@eq_op nat_eqType m n) *)
rewrite leq_eqVlt; case: ltnP; rewrite ?(orbT, orbF) => //= lt_nm eq_mn.
(* Goal: compare_nat m n true true (andb (negb (@eq_op nat_eqType m n)) true) (andb (negb (@eq_op nat_eqType m n)) true) (@eq_op nat_eqType m n) (@eq_op nat_eqType m n) *)
(* Goal: compare_nat m n true false (andb (negb (@eq_op nat_eqType m n)) true) (andb (negb (@eq_op nat_eqType m n)) false) (@eq_op nat_eqType m n) (@eq_op nat_eqType m n) *)
by rewrite ltn_eqF //; constructor.
(* Goal: compare_nat m n true true (andb (negb (@eq_op nat_eqType m n)) true) (andb (negb (@eq_op nat_eqType m n)) true) (@eq_op nat_eqType m n) (@eq_op nat_eqType m n) *)
by rewrite eq_mn; constructor; apply/eqP.
Qed.
Lemma leq_add2l p m n : (p + m <= p + n) = (m <= n).
Proof.
(* Goal: @eq bool (leq (addn p m) (addn p n)) (leq m n) *)
by elim: p.
Qed.
Lemma ltn_add2l p m n : (p + m < p + n) = (m < n).
Proof.
(* Goal: @eq bool (leq (S (addn p m)) (addn p n)) (leq (S m) n) *)
by rewrite -addnS; apply: leq_add2l.
Qed.
Lemma leq_add2r p m n : (m + p <= n + p) = (m <= n).
Proof.
(* Goal: @eq bool (leq (addn m p) (addn n p)) (leq m n) *)
by rewrite -!(addnC p); apply: leq_add2l.
Qed.
Lemma ltn_add2r p m n : (m + p < n + p) = (m < n).
Proof.
(* Goal: @eq bool (leq (S (addn m p)) (addn n p)) (leq (S m) n) *)
exact: leq_add2r p m.+1 n.
Qed.
Lemma leq_add m1 m2 n1 n2 : m1 <= n1 -> m2 <= n2 -> m1 + m2 <= n1 + n2.
Proof.
(* Goal: forall (_ : is_true (leq m1 n1)) (_ : is_true (leq m2 n2)), is_true (leq (addn m1 m2) (addn n1 n2)) *)
by move=> le_mn1 le_mn2; rewrite (@leq_trans (m1 + n2)) ?leq_add2l ?leq_add2r.
Qed.
Lemma leq_addr m n : n <= n + m.
Proof.
(* Goal: is_true (leq n (addn n m)) *)
by rewrite -{1}[n]addn0 leq_add2l.
Qed.
Lemma leq_addl m n : n <= m + n.
Proof.
(* Goal: is_true (leq n (addn m n)) *)
by rewrite addnC leq_addr.
Qed.
Lemma ltn_addr m n p : m < n -> m < n + p.
Proof.
(* Goal: forall _ : is_true (leq (S m) n), is_true (leq (S m) (addn n p)) *)
by move/leq_trans=> -> //; apply: leq_addr.
Qed.
Lemma ltn_addl m n p : m < n -> m < p + n.
Proof.
(* Goal: forall _ : is_true (leq (S m) n), is_true (leq (S m) (addn p n)) *)
by move/leq_trans=> -> //; apply: leq_addl.
Qed.
Lemma addn_gt0 m n : (0 < m + n) = (0 < m) || (0 < n).
Proof.
(* Goal: @eq bool (leq (S O) (addn m n)) (orb (leq (S O) m) (leq (S O) n)) *)
by rewrite !lt0n -negb_and addn_eq0.
Qed.
Lemma subn_gt0 m n : (0 < n - m) = (m < n).
Proof.
(* Goal: @eq bool (leq (S O) (subn n m)) (leq (S m) n) *)
by elim: m n => [|m IHm] [|n] //; apply: IHm n.
Qed.
Lemma subn_eq0 m n : (m - n == 0) = (m <= n).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (subn m n) O) (leq m n) *)
by [].
Qed.
Lemma leq_subLR m n p : (m - n <= p) = (m <= n + p).
Proof.
(* Goal: @eq bool (leq (subn m n) p) (leq m (addn n p)) *)
by rewrite -subn_eq0 -subnDA.
Qed.
Lemma leq_subr m n : n - m <= n.
Proof.
(* Goal: is_true (leq (subn n m) n) *)
by rewrite leq_subLR leq_addl.
Qed.
Lemma subnKC m n : m <= n -> m + (n - m) = n.
Proof.
(* Goal: forall _ : is_true (leq m n), @eq nat (addn m (subn n m)) n *)
by elim: m n => [|m IHm] [|n] // /(IHm n) {2}<-.
Qed.
Lemma subnK m n : m <= n -> (n - m) + m = n.
Proof.
(* Goal: forall _ : is_true (leq m n), @eq nat (addn (subn n m) m) n *)
by rewrite addnC; apply: subnKC.
Qed.
Lemma addnBA m n p : p <= n -> m + (n - p) = m + n - p.
Proof.
(* Goal: forall _ : is_true (leq p n), @eq nat (addn m (subn n p)) (subn (addn m n) p) *)
by move=> le_pn; rewrite -{2}(subnK le_pn) addnA addnK.
Qed.
Lemma addnBAC m n p : n <= m -> m - n + p = m + p - n.
Proof.
(* Goal: forall _ : is_true (leq n m), @eq nat (addn (subn m n) p) (subn (addn m p) n) *)
by move=> le_nm; rewrite addnC addnBA // addnC.
Qed.
Lemma addnBCA m n p : p <= m -> p <= n -> m + (n - p) = n + (m - p).
Proof.
(* Goal: forall (_ : is_true (leq p m)) (_ : is_true (leq p n)), @eq nat (addn m (subn n p)) (addn n (subn m p)) *)
by move=> le_pm le_pn; rewrite !addnBA // addnC.
Qed.
Lemma addnABC m n p : p <= m -> p <= n -> m + (n - p) = m - p + n.
Proof.
(* Goal: forall (_ : is_true (leq p m)) (_ : is_true (leq p n)), @eq nat (addn m (subn n p)) (addn (subn m p) n) *)
by move=> le_pm le_pn; rewrite addnBA // addnBAC.
Qed.
Lemma subnBA m n p : p <= n -> m - (n - p) = m + p - n.
Proof.
(* Goal: forall _ : is_true (leq p n), @eq nat (subn m (subn n p)) (subn (addn m p) n) *)
by move=> le_pn; rewrite -{2}(subnK le_pn) subnDr.
Qed.
Lemma subKn m n : m <= n -> n - (n - m) = m.
Proof.
(* Goal: forall _ : is_true (leq m n), @eq nat (subn n (subn n m)) m *)
by move/subnBA->; rewrite addKn.
Qed.
Lemma subSn m n : m <= n -> n.+1 - m = (n - m).+1.
Proof.
(* Goal: forall _ : is_true (leq m n), @eq nat (subn (S n) m) (S (subn n m)) *)
by rewrite -add1n => /addnBA <-.
Qed.
Lemma subnSK m n : m < n -> (n - m.+1).+1 = n - m.
Proof.
(* Goal: forall _ : is_true (leq (S m) n), @eq nat (S (subn n (S m))) (subn n m) *)
by move/subSn.
Qed.
Lemma leq_sub2r p m n : m <= n -> m - p <= n - p.
Proof.
(* Goal: forall _ : is_true (leq m n), is_true (leq (subn m p) (subn n p)) *)
by move=> le_mn; rewrite leq_subLR (leq_trans le_mn) // -leq_subLR.
Qed.
Lemma leq_sub2l p m n : m <= n -> p - n <= p - m.
Proof.
(* Goal: forall _ : is_true (leq m n), is_true (leq (subn p n) (subn p m)) *)
rewrite -(leq_add2r (p - m)) leq_subLR.
(* Goal: forall _ : is_true (leq (addn m (subn p m)) (addn n (subn p m))), is_true (leq p (addn n (subn p m))) *)
by apply: leq_trans; rewrite -leq_subLR.
Qed.
Lemma leq_sub m1 m2 n1 n2 : m1 <= m2 -> n2 <= n1 -> m1 - n1 <= m2 - n2.
Proof.
(* Goal: forall (_ : is_true (leq m1 m2)) (_ : is_true (leq n2 n1)), is_true (leq (subn m1 n1) (subn m2 n2)) *)
by move/(leq_sub2r n1)=> le_m12 /(leq_sub2l m2); apply: leq_trans.
Qed.
Lemma ltn_sub2r p m n : p < n -> m < n -> m - p < n - p.
Proof.
(* Goal: forall (_ : is_true (leq (S p) n)) (_ : is_true (leq (S m) n)), is_true (leq (S (subn m p)) (subn n p)) *)
by move/subnSK <-; apply: (@leq_sub2r p.+1).
Qed.
Lemma ltn_sub2l p m n : m < p -> m < n -> p - n < p - m.
Proof.
(* Goal: forall (_ : is_true (leq (S m) p)) (_ : is_true (leq (S m) n)), is_true (leq (S (subn p n)) (subn p m)) *)
by move/subnSK <-; apply: leq_sub2l.
Qed.
Lemma ltn_subRL m n p : (n < p - m) = (m + n < p).
Proof.
(* Goal: @eq bool (leq (S n) (subn p m)) (leq (S (addn m n)) p) *)
by rewrite !ltnNge leq_subLR.
Qed.
Lemma subn_if_gt T m n F (E : T) :
(if m.+1 - n is m'.+1 then F m' else E) = (if n <= m then F (m - n) else E).
Proof.
(* Goal: @eq T match subn (S m) n with | O => E | S m' => F m' end (if leq n m then F (subn m n) else E) *)
by case: leqP => [le_nm | /eqnP-> //]; rewrite -{1}(subnK le_nm) -addSn addnK.
Qed.
Definition maxn m n := if m < n then n else m.
Definition minn m n := if m < n then m else n.
Lemma max0n : left_id 0 maxn. Proof. by case. Qed.
Proof.
(* Goal: @left_id nat nat O maxn *)
by case.
Qed.
Lemma maxnC : commutative maxn.
Proof.
(* Goal: @commutative nat nat maxn *)
by move=> m n; rewrite /maxn; case ltngtP.
Qed.
Lemma maxnE m n : maxn m n = m + (n - m).
Proof.
(* Goal: @eq nat (maxn m n) (addn m (subn n m)) *)
by rewrite /maxn addnC; case: leqP => [/eqnP->|/ltnW/subnK].
Qed.
Lemma maxnAC : right_commutative maxn.
Proof.
(* Goal: @right_commutative nat nat maxn *)
by move=> m n p; rewrite !maxnE -!addnA !subnDA -!maxnE maxnC.
Qed.
Lemma maxnA : associative maxn.
Proof.
(* Goal: @associative nat maxn *)
by move=> m n p; rewrite !(maxnC m) maxnAC.
Qed.
Lemma maxnCA : left_commutative maxn.
Proof.
(* Goal: @left_commutative nat nat maxn *)
by move=> m n p; rewrite !maxnA (maxnC m).
Qed.
Lemma maxnACA : interchange maxn maxn.
Proof.
(* Goal: @interchange nat maxn maxn *)
by move=> m n p q; rewrite -!maxnA (maxnCA n).
Qed.
Lemma maxn_idPl {m n} : reflect (maxn m n = m) (m >= n).
Proof.
(* Goal: Bool.reflect (@eq nat (maxn m n) m) (leq n m) *)
by rewrite -subn_eq0 -(eqn_add2l m) addn0 -maxnE; apply: eqP.
Qed.
Lemma maxn_idPr {m n} : reflect (maxn m n = n) (m <= n).
Proof.
(* Goal: Bool.reflect (@eq nat (maxn m n) n) (leq m n) *)
by rewrite maxnC; apply: maxn_idPl.
Qed.
Lemma maxnn : idempotent maxn.
Proof.
(* Goal: @idempotent nat maxn *)
by move=> n; apply/maxn_idPl.
Qed.
Lemma leq_max m n1 n2 : (m <= maxn n1 n2) = (m <= n1) || (m <= n2).
Proof.
(* Goal: @eq bool (leq m (maxn n1 n2)) (orb (leq m n1) (leq m n2)) *)
without loss le_n21: n1 n2 / n2 <= n1.
(* Goal: @eq bool (leq m (maxn n1 n2)) (orb (leq m n1) (leq m n2)) *)
(* Goal: forall _ : forall (n1 n2 : nat) (_ : is_true (leq n2 n1)), @eq bool (leq m (maxn n1 n2)) (orb (leq m n1) (leq m n2)), @eq bool (leq m (maxn n1 n2)) (orb (leq m n1) (leq m n2)) *)
by case/orP: (leq_total n2 n1) => le_n12; last rewrite maxnC orbC; apply.
(* Goal: @eq bool (leq m (maxn n1 n2)) (orb (leq m n1) (leq m n2)) *)
by rewrite (maxn_idPl le_n21) orb_idr // => /leq_trans->.
Qed.
Lemma leq_maxl m n : m <= maxn m n. Proof. by rewrite leq_max leqnn. Qed.
Proof.
(* Goal: is_true (leq m (maxn m n)) *)
by rewrite leq_max leqnn.
Qed.
Lemma gtn_max m n1 n2 : (m > maxn n1 n2) = (m > n1) && (m > n2).
Proof.
(* Goal: @eq bool (leq (S (maxn n1 n2)) m) (andb (leq (S n1) m) (leq (S n2) m)) *)
by rewrite !ltnNge leq_max negb_or.
Qed.
Lemma geq_max m n1 n2 : (m >= maxn n1 n2) = (m >= n1) && (m >= n2).
Proof.
(* Goal: @eq bool (leq (maxn n1 n2) m) (andb (leq n1 m) (leq n2 m)) *)
by rewrite -ltnS gtn_max.
Qed.
Lemma maxnSS m n : maxn m.+1 n.+1 = (maxn m n).+1.
Proof.
(* Goal: @eq nat (maxn (S m) (S n)) (S (maxn m n)) *)
by rewrite !maxnE.
Qed.
Lemma addn_maxl : left_distributive addn maxn.
Proof.
(* Goal: @left_distributive nat nat addn maxn *)
by move=> m1 m2 n; rewrite !maxnE subnDr addnAC.
Qed.
Lemma addn_maxr : right_distributive addn maxn.
Proof.
(* Goal: @right_distributive nat nat addn maxn *)
by move=> m n1 n2; rewrite !(addnC m) addn_maxl.
Qed.
Lemma min0n : left_zero 0 minn. Proof. by case. Qed.
Proof.
(* Goal: @left_zero nat nat O minn *)
by case.
Qed.
Lemma minnC : commutative minn.
Proof.
(* Goal: @commutative nat nat minn *)
by move=> m n; rewrite /minn; case ltngtP.
Qed.
Lemma addn_min_max m n : minn m n + maxn m n = m + n.
Proof.
(* Goal: @eq nat (addn (minn m n) (maxn m n)) (addn m n) *)
by rewrite /minn /maxn; case: ltngtP => // [_|->] //; apply: addnC.
Qed.
Lemma minnE m n : minn m n = m - (m - n).
Proof.
(* Goal: @eq nat (minn m n) (subn m (subn m n)) *)
by rewrite -(subnDl n) -maxnE -addn_min_max addnK minnC.
Qed.
Lemma minnAC : right_commutative minn.
Proof.
(* Goal: @right_commutative nat nat minn *)
by move=> m n p; rewrite !minnE -subnDA subnAC -maxnE maxnC maxnE subnAC subnDA.
Qed.
Lemma minnA : associative minn.
Proof.
(* Goal: @associative nat minn *)
by move=> m n p; rewrite minnC minnAC (minnC n).
Qed.
Lemma minnCA : left_commutative minn.
Proof.
(* Goal: @left_commutative nat nat minn *)
by move=> m n p; rewrite !minnA (minnC n).
Qed.
Lemma minnACA : interchange minn minn.
Proof.
(* Goal: @interchange nat minn minn *)
by move=> m n p q; rewrite -!minnA (minnCA n).
Qed.
Lemma minn_idPl {m n} : reflect (minn m n = m) (m <= n).
Proof.
(* Goal: Bool.reflect (@eq nat (minn m n) m) (leq m n) *)
rewrite (sameP maxn_idPr eqP) -(eqn_add2l m) eq_sym -addn_min_max eqn_add2r.
(* Goal: Bool.reflect (@eq nat (minn m n) m) (@eq_op nat_eqType (minn m n) m) *)
exact: eqP.
Qed.
Lemma minn_idPr {m n} : reflect (minn m n = n) (m >= n).
Proof.
(* Goal: Bool.reflect (@eq nat (minn m n) n) (leq n m) *)
by rewrite minnC; apply: minn_idPl.
Qed.
Lemma minnn : idempotent minn.
Proof.
(* Goal: @idempotent nat minn *)
by move=> n; apply/minn_idPl.
Qed.
Lemma leq_min m n1 n2 : (m <= minn n1 n2) = (m <= n1) && (m <= n2).
Proof.
(* Goal: @eq bool (leq m (minn n1 n2)) (andb (leq m n1) (leq m n2)) *)
wlog le_n21: n1 n2 / n2 <= n1.
(* Goal: @eq bool (leq m (minn n1 n2)) (andb (leq m n1) (leq m n2)) *)
(* Goal: forall _ : forall (n1 n2 : nat) (_ : is_true (leq n2 n1)), @eq bool (leq m (minn n1 n2)) (andb (leq m n1) (leq m n2)), @eq bool (leq m (minn n1 n2)) (andb (leq m n1) (leq m n2)) *)
by case/orP: (leq_total n2 n1) => ?; last rewrite minnC andbC; auto.
(* Goal: @eq bool (leq m (minn n1 n2)) (andb (leq m n1) (leq m n2)) *)
by rewrite /minn ltnNge le_n21 /= andbC; case: leqP => // /leq_trans->.
Qed.
Lemma gtn_min m n1 n2 : (m > minn n1 n2) = (m > n1) || (m > n2).
Proof.
(* Goal: @eq bool (leq (S (minn n1 n2)) m) (orb (leq (S n1) m) (leq (S n2) m)) *)
by rewrite !ltnNge leq_min negb_and.
Qed.
Lemma geq_min m n1 n2 : (m >= minn n1 n2) = (m >= n1) || (m >= n2).
Proof.
(* Goal: @eq bool (leq (minn n1 n2) m) (orb (leq n1 m) (leq n2 m)) *)
by rewrite -ltnS gtn_min.
Qed.
Lemma geq_minl m n : minn m n <= m. Proof. by rewrite geq_min leqnn. Qed.
Proof.
(* Goal: is_true (leq (minn m n) m) *)
by rewrite geq_min leqnn.
Qed.
Lemma addn_minr : right_distributive addn minn.
Proof.
(* Goal: @right_distributive nat nat addn minn *)
by move=> m1 m2 n; rewrite !minnE subnDl addnBA ?leq_subr.
Qed.
Lemma addn_minl : left_distributive addn minn.
Proof.
(* Goal: @left_distributive nat nat addn minn *)
by move=> m1 m2 n; rewrite -!(addnC n) addn_minr.
Qed.
Lemma minnSS m n : minn m.+1 n.+1 = (minn m n).+1.
Proof.
(* Goal: @eq nat (minn (S m) (S n)) (S (minn m n)) *)
by rewrite -(addn_minr 1).
Qed.
Lemma maxnK m n : minn (maxn m n) m = m.
Proof.
(* Goal: @eq nat (minn (maxn m n) m) m *)
exact/minn_idPr/leq_maxl.
Qed.
Lemma maxKn m n : minn n (maxn m n) = n.
Proof.
(* Goal: @eq nat (minn n (maxn m n)) n *)
exact/minn_idPl/leq_maxr.
Qed.
Lemma minnK m n : maxn (minn m n) m = m.
Proof.
(* Goal: @eq nat (maxn (minn m n) m) m *)
exact/maxn_idPr/geq_minl.
Qed.
Lemma minKn m n : maxn n (minn m n) = n.
Proof.
(* Goal: @eq nat (maxn n (minn m n)) n *)
exact/maxn_idPl/geq_minr.
Qed.
Lemma maxn_minl : left_distributive maxn minn.
Lemma maxn_minr : right_distributive maxn minn.
Proof.
(* Goal: @right_distributive nat nat maxn minn *)
by move=> m n1 n2; rewrite !(maxnC m) maxn_minl.
Qed.
Lemma minn_maxl : left_distributive minn maxn.
Proof.
(* Goal: @left_distributive nat nat minn maxn *)
by move=> m1 m2 n; rewrite maxn_minr !maxn_minl -minnA maxnn (maxnC _ n) !maxnK.
Qed.
Lemma minn_maxr : right_distributive minn maxn.
Proof.
(* Goal: @right_distributive nat nat minn maxn *)
by move=> m n1 n2; rewrite !(minnC m) minn_maxl.
Qed.
Section ExMinn.
Variable P : pred nat.
Hypothesis exP : exists n, P n.
Inductive acc_nat i : Prop := AccNat0 of P i | AccNatS of acc_nat i.+1.
Lemma find_ex_minn : {m | P m & forall n, P n -> n >= m}.
Proof.
(* Goal: @sig2 nat (fun m : nat => is_true (P m)) (fun m : nat => forall (n : nat) (_ : is_true (P n)), is_true (leq m n)) *)
have: forall n, P n -> n >= 0 by [].
(* Goal: forall _ : forall (n : nat) (_ : is_true (P n)), is_true (leq O n), @sig2 nat (fun m : nat => is_true (P m)) (fun m : nat => forall (n : nat) (_ : is_true (P n)), is_true (leq m n)) *)
have: acc_nat 0.
(* Goal: forall (_ : acc_nat O) (_ : forall (n : nat) (_ : is_true (P n)), is_true (leq O n)), @sig2 nat (fun m : nat => is_true (P m)) (fun m : nat => forall (n : nat) (_ : is_true (P n)), is_true (leq m n)) *)
(* Goal: acc_nat O *)
case exP => n; rewrite -(addn0 n); elim: n 0 => [|n IHn] j; first by left.
(* Goal: forall (_ : acc_nat O) (_ : forall (n : nat) (_ : is_true (P n)), is_true (leq O n)), @sig2 nat (fun m : nat => is_true (P m)) (fun m : nat => forall (n : nat) (_ : is_true (P n)), is_true (leq m n)) *)
(* Goal: forall _ : is_true (P (addn (S n) j)), acc_nat j *)
by rewrite addSnnS; right; apply: IHn.
(* Goal: forall (_ : acc_nat O) (_ : forall (n : nat) (_ : is_true (P n)), is_true (leq O n)), @sig2 nat (fun m : nat => is_true (P m)) (fun m : nat => forall (n : nat) (_ : is_true (P n)), is_true (leq m n)) *)
move: 0; fix find_ex_minn 2 => m IHm m_lb; case Pm: (P m); first by exists m.
(* Goal: @sig2 nat (fun m : nat => is_true (P m)) (fun m : nat => forall (n : nat) (_ : is_true (P n)), is_true (leq m n)) *)
apply: find_ex_minn m.+1 _ _ => [|n Pn]; first by case: IHm; rewrite ?Pm.
(* Goal: is_true (leq (S m) n) *)
by rewrite ltn_neqAle m_lb //; case: eqP Pm => // -> /idP[].
Qed.
Definition ex_minn := s2val find_ex_minn.
Inductive ex_minn_spec : nat -> Type :=
ExMinnSpec m of P m & (forall n, P n -> n >= m) : ex_minn_spec m.
Lemma ex_minnP : ex_minn_spec ex_minn.
Proof.
(* Goal: ex_minn_spec ex_minn *)
by rewrite /ex_minn; case: find_ex_minn.
Qed.
End ExMinn.
Section ExMaxn.
Variables (P : pred nat) (m : nat).
Hypotheses (exP : exists i, P i) (ubP : forall i, P i -> i <= m).
Lemma ex_maxn_subproof : exists i, P (m - i).
Proof.
(* Goal: @ex nat (fun i : nat => is_true (P (subn m i))) *)
by case: exP => i Pi; exists (m - i); rewrite subKn ?ubP.
Qed.
Definition ex_maxn := m - ex_minn ex_maxn_subproof.
Variant ex_maxn_spec : nat -> Type :=
ExMaxnSpec i of P i & (forall j, P j -> j <= i) : ex_maxn_spec i.
Lemma ex_maxnP : ex_maxn_spec ex_maxn.
Proof.
(* Goal: ex_maxn_spec ex_maxn *)
rewrite /ex_maxn; case: ex_minnP => i Pmi min_i; split=> // j Pj.
(* Goal: is_true (leq j (subn m i)) *)
have le_i_mj: i <= m - j by rewrite min_i // subKn // ubP.
(* Goal: is_true (leq j (subn m i)) *)
rewrite -subn_eq0 subnBA ?(leq_trans le_i_mj) ?leq_subr //.
(* Goal: is_true (@eq_op nat_eqType (subn (addn j i) m) O) *)
by rewrite addnC -subnBA ?ubP.
Qed.
End ExMaxn.
Lemma eq_ex_minn P Q exP exQ : P =1 Q -> @ex_minn P exP = @ex_minn Q exQ.
Proof.
(* Goal: forall _ : @eqfun bool nat P Q, @eq nat (@ex_minn P exP) (@ex_minn Q exQ) *)
move=> eqPQ; case: ex_minnP => m1 Pm1 m1_lb; case: ex_minnP => m2 Pm2 m2_lb.
(* Goal: @eq nat m1 m2 *)
by apply/eqP; rewrite eqn_leq m1_lb (m2_lb, eqPQ) // -eqPQ.
Qed.
Lemma eq_ex_maxn (P Q : pred nat) m n exP ubP exQ ubQ :
P =1 Q -> @ex_maxn P m exP ubP = @ex_maxn Q n exQ ubQ.
Proof.
(* Goal: forall _ : @eqfun bool nat P Q, @eq nat (@ex_maxn P m exP ubP) (@ex_maxn Q n exQ ubQ) *)
move=> eqPQ; case: ex_maxnP => i Pi max_i; case: ex_maxnP => j Pj max_j.
(* Goal: @eq nat i j *)
by apply/eqP; rewrite eqn_leq max_i ?eqPQ // max_j -?eqPQ.
Qed.
Section Iteration.
Variable T : Type.
Implicit Types m n : nat.
Implicit Types x y : T.
Definition iter n f x :=
let fix loop m := if m is i.+1 then f (loop i) else x in loop n.
Definition iteri n f x :=
let fix loop m := if m is i.+1 then f i (loop i) else x in loop n.
Definition iterop n op x :=
let f i y := if i is 0 then x else op x y in iteri n f.
Lemma iterSr n f x : iter n.+1 f x = iter n f (f x).
Proof.
(* Goal: @eq T (iter (S n) f x) (iter n f (f x)) *)
by elim: n => //= n <-.
Qed.
Lemma iter_add n m f x : iter (n + m) f x = iter n f (iter m f x).
Proof.
(* Goal: @eq T (iter (addn n m) f x) (iter n f (iter m f x)) *)
by elim: n => //= n ->.
Qed.
Lemma iteriS n f x : iteri n.+1 f x = f n (iteri n f x).
Proof.
(* Goal: @eq T (iteri (S n) f x) (f n (iteri n f x)) *)
by [].
Qed.
Lemma iteropS idx n op x : iterop n.+1 op x idx = iter n (op x) x.
Proof.
(* Goal: @eq T (iterop (S n) op x idx) (iter n (op x) x) *)
by elim: n => //= n ->.
Qed.
Lemma eq_iter f f' : f =1 f' -> forall n, iter n f =1 iter n f'.
Proof.
(* Goal: forall (_ : @eqfun T T f f') (n : nat), @eqfun T T (iter n f) (iter n f') *)
by move=> eq_f n x; elim: n => //= n ->; rewrite eq_f.
Qed.
Lemma eq_iteri f f' : f =2 f' -> forall n, iteri n f =1 iteri n f'.
Proof.
(* Goal: forall (_ : @eqrel T T nat f f') (n : nat), @eqfun T T (iteri n f) (iteri n f') *)
by move=> eq_f n x; elim: n => //= n ->; rewrite eq_f.
Qed.
Lemma eq_iterop n op op' : op =2 op' -> iterop n op =2 iterop n op'.
Proof.
(* Goal: forall _ : @eqrel T T T op op', @eqrel T T T (iterop n op) (iterop n op') *)
by move=> eq_op x; apply: eq_iteri; case.
Qed.
End Iteration.
Lemma iter_succn m n : iter n succn m = m + n.
Proof.
(* Goal: @eq nat (@iter nat n S m) (addn m n) *)
by elim: n => //= n ->.
Qed.
Lemma iter_succn_0 n : iter n succn 0 = n.
Proof.
(* Goal: @eq nat (@iter nat n S O) n *)
exact: iter_succn.
Qed.
Lemma iter_predn m n : iter n predn m = m - n.
Proof.
(* Goal: @eq nat (@iter nat n Nat.pred m) (subn m n) *)
by elim: n m => /= [|n IHn] m; rewrite ?subn0 // IHn subnS.
Qed.
Definition muln_rec := mult.
Notation "m * n" := (muln_rec m n) : nat_rec_scope.
Definition muln := nosimpl muln_rec.
Lemma mulnE : muln = muln_rec. Proof. by []. Qed.
Proof.
(* Goal: @eq (forall (_ : nat) (_ : nat), nat) muln muln_rec *)
by [].
Qed.
Lemma muln0 : right_zero 0 muln. Proof. by elim. Qed.
Proof.
(* Goal: @right_zero nat nat O muln *)
by elim.
Qed.
Lemma mulSn m n : m.+1 * n = n + m * n. Proof. by []. Qed.
Proof.
(* Goal: @eq nat (muln (S m) n) (addn n (muln m n)) *)
by [].
Qed.
Lemma mulnS m n : m * n.+1 = m + m * n.
Proof.
(* Goal: @eq nat (muln m (S n)) (addn m (muln m n)) *)
by elim: m => // m; rewrite !mulSn !addSn addnCA => ->.
Qed.
Lemma mulnSr m n : m * n.+1 = m * n + m.
Proof.
(* Goal: @eq nat (muln m (S n)) (addn (muln m n) m) *)
by rewrite addnC mulnS.
Qed.
Lemma iter_addn m n p : iter n (addn m) p = m * n + p.
Proof.
(* Goal: @eq nat (@iter nat n (addn m) p) (addn (muln m n) p) *)
by elim: n => /= [|n ->]; rewrite ?muln0 // mulnS addnA.
Qed.
Lemma iter_addn_0 m n : iter n (addn m) 0 = m * n.
Proof.
(* Goal: @eq nat (@iter nat n (addn m) O) (muln m n) *)
by rewrite iter_addn addn0.
Qed.
Lemma muln1 : right_id 1 muln.
Proof.
(* Goal: @right_id nat nat (S O) muln *)
by move=> n; rewrite mulnSr muln0.
Qed.
Lemma mulnC : commutative muln.
Proof.
(* Goal: @commutative nat nat muln *)
by move=> m n; elim: m => [|m]; rewrite (muln0, mulnS) // mulSn => ->.
Qed.
Lemma mulnDl : left_distributive muln addn.
Proof.
(* Goal: @left_distributive nat nat muln addn *)
by move=> m1 m2 n; elim: m1 => //= m1 IHm; rewrite -addnA -IHm.
Qed.
Lemma mulnDr : right_distributive muln addn.
Proof.
(* Goal: @right_distributive nat nat muln addn *)
by move=> m n1 n2; rewrite !(mulnC m) mulnDl.
Qed.
Lemma mulnBl : left_distributive muln subn.
Proof.
(* Goal: @left_distributive nat nat muln subn *)
move=> m n [|p]; first by rewrite !muln0.
(* Goal: @eq nat (muln (subn m n) (S p)) (subn (muln m (S p)) (muln n (S p))) *)
by elim: m n => // [m IHm] [|n] //; rewrite mulSn subnDl -IHm.
Qed.
Lemma mulnBr : right_distributive muln subn.
Proof.
(* Goal: @right_distributive nat nat muln subn *)
by move=> m n p; rewrite !(mulnC m) mulnBl.
Qed.
Lemma mulnA : associative muln.
Proof.
(* Goal: @associative nat muln *)
by move=> m n p; elim: m => //= m; rewrite mulSn mulnDl => ->.
Qed.
Lemma mulnCA : left_commutative muln.
Proof.
(* Goal: @left_commutative nat nat muln *)
by move=> m n1 n2; rewrite !mulnA (mulnC m).
Qed.
Lemma mulnAC : right_commutative muln.
Proof.
(* Goal: @right_commutative nat nat muln *)
by move=> m n p; rewrite -!mulnA (mulnC n).
Qed.
Lemma mulnACA : interchange muln muln.
Proof.
(* Goal: @interchange nat muln muln *)
by move=> m n p q; rewrite -!mulnA (mulnCA n).
Qed.
Lemma muln_eq0 m n : (m * n == 0) = (m == 0) || (n == 0).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (muln m n) O) (orb (@eq_op nat_eqType m O) (@eq_op nat_eqType n O)) *)
by case: m n => // m [|n] //=; rewrite muln0.
Qed.
Lemma muln_eq1 m n : (m * n == 1) = (m == 1) && (n == 1).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (muln m n) (S O)) (andb (@eq_op nat_eqType m (S O)) (@eq_op nat_eqType n (S O))) *)
by case: m n => [|[|m]] [|[|n]] //; rewrite muln0.
Qed.
Lemma muln_gt0 m n : (0 < m * n) = (0 < m) && (0 < n).
Proof.
(* Goal: @eq bool (leq (S O) (muln m n)) (andb (leq (S O) m) (leq (S O) n)) *)
by case: m n => // m [|n] //=; rewrite muln0.
Qed.
Lemma leq_pmull m n : n > 0 -> m <= n * m.
Proof.
(* Goal: forall _ : is_true (leq (S O) n), is_true (leq m (muln n m)) *)
by move/prednK <-; apply: leq_addr.
Qed.
Lemma leq_pmulr m n : n > 0 -> m <= m * n.
Proof.
(* Goal: forall _ : is_true (leq (S O) n), is_true (leq m (muln m n)) *)
by move/leq_pmull; rewrite mulnC.
Qed.
Lemma leq_mul2l m n1 n2 : (m * n1 <= m * n2) = (m == 0) || (n1 <= n2).
Proof.
(* Goal: @eq bool (leq (muln m n1) (muln m n2)) (orb (@eq_op nat_eqType m O) (leq n1 n2)) *)
by rewrite {1}/leq -mulnBr muln_eq0.
Qed.
Lemma leq_mul2r m n1 n2 : (n1 * m <= n2 * m) = (m == 0) || (n1 <= n2).
Proof.
(* Goal: @eq bool (leq (muln n1 m) (muln n2 m)) (orb (@eq_op nat_eqType m O) (leq n1 n2)) *)
by rewrite -!(mulnC m) leq_mul2l.
Qed.
Lemma leq_mul m1 m2 n1 n2 : m1 <= n1 -> m2 <= n2 -> m1 * m2 <= n1 * n2.
Proof.
(* Goal: forall (_ : is_true (leq m1 n1)) (_ : is_true (leq m2 n2)), is_true (leq (muln m1 m2) (muln n1 n2)) *)
move=> le_mn1 le_mn2; apply (@leq_trans (m1 * n2)).
(* Goal: is_true (leq (muln m1 n2) (muln n1 n2)) *)
(* Goal: is_true (leq (muln m1 m2) (muln m1 n2)) *)
by rewrite leq_mul2l le_mn2 orbT.
(* Goal: is_true (leq (muln m1 n2) (muln n1 n2)) *)
by rewrite leq_mul2r le_mn1 orbT.
Qed.
Lemma eqn_mul2l m n1 n2 : (m * n1 == m * n2) = (m == 0) || (n1 == n2).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (muln m n1) (muln m n2)) (orb (@eq_op nat_eqType m O) (@eq_op nat_eqType n1 n2)) *)
by rewrite eqn_leq !leq_mul2l -orb_andr -eqn_leq.
Qed.
Lemma eqn_mul2r m n1 n2 : (n1 * m == n2 * m) = (m == 0) || (n1 == n2).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (muln n1 m) (muln n2 m)) (orb (@eq_op nat_eqType m O) (@eq_op nat_eqType n1 n2)) *)
by rewrite eqn_leq !leq_mul2r -orb_andr -eqn_leq.
Qed.
Lemma leq_pmul2l m n1 n2 : 0 < m -> (m * n1 <= m * n2) = (n1 <= n2).
Proof.
(* Goal: forall _ : is_true (leq (S O) m), @eq bool (leq (muln m n1) (muln m n2)) (leq n1 n2) *)
by move/prednK=> <-; rewrite leq_mul2l.
Qed.
Arguments leq_pmul2l [m n1 n2].
Lemma leq_pmul2r m n1 n2 : 0 < m -> (n1 * m <= n2 * m) = (n1 <= n2).
Proof.
(* Goal: forall _ : is_true (leq (S O) m), @eq bool (leq (muln n1 m) (muln n2 m)) (leq n1 n2) *)
by move/prednK <-; rewrite leq_mul2r.
Qed.
Arguments leq_pmul2r [m n1 n2].
Lemma eqn_pmul2l m n1 n2 : 0 < m -> (m * n1 == m * n2) = (n1 == n2).
Proof.
(* Goal: forall _ : is_true (leq (S O) m), @eq bool (@eq_op nat_eqType (muln m n1) (muln m n2)) (@eq_op nat_eqType n1 n2) *)
by move/prednK <-; rewrite eqn_mul2l.
Qed.
Arguments eqn_pmul2l [m n1 n2].
Lemma eqn_pmul2r m n1 n2 : 0 < m -> (n1 * m == n2 * m) = (n1 == n2).
Proof.
(* Goal: forall _ : is_true (leq (S O) m), @eq bool (@eq_op nat_eqType (muln n1 m) (muln n2 m)) (@eq_op nat_eqType n1 n2) *)
by move/prednK <-; rewrite eqn_mul2r.
Qed.
Arguments eqn_pmul2r [m n1 n2].
Lemma ltn_mul2l m n1 n2 : (m * n1 < m * n2) = (0 < m) && (n1 < n2).
Proof.
(* Goal: @eq bool (leq (S (muln m n1)) (muln m n2)) (andb (leq (S O) m) (leq (S n1) n2)) *)
by rewrite lt0n !ltnNge leq_mul2l negb_or.
Qed.
Lemma ltn_mul2r m n1 n2 : (n1 * m < n2 * m) = (0 < m) && (n1 < n2).
Proof.
(* Goal: @eq bool (leq (S (muln n1 m)) (muln n2 m)) (andb (leq (S O) m) (leq (S n1) n2)) *)
by rewrite lt0n !ltnNge leq_mul2r negb_or.
Qed.
Lemma ltn_pmul2l m n1 n2 : 0 < m -> (m * n1 < m * n2) = (n1 < n2).
Proof.
(* Goal: forall _ : is_true (leq (S O) m), @eq bool (leq (S (muln m n1)) (muln m n2)) (leq (S n1) n2) *)
by move/prednK <-; rewrite ltn_mul2l.
Qed.
Arguments ltn_pmul2l [m n1 n2].
Lemma ltn_pmul2r m n1 n2 : 0 < m -> (n1 * m < n2 * m) = (n1 < n2).
Proof.
(* Goal: forall _ : is_true (leq (S O) m), @eq bool (leq (S (muln n1 m)) (muln n2 m)) (leq (S n1) n2) *)
by move/prednK <-; rewrite ltn_mul2r.
Qed.
Arguments ltn_pmul2r [m n1 n2].
Lemma ltn_Pmull m n : 1 < n -> 0 < m -> m < n * m.
Proof.
(* Goal: forall (_ : is_true (leq (S (S O)) n)) (_ : is_true (leq (S O) m)), is_true (leq (S m) (muln n m)) *)
by move=> lt1n m_gt0; rewrite -{1}[m]mul1n ltn_pmul2r.
Qed.
Lemma ltn_Pmulr m n : 1 < n -> 0 < m -> m < m * n.
Proof.
(* Goal: forall (_ : is_true (leq (S (S O)) n)) (_ : is_true (leq (S O) m)), is_true (leq (S m) (muln m n)) *)
by move=> lt1n m_gt0; rewrite mulnC ltn_Pmull.
Qed.
Lemma ltn_mul m1 m2 n1 n2 : m1 < n1 -> m2 < n2 -> m1 * m2 < n1 * n2.
Proof.
(* Goal: forall (_ : is_true (leq (S m1) n1)) (_ : is_true (leq (S m2) n2)), is_true (leq (S (muln m1 m2)) (muln n1 n2)) *)
move=> lt_mn1 lt_mn2; apply (@leq_ltn_trans (m1 * n2)).
(* Goal: is_true (leq (S (muln m1 n2)) (muln n1 n2)) *)
(* Goal: is_true (leq (muln m1 m2) (muln m1 n2)) *)
by rewrite leq_mul2l orbC ltnW.
(* Goal: is_true (leq (S (muln m1 n2)) (muln n1 n2)) *)
by rewrite ltn_pmul2r // (leq_trans _ lt_mn2).
Qed.
Lemma maxn_mulr : right_distributive muln maxn.
Proof.
(* Goal: @right_distributive nat nat muln maxn *)
by case=> // m n1 n2; rewrite /maxn (fun_if (muln _)) ltn_pmul2l.
Qed.
Lemma maxn_mull : left_distributive muln maxn.
Proof.
(* Goal: @left_distributive nat nat muln maxn *)
by move=> m1 m2 n; rewrite -!(mulnC n) maxn_mulr.
Qed.
Lemma minn_mulr : right_distributive muln minn.
Proof.
(* Goal: @right_distributive nat nat muln minn *)
by case=> // m n1 n2; rewrite /minn (fun_if (muln _)) ltn_pmul2l.
Qed.
Lemma minn_mull : left_distributive muln minn.
Proof.
(* Goal: @left_distributive nat nat muln minn *)
by move=> m1 m2 n; rewrite -!(mulnC n) minn_mulr.
Qed.
Definition expn_rec m n := iterop n muln m 1.
Notation "m ^ n" := (expn_rec m n) : nat_rec_scope.
Definition expn := nosimpl expn_rec.
Lemma expn0 m : m ^ 0 = 1. Proof. by []. Qed.
Proof.
(* Goal: @eq nat (expn m O) (S O) *)
by [].
Qed.
Lemma expnS m n : m ^ n.+1 = m * m ^ n. Proof. by case: n; rewrite ?muln1. Qed.
Proof.
(* Goal: @eq nat (expn m (S n)) (muln m (expn m n)) *)
by case: n; rewrite ?muln1.
Qed.
Lemma iter_muln m n p : iter n (muln m) p = m ^ n * p.
Proof.
(* Goal: @eq nat (@iter nat n (muln m) p) (muln (expn m n) p) *)
by elim: n => /= [|n ->]; rewrite ?mul1n // expnS mulnA.
Qed.
Lemma iter_muln_1 m n : iter n (muln m) 1 = m ^ n.
Proof.
(* Goal: @eq nat (@iter nat n (muln m) (S O)) (expn m n) *)
by rewrite iter_muln muln1.
Qed.
Lemma exp1n n : 1 ^ n = 1.
Proof.
(* Goal: @eq nat (expn (S O) n) (S O) *)
by elim: n => // n; rewrite expnS mul1n.
Qed.
Lemma expnD m n1 n2 : m ^ (n1 + n2) = m ^ n1 * m ^ n2.
Proof.
(* Goal: @eq nat (expn m (addn n1 n2)) (muln (expn m n1) (expn m n2)) *)
by elim: n1 => [|n1 IHn]; rewrite !(mul1n, expnS) // IHn mulnA.
Qed.
Lemma expnMn m1 m2 n : (m1 * m2) ^ n = m1 ^ n * m2 ^ n.
Proof.
(* Goal: @eq nat (expn (muln m1 m2) n) (muln (expn m1 n) (expn m2 n)) *)
by elim: n => // n IHn; rewrite !expnS IHn -!mulnA (mulnCA m2).
Qed.
Lemma expnM m n1 n2 : m ^ (n1 * n2) = (m ^ n1) ^ n2.
Proof.
(* Goal: @eq nat (expn m (muln n1 n2)) (expn (expn m n1) n2) *)
elim: n1 => [|n1 IHn]; first by rewrite exp1n.
(* Goal: @eq nat (expn m (muln (S n1) n2)) (expn (expn m (S n1)) n2) *)
by rewrite expnD expnS expnMn IHn.
Qed.
Lemma expnAC m n1 n2 : (m ^ n1) ^ n2 = (m ^ n2) ^ n1.
Proof.
(* Goal: @eq nat (expn (expn m n1) n2) (expn (expn m n2) n1) *)
by rewrite -!expnM mulnC.
Qed.
Lemma expn_gt0 m n : (0 < m ^ n) = (0 < m) || (n == 0).
Proof.
(* Goal: @eq bool (leq (S O) (expn m n)) (orb (leq (S O) m) (@eq_op nat_eqType n O)) *)
by case: m => [|m]; elim: n => //= n IHn; rewrite expnS // addn_gt0 IHn.
Qed.
Lemma expn_eq0 m e : (m ^ e == 0) = (m == 0) && (e > 0).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (expn m e) O) (andb (@eq_op nat_eqType m O) (leq (S O) e)) *)
by rewrite !eqn0Ngt expn_gt0 negb_or -lt0n.
Qed.
Lemma ltn_expl m n : 1 < m -> n < m ^ n.
Proof.
(* Goal: forall _ : is_true (leq (S (S O)) m), is_true (leq (S n) (expn m n)) *)
move=> m_gt1; elim: n => //= n; rewrite -(leq_pmul2l (ltnW m_gt1)) expnS.
(* Goal: forall _ : is_true (leq (muln m (S n)) (muln m (expn m n))), is_true (leq (S (S n)) (muln m (expn m n))) *)
by apply: leq_trans; apply: ltn_Pmull.
Qed.
Lemma leq_exp2l m n1 n2 : 1 < m -> (m ^ n1 <= m ^ n2) = (n1 <= n2).
Proof.
(* Goal: forall _ : is_true (leq (S (S O)) m), @eq bool (leq (expn m n1) (expn m n2)) (leq n1 n2) *)
move=> m_gt1; elim: n1 n2 => [|n1 IHn] [|n2] //; last 1 first.
(* Goal: @eq bool (leq (expn m (S n1)) (expn m O)) (leq (S n1) O) *)
(* Goal: @eq bool (leq (expn m O) (expn m (S n2))) (leq O (S n2)) *)
(* Goal: @eq bool (leq (expn m (S n1)) (expn m (S n2))) (leq (S n1) (S n2)) *)
-
(* Goal: @eq bool (leq (expn m (S n1)) (expn m O)) (leq (S n1) O) *)
(* Goal: @eq bool (leq (expn m O) (expn m (S n2))) (leq O (S n2)) *)
(* Goal: @eq bool (leq (expn m (S n1)) (expn m (S n2))) (leq (S n1) (S n2)) *)
by rewrite !expnS leq_pmul2l ?IHn // ltnW.
(* Goal: @eq bool (leq (expn m (S n1)) (expn m O)) (leq (S n1) O) *)
(* Goal: @eq bool (leq (expn m O) (expn m (S n2))) (leq O (S n2)) *)
-
(* Goal: @eq bool (leq (expn m (S n1)) (expn m O)) (leq (S n1) O) *)
(* Goal: @eq bool (leq (expn m O) (expn m (S n2))) (leq O (S n2)) *)
by rewrite expn_gt0 ltnW.
(* Goal: @eq bool (leq (expn m (S n1)) (expn m O)) (leq (S n1) O) *)
by rewrite leqNgt (leq_trans m_gt1) // expnS leq_pmulr // expn_gt0 ltnW.
Qed.
Lemma ltn_exp2l m n1 n2 : 1 < m -> (m ^ n1 < m ^ n2) = (n1 < n2).
Proof.
(* Goal: forall _ : is_true (leq (S (S O)) m), @eq bool (leq (S (expn m n1)) (expn m n2)) (leq (S n1) n2) *)
by move=> m_gt1; rewrite !ltnNge leq_exp2l.
Qed.
Lemma eqn_exp2l m n1 n2 : 1 < m -> (m ^ n1 == m ^ n2) = (n1 == n2).
Proof.
(* Goal: forall _ : is_true (leq (S (S O)) m), @eq bool (@eq_op nat_eqType (expn m n1) (expn m n2)) (@eq_op nat_eqType n1 n2) *)
by move=> m_gt1; rewrite !eqn_leq !leq_exp2l.
Qed.
Lemma expnI m : 1 < m -> injective (expn m).
Proof.
(* Goal: forall _ : is_true (leq (S (S O)) m), @injective nat nat (expn m) *)
by move=> m_gt1 e1 e2 /eqP; rewrite eqn_exp2l // => /eqP.
Qed.
Lemma leq_pexp2l m n1 n2 : 0 < m -> n1 <= n2 -> m ^ n1 <= m ^ n2.
Proof.
(* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq n1 n2)), is_true (leq (expn m n1) (expn m n2)) *)
by case: m => [|[|m]] // _; [rewrite !exp1n | rewrite leq_exp2l].
Qed.
Lemma ltn_pexp2l m n1 n2 : 0 < m -> m ^ n1 < m ^ n2 -> n1 < n2.
Proof.
(* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S (expn m n1)) (expn m n2))), is_true (leq (S n1) n2) *)
by case: m => [|[|m]] // _; [rewrite !exp1n | rewrite ltn_exp2l].
Qed.
Lemma ltn_exp2r m n e : e > 0 -> (m ^ e < n ^ e) = (m < n).
Lemma leq_exp2r m n e : e > 0 -> (m ^ e <= n ^ e) = (m <= n).
Proof.
(* Goal: forall _ : is_true (leq (S O) e), @eq bool (leq (expn m e) (expn n e)) (leq m n) *)
by move=> e_gt0; rewrite leqNgt ltn_exp2r // -leqNgt.
Qed.
Lemma eqn_exp2r m n e : e > 0 -> (m ^ e == n ^ e) = (m == n).
Proof.
(* Goal: forall _ : is_true (leq (S O) e), @eq bool (@eq_op nat_eqType (expn m e) (expn n e)) (@eq_op nat_eqType m n) *)
by move=> e_gt0; rewrite !eqn_leq !leq_exp2r.
Qed.
Lemma expIn e : e > 0 -> injective (expn^~ e).
Proof.
(* Goal: forall _ : is_true (leq (S O) e), @injective nat nat (fun x : nat => expn x e) *)
by move=> e_gt1 m n /eqP; rewrite eqn_exp2r // => /eqP.
Qed.
Fixpoint fact_rec n := if n is n'.+1 then n * fact_rec n' else 1.
Definition factorial := nosimpl fact_rec.
Lemma fact0 : 0`! = 1. Proof. by []. Qed.
Proof.
(* Goal: @eq nat (factorial O) (S O) *)
by [].
Qed.
Lemma fact_gt0 n : n`! > 0.
Proof.
(* Goal: is_true (leq (S O) (factorial n)) *)
by elim: n => //= n IHn; rewrite muln_gt0.
Qed.
Coercion nat_of_bool (b : bool) := if b then 1 else 0.
Lemma leq_b1 (b : bool) : b <= 1. Proof. by case: b. Qed.
Proof.
(* Goal: is_true (leq (nat_of_bool b) (S O)) *)
by case: b.
Qed.
Lemma eqb0 (b : bool) : (b == 0 :> nat) = ~~ b. Proof. by case: b. Qed.
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (nat_of_bool b : nat) (O : nat)) (negb b) *)
by case: b.
Qed.
Lemma lt0b (b : bool) : (b > 0) = b. Proof. by case: b. Qed.
Proof.
(* Goal: @eq bool (leq (S O) (nat_of_bool b)) b *)
by case: b.
Qed.
Lemma mulnb (b1 b2 : bool) : b1 * b2 = b1 && b2.
Proof.
(* Goal: @eq nat (muln (nat_of_bool b1) (nat_of_bool b2)) (nat_of_bool (andb b1 b2)) *)
by case: b1; case: b2.
Qed.
Lemma mulnbl (b : bool) n : b * n = (if b then n else 0).
Proof.
(* Goal: @eq nat (muln (nat_of_bool b) n) (if b then n else O) *)
by case: b; rewrite ?mul1n.
Qed.
Lemma mulnbr (b : bool) n : n * b = (if b then n else 0).
Proof.
(* Goal: @eq nat (muln n (nat_of_bool b)) (if b then n else O) *)
by rewrite mulnC mulnbl.
Qed.
Fixpoint odd n := if n is n'.+1 then ~~ odd n' else false.
Lemma odd_add m n : odd (m + n) = odd m (+) odd n.
Proof.
(* Goal: @eq bool (odd (addn m n)) (addb (odd m) (odd n)) *)
by elim: m => [|m IHn] //=; rewrite -addTb IHn addbA addTb.
Qed.
Lemma odd_sub m n : n <= m -> odd (m - n) = odd m (+) odd n.
Proof.
(* Goal: forall _ : is_true (leq n m), @eq bool (odd (subn m n)) (addb (odd m) (odd n)) *)
by move=> le_nm; apply: (@canRL bool) (addbK _) _; rewrite -odd_add subnK.
Qed.
Lemma odd_opp i m : odd m = false -> i <= m -> odd (m - i) = odd i.
Proof.
(* Goal: forall (_ : @eq bool (odd m) false) (_ : is_true (leq i m)), @eq bool (odd (subn m i)) (odd i) *)
by move=> oddm le_im; rewrite (odd_sub (le_im)) oddm.
Qed.
Lemma odd_mul m n : odd (m * n) = odd m && odd n.
Proof.
(* Goal: @eq bool (odd (muln m n)) (andb (odd m) (odd n)) *)
by elim: m => //= m IHm; rewrite odd_add -addTb andb_addl -IHm.
Qed.
Lemma odd_exp m n : odd (m ^ n) = (n == 0) || odd m.
Proof.
(* Goal: @eq bool (odd (expn m n)) (orb (@eq_op nat_eqType n O) (odd m)) *)
by elim: n => // n IHn; rewrite expnS odd_mul {}IHn orbC; case odd.
Qed.
Fixpoint double_rec n := if n is n'.+1 then n'.*2%Nrec.+2 else 0
where "n .*2" := (double_rec n) : nat_rec_scope.
Definition double := nosimpl double_rec.
Lemma double0 : 0.*2 = 0. Proof. by []. Qed.
Proof.
(* Goal: @eq nat (double O) O *)
by [].
Qed.
Lemma addnn n : n + n = n.*2.
Proof.
(* Goal: @eq nat (addn n n) (double n) *)
by apply: eqP; elim: n => // n IHn; rewrite addnS.
Qed.
Lemma mul2n m : 2 * m = m.*2.
Proof.
(* Goal: @eq nat (muln (S (S O)) m) (double m) *)
by rewrite mulSn mul1n addnn.
Qed.
Lemma muln2 m : m * 2 = m.*2.
Proof.
(* Goal: @eq nat (muln m (S (S O))) (double m) *)
by rewrite mulnC mul2n.
Qed.
Lemma doubleD m n : (m + n).*2 = m.*2 + n.*2.
Proof.
(* Goal: @eq nat (double (addn m n)) (addn (double m) (double n)) *)
by rewrite -!addnn -!addnA (addnCA n).
Qed.
Lemma doubleB m n : (m - n).*2 = m.*2 - n.*2.
Proof.
(* Goal: @eq nat (double (subn m n)) (subn (double m) (double n)) *)
by elim: m n => [|m IHm] [].
Qed.
Lemma leq_double m n : (m.*2 <= n.*2) = (m <= n).
Proof.
(* Goal: @eq bool (leq (double m) (double n)) (leq m n) *)
by rewrite /leq -doubleB; case (m - n).
Qed.
Lemma ltn_double m n : (m.*2 < n.*2) = (m < n).
Proof.
(* Goal: @eq bool (leq (S (double m)) (double n)) (leq (S m) n) *)
by rewrite 2!ltnNge leq_double.
Qed.
Lemma ltn_Sdouble m n : (m.*2.+1 < n.*2) = (m < n).
Proof.
(* Goal: @eq bool (leq (S (S (double m))) (double n)) (leq (S m) n) *)
by rewrite -doubleS leq_double.
Qed.
Lemma leq_Sdouble m n : (m.*2 <= n.*2.+1) = (m <= n).
Proof.
(* Goal: @eq bool (leq (double m) (S (double n))) (leq m n) *)
by rewrite leqNgt ltn_Sdouble -leqNgt.
Qed.
Lemma odd_double n : odd n.*2 = false.
Proof.
(* Goal: @eq bool (odd (double n)) false *)
by rewrite -addnn odd_add addbb.
Qed.
Lemma double_gt0 n : (0 < n.*2) = (0 < n).
Proof.
(* Goal: @eq bool (leq (S O) (double n)) (leq (S O) n) *)
by case: n.
Qed.
Lemma double_eq0 n : (n.*2 == 0) = (n == 0).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (double n) O) (@eq_op nat_eqType n O) *)
by case: n.
Qed.
Lemma doubleMl m n : (m * n).*2 = m.*2 * n.
Proof.
(* Goal: @eq nat (double (muln m n)) (muln (double m) n) *)
by rewrite -!mul2n mulnA.
Qed.
Lemma doubleMr m n : (m * n).*2 = m * n.*2.
Proof.
(* Goal: @eq nat (double (muln m n)) (muln m (double n)) *)
by rewrite -!muln2 mulnA.
Qed.
Fixpoint half (n : nat) : nat := if n is n'.+1 then uphalf n' else n
with uphalf (n : nat) : nat := if n is n'.+1 then n'./2.+1 else n
where "n ./2" := (half n) : nat_scope.
Lemma doubleK : cancel double half.
Proof.
(* Goal: @cancel nat nat double half *)
by elim=> //= n ->.
Qed.
Definition half_double := doubleK.
Definition double_inj := can_inj doubleK.
Lemma uphalf_double n : uphalf n.*2 = n.
Proof.
(* Goal: @eq nat (uphalf (double n)) n *)
by elim: n => //= n ->.
Qed.
Lemma uphalf_half n : uphalf n = odd n + n./2.
Proof.
(* Goal: @eq nat (uphalf n) (addn (nat_of_bool (odd n)) (half n)) *)
by elim: n => //= n ->; rewrite addnA addn_negb.
Qed.
Lemma odd_double_half n : odd n + n./2.*2 = n.
Proof.
(* Goal: @eq nat (addn (nat_of_bool (odd n)) (double (half n))) n *)
by elim: n => //= n {3}<-; rewrite uphalf_half doubleD; case (odd n).
Qed.
Lemma half_bit_double n (b : bool) : (b + n.*2)./2 = n.
Proof.
(* Goal: @eq nat (half (addn (nat_of_bool b) (double n))) n *)
by case: b; rewrite /= (half_double, uphalf_double).
Qed.
Lemma halfD m n : (m + n)./2 = (odd m && odd n) + (m./2 + n./2).
Proof.
(* Goal: @eq nat (half (addn m n)) (addn (nat_of_bool (andb (odd m) (odd n))) (addn (half m) (half n))) *)
rewrite -{1}[n]odd_double_half addnCA -{1}[m]odd_double_half -addnA -doubleD.
(* Goal: @eq nat (half (addn (nat_of_bool (odd n)) (addn (nat_of_bool (odd m)) (double (addn (half m) (half n)))))) (addn (nat_of_bool (andb (odd m) (odd n))) (addn (half m) (half n))) *)
by do 2!case: odd; rewrite /= ?add0n ?half_double ?uphalf_double.
Qed.
Lemma half_leq m n : m <= n -> m./2 <= n./2.
Proof.
(* Goal: forall _ : is_true (leq m n), is_true (leq (half m) (half n)) *)
by move/subnK <-; rewrite halfD addnA leq_addl.
Qed.
Lemma half_gt0 n : (0 < n./2) = (1 < n).
Proof.
(* Goal: @eq bool (leq (S O) (half n)) (leq (S (S O)) n) *)
by case: n => [|[]].
Qed.
Lemma odd_geq m n : odd n -> (m <= n) = (m./2.*2 <= n).
Proof.
(* Goal: forall _ : is_true (odd n), @eq bool (leq m n) (leq (double (half m)) n) *)
move=> odd_n; rewrite -{1}[m]odd_double_half -[n]odd_double_half odd_n.
(* Goal: @eq bool (leq (addn (nat_of_bool (odd m)) (double (half m))) (addn (nat_of_bool true) (double (half n)))) (leq (double (half m)) (addn (nat_of_bool true) (double (half n)))) *)
by case: (odd m); rewrite // leq_Sdouble ltnS leq_double.
Qed.
Lemma odd_ltn m n : odd n -> (n < m) = (n < m./2.*2).
Proof.
(* Goal: forall _ : is_true (odd n), @eq bool (leq (S n) m) (leq (S n) (double (half m))) *)
by move=> odd_n; rewrite !ltnNge odd_geq.
Qed.
Lemma odd_gt2 n : odd n -> n > 1 -> n > 2.
Proof.
(* Goal: forall (_ : is_true (odd n)) (_ : is_true (leq (S (S O)) n)), is_true (leq (S (S (S O))) n) *)
by move=> odd_n n_gt1; rewrite odd_geq.
Qed.
Lemma mulnn m : m * m = m ^ 2.
Proof.
(* Goal: @eq nat (muln m m) (expn m (S (S O))) *)
by rewrite !expnS muln1.
Qed.
Lemma sqrnD m n : (m + n) ^ 2 = m ^ 2 + n ^ 2 + 2 * (m * n).
Proof.
(* Goal: @eq nat (expn (addn m n) (S (S O))) (addn (addn (expn m (S (S O))) (expn n (S (S O)))) (muln (S (S O)) (muln m n))) *)
rewrite -!mulnn mul2n mulnDr !mulnDl (mulnC n) -!addnA.
(* Goal: @eq nat (addn (muln m m) (addn (muln m n) (addn (muln m n) (muln n n)))) (addn (muln m m) (addn (muln n n) (double (muln m n)))) *)
by congr (_ + _); rewrite addnA addnn addnC.
Qed.
Lemma sqrn_sub m n : n <= m -> (m - n) ^ 2 = m ^ 2 + n ^ 2 - 2 * (m * n).
Proof.
(* Goal: forall _ : is_true (leq n m), @eq nat (expn (subn m n) (S (S O))) (subn (addn (expn m (S (S O))) (expn n (S (S O)))) (muln (S (S O)) (muln m n))) *)
move/subnK=> def_m; rewrite -{2}def_m sqrnD -addnA addnAC.
(* Goal: @eq nat (expn (subn m n) (S (S O))) (subn (addn (addn (expn (subn m n) (S (S O))) (addn (muln (S (S O)) (muln (subn m n) n)) (expn n (S (S O))))) (expn n (S (S O)))) (muln (S (S O)) (muln m n))) *)
by rewrite -2!addnA addnn -mul2n -mulnDr -mulnDl def_m addnK.
Qed.
Lemma sqrnD_sub m n : n <= m -> (m + n) ^ 2 - 4 * (m * n) = (m - n) ^ 2.
Proof.
(* Goal: forall _ : is_true (leq n m), @eq nat (subn (expn (addn m n) (S (S O))) (muln (S (S (S (S O)))) (muln m n))) (expn (subn m n) (S (S O))) *)
move=> le_nm; rewrite -[4]/(2 * 2) -mulnA mul2n -addnn subnDA.
(* Goal: @eq nat (subn (subn (expn (addn m n) (S (S O))) (muln (S (S O)) (muln m n))) (muln (S (S O)) (muln m n))) (expn (subn m n) (S (S O))) *)
by rewrite sqrnD addnK sqrn_sub.
Qed.
Lemma subn_sqr m n : m ^ 2 - n ^ 2 = (m - n) * (m + n).
Proof.
(* Goal: @eq nat (subn (expn m (S (S O))) (expn n (S (S O)))) (muln (subn m n) (addn m n)) *)
by rewrite mulnBl !mulnDr addnC (mulnC m) subnDl !mulnn.
Qed.
Lemma ltn_sqr m n : (m ^ 2 < n ^ 2) = (m < n).
Proof.
(* Goal: @eq bool (leq (S (expn m (S (S O)))) (expn n (S (S O)))) (leq (S m) n) *)
by rewrite ltn_exp2r.
Qed.
Lemma leq_sqr m n : (m ^ 2 <= n ^ 2) = (m <= n).
Proof.
(* Goal: @eq bool (leq (expn m (S (S O))) (expn n (S (S O)))) (leq m n) *)
by rewrite leq_exp2r.
Qed.
Lemma sqrn_gt0 n : (0 < n ^ 2) = (0 < n).
Proof.
(* Goal: @eq bool (leq (S O) (expn n (S (S O)))) (leq (S O) n) *)
exact: (ltn_sqr 0).
Qed.
Lemma eqn_sqr m n : (m ^ 2 == n ^ 2) = (m == n).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (expn m (S (S O))) (expn n (S (S O)))) (@eq_op nat_eqType m n) *)
by rewrite eqn_exp2r.
Qed.
Lemma sqrn_inj : injective (expn ^~ 2).
Proof.
(* Goal: @injective nat nat (fun x : nat => expn x (S (S O))) *)
exact: expIn.
Qed.
Definition leqif m n C := ((m <= n) * ((m == n) = C))%type.
Notation "m <= n ?= 'iff' C" := (leqif m n C) : nat_scope.
Coercion leq_of_leqif m n C (H : m <= n ?= iff C) := H.1 : m <= n.
Lemma leqifP m n C : reflect (m <= n ?= iff C) (if C then m == n else m < n).
Lemma leqif_refl m C : reflect (m <= m ?= iff C) C.
Proof.
(* Goal: Bool.reflect (leqif m m C) C *)
by apply: (iffP idP) => [-> | <-] //; split; rewrite ?eqxx.
Qed.
Lemma leqif_trans m1 m2 m3 C12 C23 :
m1 <= m2 ?= iff C12 -> m2 <= m3 ?= iff C23 -> m1 <= m3 ?= iff C12 && C23.
Proof.
(* Goal: forall (_ : leqif m1 m2 C12) (_ : leqif m2 m3 C23), leqif m1 m3 (andb C12 C23) *)
move=> ltm12 ltm23; apply/leqifP; rewrite -ltm12.
(* Goal: is_true (if andb (@eq_op nat_eqType m1 m2) C23 then @eq_op nat_eqType m1 m3 else leq (S m1) m3) *)
case eqm12: (m1 == m2).
(* Goal: is_true (if andb false C23 then @eq_op nat_eqType m1 m3 else leq (S m1) m3) *)
(* Goal: is_true (if andb true C23 then @eq_op nat_eqType m1 m3 else leq (S m1) m3) *)
by rewrite (eqP eqm12) ltn_neqAle !ltm23 andbT; case C23.
(* Goal: is_true (if andb false C23 then @eq_op nat_eqType m1 m3 else leq (S m1) m3) *)
by rewrite (@leq_trans m2) ?ltm23 // ltn_neqAle eqm12 ltm12.
Qed.
Lemma mono_leqif f : {mono f : m n / m <= n} ->
forall m n C, (f m <= f n ?= iff C) = (m <= n ?= iff C).
Proof.
(* Goal: forall (_ : @monomorphism_2 nat nat bool f (fun m n : nat => leq m n) (fun m n : nat => leq m n)) (m n : nat) (C : bool), @eq Prop (leqif (f m) (f n) C) (leqif m n C) *)
by move=> f_mono m n C; rewrite /leqif !eqn_leq !f_mono.
Qed.
Lemma leqif_geq m n : m <= n -> m <= n ?= iff (m >= n).
Proof.
(* Goal: forall _ : is_true (leq m n), leqif m n (leq n m) *)
by move=> lemn; split=> //; rewrite eqn_leq lemn.
Qed.
Lemma leqif_eq m n : m <= n -> m <= n ?= iff (m == n).
Proof.
(* Goal: forall _ : is_true (leq m n), leqif m n (@eq_op nat_eqType m n) *)
by [].
Qed.
Lemma geq_leqif a b C : a <= b ?= iff C -> (b <= a) = C.
Proof.
(* Goal: forall _ : leqif a b C, @eq bool (leq b a) C *)
by case=> le_ab; rewrite eqn_leq le_ab.
Qed.
Lemma ltn_leqif a b C : a <= b ?= iff C -> (a < b) = ~~ C.
Proof.
(* Goal: forall _ : leqif a b C, @eq bool (leq (S a) b) (negb C) *)
by move=> le_ab; rewrite ltnNge (geq_leqif le_ab).
Qed.
Lemma leqif_add m1 n1 C1 m2 n2 C2 :
m1 <= n1 ?= iff C1 -> m2 <= n2 ?= iff C2 ->
m1 + m2 <= n1 + n2 ?= iff C1 && C2.
Proof.
(* Goal: forall (_ : leqif m1 n1 C1) (_ : leqif m2 n2 C2), leqif (addn m1 m2) (addn n1 n2) (andb C1 C2) *)
rewrite -(mono_leqif (leq_add2r m2)) -(mono_leqif (leq_add2l n1) m2).
(* Goal: forall (_ : leqif (addn m1 m2) (addn n1 m2) C1) (_ : leqif (addn n1 m2) (addn n1 n2) C2), leqif (addn m1 m2) (addn n1 n2) (andb C1 C2) *)
exact: leqif_trans.
Qed.
Lemma leqif_mul m1 n1 C1 m2 n2 C2 :
m1 <= n1 ?= iff C1 -> m2 <= n2 ?= iff C2 ->
m1 * m2 <= n1 * n2 ?= iff (n1 * n2 == 0) || (C1 && C2).
Proof.
(* Goal: forall (_ : leqif m1 n1 C1) (_ : leqif m2 n2 C2), leqif (muln m1 m2) (muln n1 n2) (orb (@eq_op nat_eqType (muln n1 n2) O) (andb C1 C2)) *)
case: n1 => [|n1] le1; first by case: m1 le1 => [|m1] [_ <-] //.
(* Goal: forall _ : leqif m2 n2 C2, leqif (muln m1 m2) (muln (S n1) n2) (orb (@eq_op nat_eqType (muln (S n1) n2) O) (andb C1 C2)) *)
case: n2 m2 => [|n2] [|m2] /=; try by case=> // _ <-; rewrite !muln0 ?andbF.
(* Goal: forall _ : leqif (S m2) (S n2) C2, leqif (muln m1 (S m2)) (muln (S n1) (S n2)) (andb C1 C2) *)
have /leq_pmul2l-/mono_leqif<-: 0 < n1.+1 by [].
(* Goal: forall _ : leqif (muln (S n1) (S m2)) (muln (S n1) (S n2)) C2, leqif (muln m1 (S m2)) (muln (S n1) (S n2)) (andb C1 C2) *)
by apply: leqif_trans; have /leq_pmul2r-/mono_leqif->: 0 < m2.+1.
Qed.
Lemma nat_Cauchy m n : 2 * (m * n) <= m ^ 2 + n ^ 2 ?= iff (m == n).
Proof.
(* Goal: leqif (muln (S (S O)) (muln m n)) (addn (expn m (S (S O))) (expn n (S (S O)))) (@eq_op nat_eqType m n) *)
without loss le_nm: m n / n <= m.
(* Goal: leqif (muln (S (S O)) (muln m n)) (addn (expn m (S (S O))) (expn n (S (S O)))) (@eq_op nat_eqType m n) *)
(* Goal: forall _ : forall (m n : nat) (_ : is_true (leq n m)), leqif (muln (S (S O)) (muln m n)) (addn (expn m (S (S O))) (expn n (S (S O)))) (@eq_op nat_eqType m n), leqif (muln (S (S O)) (muln m n)) (addn (expn m (S (S O))) (expn n (S (S O)))) (@eq_op nat_eqType m n) *)
by case: (leqP m n); auto; rewrite eq_sym addnC (mulnC m); auto.
(* Goal: leqif (muln (S (S O)) (muln m n)) (addn (expn m (S (S O))) (expn n (S (S O)))) (@eq_op nat_eqType m n) *)
apply/leqifP; case: ifP => [/eqP-> | ne_mn]; first by rewrite mulnn addnn mul2n.
(* Goal: is_true (leq (S (muln (S (S O)) (muln m n))) (addn (expn m (S (S O))) (expn n (S (S O))))) *)
by rewrite -subn_gt0 -sqrn_sub // sqrn_gt0 subn_gt0 ltn_neqAle eq_sym ne_mn.
Qed.
Lemma nat_AGM2 m n : 4 * (m * n) <= (m + n) ^ 2 ?= iff (m == n).
Section Monotonicity.
Variable T : Type.
Lemma homo_ltn_in (D : pred nat) (f : nat -> T) (r : T -> T -> Prop) :
(forall y x z, r x y -> r y z -> r x z) ->
{in D &, forall i j k, i < k < j -> k \in D} ->
{in D, forall i, i.+1 \in D -> r (f i) (f i.+1)} ->
Lemma homo_ltn (f : nat -> T) (r : T -> T -> Prop) :
(forall y x z, r x y -> r y z -> r x z) ->
(forall i, r (f i) (f i.+1)) -> {homo f : i j / i < j >-> r i j}.
Proof.
(* Goal: forall (_ : forall (y x z : T) (_ : r x y) (_ : r y z), r x z) (_ : forall i : nat, r (f i) (f (S i))), @homomorphism_2 nat T f (fun i j : nat => is_true (leq (S i) j)) (fun i j : T => r i j) *)
by move=> /(@homo_ltn_in predT f) fr fS i j; apply: fr.
Qed.
Lemma homo_leq_in (D : pred nat) (f : nat -> T) (r : T -> T -> Prop) :
(forall x, r x x) -> (forall y x z, r x y -> r y z -> r x z) ->
{in D &, forall i j k, i < k < j -> k \in D} ->
{in D, forall i, i.+1 \in D -> r (f i) (f i.+1)} ->
Proof.
(* Goal: forall (_ : forall x : T, r x x) (_ : forall (y x z : T) (_ : r x y) (_ : r y z), r x z) (_ : @prop_in2 nat (@mem nat (predPredType nat) D) (fun i j : nat => forall (k : nat) (_ : is_true (andb (leq (S i) k) (leq (S k) j))), is_true (@in_mem nat k (@mem nat (predPredType nat) D))) (inPhantom (forall (i j k : nat) (_ : is_true (andb (leq (S i) k) (leq (S k) j))), is_true (@in_mem nat k (@mem nat (predPredType nat) D))))) (_ : @prop_in1 nat (@mem nat (predPredType nat) D) (fun i : nat => forall _ : is_true (@in_mem nat (S i) (@mem nat (predPredType nat) D)), r (f i) (f (S i))) (inPhantom (forall (i : nat) (_ : is_true (@in_mem nat (S i) (@mem nat (predPredType nat) D))), r (f i) (f (S i))))), @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => forall _ : (fun i j : nat => is_true (leq i j)) x y, (fun i j : T => r i j) (f x) (f y)) (inPhantom (@homomorphism_2 nat T f (fun i j : nat => is_true (leq i j)) (fun i j : T => r i j))) *)
move=> r_refl r_trans Dcx /(homo_ltn_in r_trans Dcx) lt_r i j iD jD.
(* Goal: forall _ : is_true (leq i j), r (f i) (f j) *)
by rewrite leq_eqVlt => /predU1P[->//|/lt_r]; apply.
Qed.
Lemma homo_leq (f : nat -> T) (r : T -> T -> Prop) :
(forall x, r x x) -> (forall y x z, r x y -> r y z -> r x z) ->
(forall i, r (f i) (f i.+1)) -> {homo f : i j / i <= j >-> r i j}.
Proof.
(* Goal: forall (_ : forall x : T, r x x) (_ : forall (y x z : T) (_ : r x y) (_ : r y z), r x z) (_ : forall i : nat, r (f i) (f (S i))), @homomorphism_2 nat T f (fun i j : nat => is_true (leq i j)) (fun i j : T => r i j) *)
by move=> rrefl /(@homo_leq_in predT f r) fr fS i j; apply: fr.
Qed.
Section NatToNat.
Variable (f : nat -> nat).
Let ltn_neqAle := ltn_neqAle.
Let gtn_neqAge x y : (y < x) = (x != y) && (y <= x).
Proof.
(* Goal: @eq bool (leq (S y) x) (andb (negb (@eq_op nat_eqType x y)) (leq y x)) *)
by rewrite ltn_neqAle eq_sym.
Qed.
Let anti_leq := anti_leq.
Let anti_geq : antisymmetric geq.
Proof.
(* Goal: @antisymmetric nat (@rel_of_simpl_rel nat geq) *)
by move=> m n /=; rewrite andbC => /anti_leq.
Qed.
Let leq_total := leq_total.
Lemma ltnW_homo : {homo f : m n / m < n} -> {homo f : m n / m <= n}.
Proof.
(* Goal: forall _ : @homomorphism_2 nat nat f (fun m n : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)), @homomorphism_2 nat nat f (fun m n : nat => is_true (leq m n)) (fun m n : nat => is_true (leq m n)) *)
exact: homoW.
Qed.
Lemma homo_inj_lt : injective f -> {homo f : m n / m <= n} ->
{homo f : m n / m < n}.
Proof.
(* Goal: forall (_ : @injective nat nat f) (_ : @homomorphism_2 nat nat f (fun m n : nat => is_true (leq m n)) (fun m n : nat => is_true (leq m n))), @homomorphism_2 nat nat f (fun m n : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)) *)
exact: inj_homo.
Qed.
Lemma ltnW_nhomo : {homo f : m n /~ m < n} -> {homo f : m n /~ m <= n}.
Proof.
(* Goal: forall _ : @homomorphism_2 nat nat f (fun n m : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)), @homomorphism_2 nat nat f (fun n m : nat => is_true (leq m n)) (fun m n : nat => is_true (leq m n)) *)
exact: homoW.
Qed.
Lemma nhomo_inj_lt : injective f -> {homo f : m n /~ m <= n} ->
{homo f : m n /~ m < n}.
Proof.
(* Goal: forall (_ : @injective nat nat f) (_ : @homomorphism_2 nat nat f (fun n m : nat => is_true (leq m n)) (fun m n : nat => is_true (leq m n))), @homomorphism_2 nat nat f (fun n m : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)) *)
exact: inj_homo.
Qed.
Lemma incrn_inj : {mono f : m n / m <= n} -> injective f.
Proof.
(* Goal: forall _ : @monomorphism_2 nat nat bool f (fun m n : nat => leq m n) (fun m n : nat => leq m n), @injective nat nat f *)
exact: mono_inj.
Qed.
Lemma decrn_inj : {mono f : m n /~ m <= n} -> injective f.
Proof.
(* Goal: forall _ : @monomorphism_2 nat nat bool f (fun n m : nat => leq m n) (fun m n : nat => leq m n), @injective nat nat f *)
exact: mono_inj.
Qed.
Lemma leqW_mono : {mono f : m n / m <= n} -> {mono f : m n / m < n}.
Proof.
(* Goal: forall _ : @monomorphism_2 nat nat bool f (fun m n : nat => leq m n) (fun m n : nat => leq m n), @monomorphism_2 nat nat bool f (fun m n : nat => leq (S m) n) (fun m n : nat => leq (S m) n) *)
exact: anti_mono.
Qed.
Lemma leqW_nmono : {mono f : m n /~ m <= n} -> {mono f : m n /~ m < n}.
Proof.
(* Goal: forall _ : @monomorphism_2 nat nat bool f (fun n m : nat => leq m n) (fun m n : nat => leq m n), @monomorphism_2 nat nat bool f (fun n m : nat => leq (S m) n) (fun m n : nat => leq (S m) n) *)
exact: anti_mono.
Qed.
Lemma leq_mono : {homo f : m n / m < n} -> {mono f : m n / m <= n}.
Proof.
(* Goal: forall _ : @homomorphism_2 nat nat f (fun m n : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)), @monomorphism_2 nat nat bool f (fun m n : nat => leq m n) (fun m n : nat => leq m n) *)
exact: total_homo_mono.
Qed.
Lemma leq_nmono : {homo f : m n /~ m < n} -> {mono f : m n /~ m <= n}.
Proof.
(* Goal: forall _ : @homomorphism_2 nat nat f (fun n m : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)), @monomorphism_2 nat nat bool f (fun n m : nat => leq m n) (fun m n : nat => leq m n) *)
exact: total_homo_mono.
Qed.
Variable (D D' : pred nat).
Lemma ltnW_homo_in : {in D & D', {homo f : m n / m < n}} ->
{in D & D', {homo f : m n / m <= n}}.
Proof.
(* Goal: forall _ : @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x y : nat => forall _ : (fun m n : nat => is_true (leq (S m) n)) x y, (fun m n : nat => is_true (leq (S m) n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun m n : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)))), @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x y : nat => forall _ : (fun m n : nat => is_true (leq m n)) x y, (fun m n : nat => is_true (leq m n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun m n : nat => is_true (leq m n)) (fun m n : nat => is_true (leq m n)))) *)
exact: homoW_in.
Qed.
Lemma ltnW_nhomo_in : {in D & D', {homo f : m n /~ m < n}} ->
{in D & D', {homo f : m n /~ m <= n}}.
Proof.
(* Goal: forall _ : @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x y : nat => forall _ : (fun n m : nat => is_true (leq (S m) n)) x y, (fun m n : nat => is_true (leq (S m) n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun n m : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)))), @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x y : nat => forall _ : (fun n m : nat => is_true (leq m n)) x y, (fun m n : nat => is_true (leq m n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun n m : nat => is_true (leq m n)) (fun m n : nat => is_true (leq m n)))) *)
exact: homoW_in.
Qed.
Lemma homo_inj_lt_in : {in D & D', injective f} ->
{in D & D', {homo f : m n / m <= n}} ->
{in D & D', {homo f : m n / m < n}}.
Proof.
(* Goal: forall (_ : @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x1 x2 : nat => forall _ : @eq nat (f x1) (f x2), @eq nat x1 x2) (inPhantom (@injective nat nat f))) (_ : @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x y : nat => forall _ : (fun m n : nat => is_true (leq m n)) x y, (fun m n : nat => is_true (leq m n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun m n : nat => is_true (leq m n)) (fun m n : nat => is_true (leq m n))))), @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x y : nat => forall _ : (fun m n : nat => is_true (leq (S m) n)) x y, (fun m n : nat => is_true (leq (S m) n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun m n : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)))) *)
exact: inj_homo_in.
Qed.
Lemma nhomo_inj_lt_in : {in D & D', injective f} ->
{in D & D', {homo f : m n /~ m <= n}} ->
{in D & D', {homo f : m n /~ m < n}}.
Proof.
(* Goal: forall (_ : @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x1 x2 : nat => forall _ : @eq nat (f x1) (f x2), @eq nat x1 x2) (inPhantom (@injective nat nat f))) (_ : @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x y : nat => forall _ : (fun n m : nat => is_true (leq m n)) x y, (fun m n : nat => is_true (leq m n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun n m : nat => is_true (leq m n)) (fun m n : nat => is_true (leq m n))))), @prop_in11 nat nat (@mem nat (predPredType nat) D) (@mem nat (predPredType nat) D') (fun x y : nat => forall _ : (fun n m : nat => is_true (leq (S m) n)) x y, (fun m n : nat => is_true (leq (S m) n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun n m : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)))) *)
exact: inj_homo_in.
Qed.
Lemma incrn_inj_in : {in D &, {mono f : m n / m <= n}} ->
{in D &, injective f}.
Proof.
(* Goal: forall _ : @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => @eq bool ((fun m n : nat => leq m n) (f x) (f y)) ((fun m n : nat => leq m n) x y)) (inPhantom (@monomorphism_2 nat nat bool f (fun m n : nat => leq m n) (fun m n : nat => leq m n))), @prop_in2 nat (@mem nat (predPredType nat) D) (fun x1 x2 : nat => forall _ : @eq nat (f x1) (f x2), @eq nat x1 x2) (inPhantom (@injective nat nat f)) *)
exact: mono_inj_in.
Qed.
Lemma decrn_inj_in : {in D &, {mono f : m n /~ m <= n}} ->
{in D &, injective f}.
Proof.
(* Goal: forall _ : @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => @eq bool ((fun m n : nat => leq m n) (f x) (f y)) ((fun n m : nat => leq m n) x y)) (inPhantom (@monomorphism_2 nat nat bool f (fun n m : nat => leq m n) (fun m n : nat => leq m n))), @prop_in2 nat (@mem nat (predPredType nat) D) (fun x1 x2 : nat => forall _ : @eq nat (f x1) (f x2), @eq nat x1 x2) (inPhantom (@injective nat nat f)) *)
exact: mono_inj_in.
Qed.
Lemma leqW_mono_in : {in D &, {mono f : m n / m <= n}} ->
{in D &, {mono f : m n / m < n}}.
Proof.
(* Goal: forall _ : @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => @eq bool ((fun m n : nat => leq m n) (f x) (f y)) ((fun m n : nat => leq m n) x y)) (inPhantom (@monomorphism_2 nat nat bool f (fun m n : nat => leq m n) (fun m n : nat => leq m n))), @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => @eq bool ((fun m n : nat => leq (S m) n) (f x) (f y)) ((fun m n : nat => leq (S m) n) x y)) (inPhantom (@monomorphism_2 nat nat bool f (fun m n : nat => leq (S m) n) (fun m n : nat => leq (S m) n))) *)
exact: anti_mono_in.
Qed.
Lemma leqW_nmono_in : {in D &, {mono f : m n /~ m <= n}} ->
{in D &, {mono f : m n /~ m < n}}.
Proof.
(* Goal: forall _ : @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => @eq bool ((fun m n : nat => leq m n) (f x) (f y)) ((fun n m : nat => leq m n) x y)) (inPhantom (@monomorphism_2 nat nat bool f (fun n m : nat => leq m n) (fun m n : nat => leq m n))), @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => @eq bool ((fun m n : nat => leq (S m) n) (f x) (f y)) ((fun n m : nat => leq (S m) n) x y)) (inPhantom (@monomorphism_2 nat nat bool f (fun n m : nat => leq (S m) n) (fun m n : nat => leq (S m) n))) *)
exact: anti_mono_in.
Qed.
Lemma leq_mono_in : {in D &, {homo f : m n / m < n}} ->
{in D &, {mono f : m n / m <= n}}.
Proof.
(* Goal: forall _ : @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => forall _ : (fun m n : nat => is_true (leq (S m) n)) x y, (fun m n : nat => is_true (leq (S m) n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun m n : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)))), @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => @eq bool ((fun m n : nat => leq m n) (f x) (f y)) ((fun m n : nat => leq m n) x y)) (inPhantom (@monomorphism_2 nat nat bool f (fun m n : nat => leq m n) (fun m n : nat => leq m n))) *)
exact: total_homo_mono_in.
Qed.
Lemma leq_nmono_in : {in D &, {homo f : m n /~ m < n}} ->
{in D &, {mono f : m n /~ m <= n}}.
Proof.
(* Goal: forall _ : @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => forall _ : (fun n m : nat => is_true (leq (S m) n)) x y, (fun m n : nat => is_true (leq (S m) n)) (f x) (f y)) (inPhantom (@homomorphism_2 nat nat f (fun n m : nat => is_true (leq (S m) n)) (fun m n : nat => is_true (leq (S m) n)))), @prop_in2 nat (@mem nat (predPredType nat) D) (fun x y : nat => @eq bool ((fun m n : nat => leq m n) (f x) (f y)) ((fun n m : nat => leq m n) x y)) (inPhantom (@monomorphism_2 nat nat bool f (fun n m : nat => leq m n) (fun m n : nat => leq m n))) *)
exact: total_homo_mono_in.
Qed.
End NatToNat.
End Monotonicity.
Module NatTrec.
Fixpoint add m n := if m is m'.+1 then m' + n.+1 else n
where "n + m" := (add n m) : nat_scope.
Fixpoint add_mul m n s := if m is m'.+1 then add_mul m' n (n + s) else s.
Definition mul m n := if m is m'.+1 then add_mul m' n n else 0.
Notation "n * m" := (mul n m) : nat_scope.
Fixpoint mul_exp m n p := if n is n'.+1 then mul_exp m n' (m * p) else p.
Definition exp m n := if n is n'.+1 then mul_exp m n' m else 1.
Notation "n ^ m" := (exp n m) : nat_scope.
Local Notation oddn := odd.
Fixpoint odd n := if n is n'.+2 then odd n' else eqn n 1.
Local Notation doublen := double.
Definition double n := if n is n'.+1 then n' + n.+1 else 0.
Notation "n .*2" := (double n) : nat_scope.
Lemma addE : add =2 addn.
Proof.
(* Goal: @eqrel nat nat nat add addn *)
by elim=> //= n IHn m; rewrite IHn addSnnS.
Qed.
Lemma doubleE : double =1 doublen.
Proof.
(* Goal: @eq (forall _ : nat, nat) double double_rec *)
by [].
Qed.
Lemma add_mulE n m s : add_mul n m s = addn (muln n m) s.
Proof.
(* Goal: @eq nat (add_mul n m s) (addn (muln n m) s) *)
by elim: n => //= n IHn in m s *; rewrite IHn addE addnCA addnA.
Qed.
Lemma mulE : mul =2 muln.
Proof.
(* Goal: @eqrel nat nat nat mul muln *)
by case=> //= n m; rewrite add_mulE addnC.
Qed.
Lemma mul_expE m n p : mul_exp m n p = muln (expn m n) p.
Proof.
(* Goal: @eq nat (mul_exp m n p) (muln (expn m n) p) *)
by elim: n => [|n IHn] in p *; rewrite ?mul1n //= expnS IHn mulE mulnCA mulnA.
Qed.
Lemma expE : exp =2 expn.
Proof.
(* Goal: @eqrel nat nat nat exp expn *)
by move=> m [|n] //=; rewrite mul_expE expnS mulnC.
Qed.
Lemma oddE : odd =1 oddn.
Proof.
(* Goal: @eqfun bool nat odd SerTop.odd *)
move=> n; rewrite -{1}[n]odd_double_half addnC.
(* Goal: @eq bool (odd (addn (SerTop.double (half n)) (nat_of_bool (SerTop.odd n)))) (SerTop.odd n) *)
by elim: n./2 => //=; case (oddn n).
Qed.
Definition trecE := (addE, (doubleE, oddE), (mulE, add_mulE, (expE, mul_expE))).
End NatTrec.
Notation natTrecE := NatTrec.trecE.
Lemma eq_binP : Equality.axiom N.eqb.
Canonical bin_nat_eqMixin := EqMixin eq_binP.
Canonical bin_nat_eqType := Eval hnf in EqType N bin_nat_eqMixin.
Arguments N.eqb !n !m.
Section NumberInterpretation.
Import BinPos.
Section Trec.
Import NatTrec.
Fixpoint nat_of_pos p0 :=
match p0 with
| xO p => (nat_of_pos p).*2
| xI p => (nat_of_pos p).*2.+1
| xH => 1
end.
End Trec.
Local Coercion nat_of_pos : positive >-> nat.
Coercion nat_of_bin b := if b is Npos p then p : nat else 0.
Fixpoint pos_of_nat n0 m0 :=
match n0, m0 with
| n.+1, m.+2 => pos_of_nat n m
| n.+1, 1 => xO (pos_of_nat n n)
| n.+1, 0 => xI (pos_of_nat n n)
| 0, _ => xH
end.
Definition bin_of_nat n0 := if n0 is n.+1 then Npos (pos_of_nat n n) else 0%num.
Lemma bin_of_natK : cancel bin_of_nat nat_of_bin.
Proof.
(* Goal: @cancel N nat bin_of_nat nat_of_bin *)
have sub2nn n : n.*2 - n = n by rewrite -addnn addKn.
(* Goal: @cancel N nat bin_of_nat nat_of_bin *)
case=> //= n; rewrite -{3}[n]sub2nn.
(* Goal: @eq nat (nat_of_pos (pos_of_nat n n)) (S (subn (double n) n)) *)
by elim: n {2 4}n => // m IHm [|[|n]] //=; rewrite IHm // natTrecE sub2nn.
Qed.
Lemma nat_of_binK : cancel nat_of_bin bin_of_nat.
Proof.
(* Goal: @cancel nat N nat_of_bin bin_of_nat *)
case=> //=; elim=> //= p; case: (nat_of_pos p) => //= n [<-].
(* Goal: @eq N (bin_of_nat (NatTrec.add n (S (S n)))) (Npos (xO (pos_of_nat n n))) *)
(* Goal: @eq N (Npos (pos_of_nat (NatTrec.add n (S (S n))) (NatTrec.add n (S (S n))))) (Npos (xI (pos_of_nat n n))) *)
by rewrite natTrecE !addnS {2}addnn; elim: {1 3}n.
(* Goal: @eq N (bin_of_nat (NatTrec.add n (S (S n)))) (Npos (xO (pos_of_nat n n))) *)
by rewrite natTrecE addnS /= addnS {2}addnn; elim: {1 3}n.
Qed.
Lemma nat_of_succ_gt0 p : Pos.succ p = p.+1 :> nat.
Proof.
(* Goal: @eq nat (nat_of_pos (Pos.succ p)) (S (nat_of_pos p)) *)
by elim: p => //= p ->; rewrite !natTrecE.
Qed.
Lemma nat_of_addn_gt0 p q : (p + q)%positive = p + q :> nat.
Lemma nat_of_add_bin b1 b2 : (b1 + b2)%num = b1 + b2 :> nat.
Proof.
(* Goal: @eq nat (nat_of_bin (N.add b1 b2)) (addn (nat_of_bin b1) (nat_of_bin b2)) *)
by case: b1 b2 => [|p] [|q] //=; apply: nat_of_addn_gt0.
Qed.
Lemma nat_of_mul_bin b1 b2 : (b1 * b2)%num = b1 * b2 :> nat.
Proof.
(* Goal: @eq nat (nat_of_bin (N.mul b1 b2)) (muln (nat_of_bin b1) (nat_of_bin b2)) *)
case: b1 b2 => [|p] [|q] //=; elim: p => [p IHp|p IHp|] /=; by rewrite ?(mul1n, nat_of_addn_gt0, mulSn) //= !natTrecE IHp doubleMl.
Qed.
Lemma nat_of_exp_bin n (b : N) : n ^ b = pow_N 1 muln n b.
Proof.
(* Goal: @eq nat (expn n (nat_of_bin b)) (@pow_N nat (S O) muln n b) *)
by case: b; last (elim=> //= p <-; rewrite natTrecE mulnn -expnM muln2 ?expnS).
Qed.
End NumberInterpretation.
Record number : Type := Num {bin_of_number :> N}.
Definition extend_number (nn : number) m := Num (nn * 1000 + bin_of_nat m).
Coercion extend_number : number >-> Funclass.
Canonical number_subType := [newType for bin_of_number].
Definition number_eqMixin := Eval hnf in [eqMixin of number by <:].
Canonical number_eqType := Eval hnf in EqType number number_eqMixin.
Notation "[ 'Num' 'of' e ]" := (Num (bin_of_nat e))
(at level 0, format "[ 'Num' 'of' e ]") : nat_scope.
Lemma nat_semi_ring : semi_ring_theory 0 1 addn muln (@eq _).
Proof.
(* Goal: @semi_ring_theory nat O (S O) addn muln (@eq nat) *)
exact: mk_srt add0n addnC addnA mul1n mul0n mulnC mulnA mulnDl.
Qed.
Lemma nat_semi_morph :
semi_morph 0 1 addn muln (@eq _) 0%num 1%num Nplus Nmult pred1 nat_of_bin.
Proof.
(* Goal: @semi_morph nat O (S O) addn muln (@eq nat) N N0 (Npos xH) N.add N.mul (fun a1 : N => @pred_of_simpl (Equality.sort bin_nat_eqType) (@pred1 bin_nat_eqType a1)) nat_of_bin *)
by move: nat_of_add_bin nat_of_mul_bin; split=> //= m n; move/eqP->.
Qed.
Lemma nat_power_theory : power_theory 1 muln (@eq _) nat_of_bin expn.
Proof.
(* Goal: @power_theory nat (S O) muln (@eq nat) nat nat_of_bin expn *)
by split; apply: nat_of_exp_bin.
Qed.
Fixpoint pop_succn e := if e is e'.+1 then fun n => pop_succn e' n.+1 else id.
Ltac pop_succn e := eval lazy beta iota delta [pop_succn] in (pop_succn e 1).
Ltac nat_litteral e :=
match pop_succn e with
| ?n.+1 => constr: (bin_of_nat n)
| _ => NotConstant
end.
Ltac succn_to_add :=
match goal with
| |- context G [?e.+1] =>
let x := fresh "NatLit0" in
match pop_succn e with
| ?n.+1 => pose x := n.+1; let G' := context G [x] in change G'
| _ ?e' ?n => pose x := n; let G' := context G [x + e'] in change G'
end; succn_to_add; rewrite {}/x
| _ => idtac
end.
Add Ring nat_ring_ssr : nat_semi_ring (morphism nat_semi_morph,
constants [nat_litteral], preprocess [succn_to_add],
power_tac nat_power_theory [nat_litteral]).
Ltac nat_norm :=
succn_to_add; rewrite ?add0n ?addn0 -?addnA ?(addSn, addnS, add0n, addn0).
Ltac nat_congr := first
[ apply: (congr1 succn _)
| apply: (congr1 predn _)
| apply: (congr1 (addn _) _)
| apply: (congr1 (subn _) _)
| apply: (congr1 (addn^~ _) _)
| match goal with |- (?X1 + ?X2 = ?X3) =>
symmetry;
rewrite -1?(addnC X1) -?(addnCA X1);
apply: (congr1 (addn X1) _);
symmetry
end ].
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Sub_sgroup.
Require Export Monoid_facts.
Section Def.
Variable G : MONOID.
Section Sub_monoid.
Variable H : subsgroup G.
Hypothesis Hunit : in_part (monoid_unit G) H.
Definition submonoid_monoid : monoid.
Proof.
(* Goal: monoid *)
apply (Build_monoid (monoid_sgroup:=H)).
(* Goal: monoid_on (@sgroup_of_subsgroup (monoid_sgroup G) H) *)
apply (Build_monoid_on (A:=H) (monoid_unit:=Build_subtype Hunit)).
(* Goal: @unit_l (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit) *)
(* Goal: @unit_r (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit) *)
red in |- *.
(* Goal: @unit_l (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit) *)
(* Goal: forall x : Carrier (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)), @Equal (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@Ap (cart (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H))) (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@couple (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) x (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit))) x *)
simpl in |- *.
(* Goal: @unit_l (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit) *)
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H), @subtype_image_equal (sgroup_set (monoid_sgroup G)) (@subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H)) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (sgroup_law (monoid_sgroup G) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) (@monoid_unit (monoid_sgroup G) (monoid_on_def G))) (@subsgroup_prop (monoid_sgroup G) H (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) (@subtype_prf (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) Hunit)) x *)
unfold subtype_image_equal in |- *.
(* Goal: @unit_l (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit) *)
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H), @Equal (sgroup_set (monoid_sgroup G)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (sgroup_law (monoid_sgroup G) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) (@monoid_unit (monoid_sgroup G) (monoid_on_def G))) (@subsgroup_prop (monoid_sgroup G) H (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) (@subtype_prf (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) Hunit))) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) *)
simpl in |- *.
(* Goal: @unit_l (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit) *)
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H), @Equal (sgroup_set (monoid_sgroup G)) (sgroup_law (monoid_sgroup G) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) (@monoid_unit (monoid_sgroup G) (monoid_on_def G))) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) *)
auto with algebra.
(* Goal: @unit_l (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit) *)
red in |- *.
(* Goal: forall x : Carrier (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)), @Equal (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@Ap (cart (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H))) (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@sgroup_law_map (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_on_def (@sgroup_of_subsgroup (monoid_sgroup G) H))) (@couple (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (sgroup_set (@sgroup_of_subsgroup (monoid_sgroup G) H)) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) Hunit) x)) x *)
simpl in |- *.
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H), @subtype_image_equal (sgroup_set (monoid_sgroup G)) (@subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H)) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (sgroup_law (monoid_sgroup G) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x)) (@subsgroup_prop (monoid_sgroup G) H (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) Hunit (@subtype_prf (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x))) x *)
unfold subtype_image_equal in |- *.
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H), @Equal (sgroup_set (monoid_sgroup G)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (@Build_subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) (sgroup_law (monoid_sgroup G) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x)) (@subsgroup_prop (monoid_sgroup G) H (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) Hunit (@subtype_prf (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x)))) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) *)
simpl in |- *.
(* Goal: forall x : @subtype (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H), @Equal (sgroup_set (monoid_sgroup G)) (sgroup_law (monoid_sgroup G) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x)) (@subtype_elt (sgroup_set (monoid_sgroup G)) (@subsgroup_part (monoid_sgroup G) H) x) *)
auto with algebra.
Qed.
End Sub_monoid.
Record submonoid : Type :=
{submonoid_subsgroup : subsgroup G;
submonoid_prop : in_part (monoid_unit G) submonoid_subsgroup}.
Definition monoid_of_submonoid (H : submonoid) :=
submonoid_monoid (submonoid_prop H).
End Def.
Coercion monoid_of_submonoid : submonoid >-> monoid.
Coercion submonoid_subsgroup : submonoid >-> subsgroup.
Section Injection.
Variable G : MONOID.
Variable H : submonoid G.
Lemma submonoid_in_prop : in_part (monoid_unit G) H.
Proof.
(* Goal: @in_part (sgroup_set (monoid_sgroup G)) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) (@subsgroup_part (monoid_sgroup G) (@submonoid_subsgroup G H)) *)
apply (submonoid_prop (G:=G) H); auto with algebra.
Qed.
Definition inj_submonoid : Hom (H:MONOID) G.
Proof.
(* Goal: Carrier (@Hom MONOID (@monoid_of_submonoid G H : Ob MONOID) G) *)
apply (Build_monoid_hom (E:=H) (F:=G) (monoid_sgroup_hom:=inj_subsgroup H)).
(* Goal: @monoid_hom_prop (@monoid_of_submonoid G H) G (@Ap (sgroup_set (monoid_sgroup (@monoid_of_submonoid G H))) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup (@monoid_of_submonoid G H)) (monoid_sgroup G) (@inj_subsgroup (monoid_sgroup G) (@submonoid_subsgroup G H)))) *)
red in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup (@monoid_of_submonoid G H))) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup (@monoid_of_submonoid G H)) (monoid_sgroup G) (@inj_subsgroup (monoid_sgroup G) (@submonoid_subsgroup G H))) (@monoid_unit (monoid_sgroup (@monoid_of_submonoid G H)) (monoid_on_def (@monoid_of_submonoid G H)))) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) *)
auto with algebra.
Qed.
Lemma inj_subsmonoid_injective : injective inj_submonoid.
Proof.
(* Goal: @injective (sgroup_set (monoid_sgroup (@monoid_of_submonoid G H))) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup (@monoid_of_submonoid G H)) (monoid_sgroup G) (@monoid_sgroup_hom (@monoid_of_submonoid G H) G inj_submonoid)) *)
red in |- *.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (@monoid_of_submonoid G H)))) (_ : @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup (@monoid_of_submonoid G H))) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup (@monoid_of_submonoid G H)) (monoid_sgroup G) (@monoid_sgroup_hom (@monoid_of_submonoid G H) G inj_submonoid)) x) (@Ap (sgroup_set (monoid_sgroup (@monoid_of_submonoid G H))) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup (@monoid_of_submonoid G H)) (monoid_sgroup G) (@monoid_sgroup_hom (@monoid_of_submonoid G H) G inj_submonoid)) y)), @Equal (sgroup_set (monoid_sgroup (@monoid_of_submonoid G H))) x y *)
auto with algebra.
Qed.
End Injection.
Hint Resolve submonoid_in_prop inj_subsmonoid_injective: algebra.
|
Section Relations.
Variable A : Set.
Variable R : A -> A -> Prop.
Definition Rstar (x y : A) :=
forall P : A -> A -> Prop,
(forall u : A, P u u) ->
(forall u v w : A, R u v -> P v w -> P u w) -> P x y.
Theorem Rstar_reflexive : forall x : A, Rstar x x.
Proof
fun (x : A) (P : A -> A -> Prop) (h1 : forall u : A, P u u)
(h2 : forall u v w : A, R u v -> P v w -> P u w) =>
h1 x.
Theorem Rstar_R : forall x y z : A, R x y -> Rstar y z -> Rstar x z.
Proof
fun (x y z : A) (t1 : R x y) (t2 : Rstar y z) (P : A -> A -> Prop)
(h1 : forall u : A, P u u)
(h2 : forall u v w : A, R u v -> P v w -> P u w) =>
h2 x y z t1 (t2 P h1 h2).
Theorem Rstar_transitive :
forall x y z : A, Rstar x y -> Rstar y z -> Rstar x z.
Proof
fun (x y z : A) (h : Rstar x y) =>
h (fun u v : A => Rstar v z -> Rstar u z)
(fun (u : A) (t : Rstar u z) => t)
(fun (u v w : A) (t1 : R u v) (t2 : Rstar w z -> Rstar v z)
(t3 : Rstar w z) => Rstar_R u v z t1 (t2 t3)).
Definition Rstar' (x y : A) :=
forall P : A -> A -> Prop,
P x x -> (forall u : A, R x u -> Rstar u y -> P x y) -> P x y.
Theorem Rstar'_reflexive : forall x : A, Rstar' x x.
Proof
fun (x : A) (P : A -> A -> Prop) (h : P x x)
(h' : forall u : A, R x u -> Rstar u x -> P x x) => h.
Theorem Rstar'_R : forall x y z : A, R x z -> Rstar z y -> Rstar' x y.
Proof
fun (x y z : A) (t1 : R x z) (t2 : Rstar z y) (P : A -> A -> Prop)
(h1 : P x x) (h2 : forall u : A, R x u -> Rstar u y -> P x y) =>
h2 z t1 t2.
Theorem Rstar'_Rstar : forall x y : A, Rstar' x y -> Rstar x y.
Proof
fun (x y : A) (h : Rstar' x y) =>
h Rstar (Rstar_reflexive x) (fun u : A => Rstar_R x u y).
Theorem Rstar_Rstar' : forall x y : A, Rstar x y -> Rstar' x y.
Proof
fun (x y : A) (h : Rstar x y) =>
h Rstar' (fun u : A => Rstar'_reflexive u)
(fun (u v w : A) (h1 : R u v) (h2 : Rstar' v w) =>
Rstar'_R u w v h1 (Rstar'_Rstar v w h2)).
Lemma Rstar_inv :
forall x y : A,
Rstar x y -> x = y \/ ex2 (fun z : A => R x z) (fun z : A => Rstar z y).
Proof.
(* Goal: forall (x y : A) (_ : Rstar x y), or (@eq A x y) (@ex2 A (fun z : A => R x z) (fun z : A => Rstar z y)) *)
intros x y Rstar_x_y.
(* Goal: or (@eq A x y) (@ex2 A (fun z : A => R x z) (fun z : A => Rstar z y)) *)
pattern x, y in |- *.
(* Goal: (fun a a0 : A => or (@eq A a a0) (@ex2 A (fun z : A => R a z) (fun z : A => Rstar z a0))) x y *)
apply Rstar_x_y.
(* Goal: forall (u v w : A) (_ : R u v) (_ : or (@eq A v w) (@ex2 A (fun z : A => R v z) (fun z : A => Rstar z w))), or (@eq A u w) (@ex2 A (fun z : A => R u z) (fun z : A => Rstar z w)) *)
(* Goal: forall u : A, or (@eq A u u) (@ex2 A (fun z : A => R u z) (fun z : A => Rstar z u)) *)
auto.
(* Goal: forall (u v w : A) (_ : R u v) (_ : or (@eq A v w) (@ex2 A (fun z : A => R v z) (fun z : A => Rstar z w))), or (@eq A u w) (@ex2 A (fun z : A => R u z) (fun z : A => Rstar z w)) *)
intros u v w R_u_v Hyp.
(* Goal: or (@eq A u w) (@ex2 A (fun z : A => R u z) (fun z : A => Rstar z w)) *)
apply or_intror.
(* Goal: @ex2 A (fun z : A => R u z) (fun z : A => Rstar z w) *)
exists v.
(* Goal: Rstar v w *)
(* Goal: R u v *)
assumption.
(* Goal: Rstar v w *)
elim Hyp.
(* Goal: forall _ : @ex2 A (fun z : A => R v z) (fun z : A => Rstar z w), Rstar v w *)
(* Goal: forall _ : @eq A v w, Rstar v w *)
intro Rew.
(* Goal: forall _ : @ex2 A (fun z : A => R v z) (fun z : A => Rstar z w), Rstar v w *)
(* Goal: Rstar v w *)
rewrite Rew.
(* Goal: forall _ : @ex2 A (fun z : A => R v z) (fun z : A => Rstar z w), Rstar v w *)
(* Goal: Rstar w w *)
apply Rstar_reflexive.
(* Goal: forall _ : @ex2 A (fun z : A => R v z) (fun z : A => Rstar z w), Rstar v w *)
intro temp; elim temp; clear temp.
(* Goal: forall (x : A) (_ : R v x) (_ : Rstar x w), Rstar v w *)
intros z R_v_z Rstar_z_w.
(* Goal: Rstar v w *)
apply Rstar_R with z; assumption.
Qed.
End Relations.
Hint Resolve Rstar_reflexive. |
Require Import securite.
Lemma POinv1rel7 :
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) ->
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) ->
inv1
(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)) (_ : 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)), inv1 (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)) (_ : 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)), inv1 (ABSI (MBNaKab d18 d19 d20 k2) (MANbKabCaCb d15 d16 d17 k1 c1 c2) (MABNaNbKeyK d10 d11 d12 d13 d14) l0) *)
unfold inv0, inv1, rel7 in |- *; intros know_c_c0_l know_Kas_Kbs and1.
(* Goal: and (not (known_in (B2C (K2B (KeyX Aid))) (@app C l0 rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C l0 rngDDKKeyAB))) *)
elim know_c_c0_l; intros know_c_l know_c0_l.
(* Goal: and (not (known_in (B2C (K2B (KeyX Aid))) (@app C l0 rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C l0 rngDDKKeyAB))) *)
elim know_Kas_Kbs; intros know_Kas know_Kbs.
(* Goal: and (not (known_in (B2C (K2B (KeyX Aid))) (@app C l0 rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C l0 rngDDKKeyAB))) *)
elim and1; intros eq_l0 t1.
(* Goal: and (not (known_in (B2C (K2B (KeyX Aid))) (@app C l0 rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C l0 rngDDKKeyAB))) *)
clear know_c_c0_l know_Kas_Kbs and1 t1.
(* Goal: and (not (known_in (B2C (K2B (KeyX Aid))) (@app C l0 rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C l0 rngDDKKeyAB))) *)
rewrite eq_l0.
(* Goal: and (not (known_in (B2C (K2B (KeyX Aid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB))) (not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB))) *)
split.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not (known_in (B2C (K2B (KeyX Aid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
apply D2.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB) *)
simpl in |- *.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C (Pair (B2C (D2B d4)) c0) (@app C l rngDDKKeyAB)) *)
repeat apply C2 || apply C3 || apply C4.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d4))) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@cons C c0 (@app C l rngDDKKeyAB)) *)
apply equivncomp with (l ++ rngDDKKeyAB).
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d4))) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C l rngDDKKeyAB) *)
(* Goal: equivS (@app C l rngDDKKeyAB) (@cons C c0 (@app C l rngDDKKeyAB)) *)
apply equivS3.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d4))) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C l rngDDKKeyAB) *)
(* Goal: equivS (@cons C c0 (@app C l rngDDKKeyAB)) (@app C l rngDDKKeyAB) *)
apply AlreadyInb; apply EP0; assumption.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d4))) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Aid))) (@app C l rngDDKKeyAB) *)
apply D1; assumption.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (B2C (D2B d4))) *)
discriminate.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Aid))) (Pair (B2C (D2B d4)) c0)) *)
discriminate.
(* Goal: not (known_in (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB)) *)
apply D2.
(* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C (@cons C (Pair (B2C (D2B d4)) c0) l) rngDDKKeyAB) *)
simpl in |- *.
(* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C (Pair (B2C (D2B d4)) c0) (@app C l rngDDKKeyAB)) *)
repeat apply C2 || apply C3 || apply C4.
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d4))) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@cons C c0 (@app C l rngDDKKeyAB)) *)
apply equivncomp with (l ++ rngDDKKeyAB).
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d4))) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C l rngDDKKeyAB) *)
(* Goal: equivS (@app C l rngDDKKeyAB) (@cons C c0 (@app C l rngDDKKeyAB)) *)
apply equivS3.
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d4))) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C l rngDDKKeyAB) *)
(* Goal: equivS (@cons C c0 (@app C l rngDDKKeyAB)) (@app C l rngDDKKeyAB) *)
apply AlreadyInb; apply EP0; assumption.
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d4))) *)
(* Goal: not_comp_of (B2C (K2B (KeyX Bid))) (@app C l rngDDKKeyAB) *)
apply D1; assumption.
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d4)) c0)) *)
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (B2C (D2B d4))) *)
discriminate.
(* Goal: not (@eq C (B2C (K2B (KeyX Bid))) (Pair (B2C (D2B d4)) c0)) *)
discriminate.
Qed.
|
Set Automatic Coercions Import.
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Z_group.
Section Lemmas.
Variable G : GROUP.
Lemma Z_to_group_nat_eq_pos :
forall (n : Z) (g : G), Equal (Z_to_group_nat_fun g n) (Z_to_group_fun g n).
Proof.
(* Goal: forall (n : Z) (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g n) (@Z_to_group_fun G g n) *)
intros n g; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g n) (@Z_to_group_fun G g n) *)
apply Trans with (Ap (sgroup_map (monoid_sgroup_hom (Z_to_group_nat g))) n); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group_nat G g))) n) (@Z_to_group_fun G g n) *)
apply Sym.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_fun G g n) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group_nat G g))) n) *)
apply Z_to_group_fun_eq.
Qed.
Hint Resolve Z_to_group_nat_eq_pos: algebra.
Lemma Zopp1 : forall n : Z, (n < 0)%Z -> (- n > 0)%Z.
Proof.
(* Goal: forall (n : Z) (_ : Z.lt n Z0), Z.gt (Z.opp n) Z0 *)
simple induction n.
(* Goal: forall (p : positive) (_ : Z.lt (Zneg p) Z0), Z.gt (Z.opp (Zneg p)) Z0 *)
(* Goal: forall (p : positive) (_ : Z.lt (Zpos p) Z0), Z.gt (Z.opp (Zpos p)) Z0 *)
(* Goal: forall _ : Z.lt Z0 Z0, Z.gt (Z.opp Z0) Z0 *)
intros H'; try assumption.
(* Goal: forall (p : positive) (_ : Z.lt (Zneg p) Z0), Z.gt (Z.opp (Zneg p)) Z0 *)
(* Goal: forall (p : positive) (_ : Z.lt (Zpos p) Z0), Z.gt (Z.opp (Zpos p)) Z0 *)
(* Goal: Z.gt (Z.opp Z0) Z0 *)
inversion H'.
(* Goal: forall (p : positive) (_ : Z.lt (Zneg p) Z0), Z.gt (Z.opp (Zneg p)) Z0 *)
(* Goal: forall (p : positive) (_ : Z.lt (Zpos p) Z0), Z.gt (Z.opp (Zpos p)) Z0 *)
intros p H'; try assumption.
(* Goal: forall (p : positive) (_ : Z.lt (Zneg p) Z0), Z.gt (Z.opp (Zneg p)) Z0 *)
(* Goal: Z.gt (Z.opp (Zpos p)) Z0 *)
replace 0%Z with (- (0))%Z.
(* Goal: forall (p : positive) (_ : Z.lt (Zneg p) Z0), Z.gt (Z.opp (Zneg p)) Z0 *)
(* Goal: @eq Z (Z.opp Z0) Z0 *)
(* Goal: Z.gt (Z.opp (Zpos p)) (Z.opp Z0) *)
apply Zlt_gt; auto with algebra.
(* Goal: forall (p : positive) (_ : Z.lt (Zneg p) Z0), Z.gt (Z.opp (Zneg p)) Z0 *)
(* Goal: @eq Z (Z.opp Z0) Z0 *)
auto with algebra.
(* Goal: forall (p : positive) (_ : Z.lt (Zneg p) Z0), Z.gt (Z.opp (Zneg p)) Z0 *)
intros p H'; try assumption.
(* Goal: Z.gt (Z.opp (Zneg p)) Z0 *)
replace 0%Z with (- (0))%Z.
(* Goal: @eq Z (Z.opp Z0) Z0 *)
(* Goal: Z.gt (Z.opp (Zneg p)) (Z.opp Z0) *)
apply Zlt_gt; auto with algebra.
(* Goal: @eq Z (Z.opp Z0) Z0 *)
auto with algebra.
Qed.
Hint Resolve Zopp1: algebra.
Lemma Zopp2 : forall n : Z, (n > 0)%Z -> (- n < 0)%Z.
Proof.
(* Goal: forall (n : Z) (_ : Z.gt n Z0), Z.lt (Z.opp n) Z0 *)
simple induction n.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), Z.lt (Z.opp (Zneg p)) Z0 *)
(* Goal: forall (p : positive) (_ : Z.gt (Zpos p) Z0), Z.lt (Z.opp (Zpos p)) Z0 *)
(* Goal: forall _ : Z.gt Z0 Z0, Z.lt (Z.opp Z0) Z0 *)
intros H'; try assumption.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), Z.lt (Z.opp (Zneg p)) Z0 *)
(* Goal: forall (p : positive) (_ : Z.gt (Zpos p) Z0), Z.lt (Z.opp (Zpos p)) Z0 *)
(* Goal: Z.lt (Z.opp Z0) Z0 *)
inversion H'.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), Z.lt (Z.opp (Zneg p)) Z0 *)
(* Goal: forall (p : positive) (_ : Z.gt (Zpos p) Z0), Z.lt (Z.opp (Zpos p)) Z0 *)
intros p H'; try assumption.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), Z.lt (Z.opp (Zneg p)) Z0 *)
(* Goal: Z.lt (Z.opp (Zpos p)) Z0 *)
replace 0%Z with (- (0))%Z.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), Z.lt (Z.opp (Zneg p)) Z0 *)
(* Goal: @eq Z (Z.opp Z0) Z0 *)
(* Goal: Z.lt (Z.opp (Zpos p)) (Z.opp Z0) *)
apply Zgt_lt; auto with algebra.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), Z.lt (Z.opp (Zneg p)) Z0 *)
(* Goal: @eq Z (Z.opp Z0) Z0 *)
auto with algebra.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), Z.lt (Z.opp (Zneg p)) Z0 *)
intros p H'; try assumption.
(* Goal: Z.lt (Z.opp (Zneg p)) Z0 *)
replace 0%Z with (- (0))%Z.
(* Goal: @eq Z (Z.opp Z0) Z0 *)
(* Goal: Z.lt (Z.opp (Zneg p)) (Z.opp Z0) *)
apply Zgt_lt; auto with algebra.
(* Goal: @eq Z (Z.opp Z0) Z0 *)
auto with algebra.
Qed.
Hint Resolve Zopp2: algebra.
Lemma pos_abs_comp :
forall (x : Z) (p p' : (x > 0)%Z), pos_abs p = pos_abs p'.
Proof.
(* Goal: forall (x : Z) (p p' : Z.gt x Z0), @eq positive (@pos_abs x p) (@pos_abs x p') *)
intros x; try assumption.
(* Goal: forall p p' : Z.gt x Z0, @eq positive (@pos_abs x p) (@pos_abs x p') *)
elim x.
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zneg p) Z0), @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zpos p) Z0), @eq positive (@pos_abs (Zpos p) p0) (@pos_abs (Zpos p) p') *)
(* Goal: forall p p' : Z.gt Z0 Z0, @eq positive (@pos_abs Z0 p) (@pos_abs Z0 p') *)
intros p p'; try assumption.
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zneg p) Z0), @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zpos p) Z0), @eq positive (@pos_abs (Zpos p) p0) (@pos_abs (Zpos p) p') *)
(* Goal: @eq positive (@pos_abs Z0 p) (@pos_abs Z0 p') *)
red in p'.
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zneg p) Z0), @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zpos p) Z0), @eq positive (@pos_abs (Zpos p) p0) (@pos_abs (Zpos p) p') *)
(* Goal: @eq positive (@pos_abs Z0 p) (@pos_abs Z0 p') *)
inversion p.
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zneg p) Z0), @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zpos p) Z0), @eq positive (@pos_abs (Zpos p) p0) (@pos_abs (Zpos p) p') *)
intros p p0 p'; simpl in |- *.
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zneg p) Z0), @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
(* Goal: @eq positive p p *)
auto with algebra.
(* Goal: forall (p : positive) (p0 p' : Z.gt (Zneg p) Z0), @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
intros p p0 p'; try assumption.
(* Goal: @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
red in p'.
(* Goal: @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
simpl in p'.
(* Goal: @eq positive (@pos_abs (Zneg p) p0) (@pos_abs (Zneg p) p') *)
inversion p'.
Qed.
Hint Resolve Zl2 Zl1 Zl3 nat_to_group_inverse: algebra.
Lemma nat_to_group_comp :
forall (r r' : G) (n : nat),
Equal r r' -> Equal (nat_to_group r n) (nat_to_group r' n).
Proof.
(* Goal: forall (r r' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n : nat) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r r'), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r n) (@nat_to_group G r' n) *)
simple induction n; simpl in |- *; auto with algebra.
Qed.
Hint Resolve nat_to_group_comp: algebra.
Lemma Z_to_group_nat_fun_comp :
forall (r r' : G) (n : Z),
Equal r r' -> Equal (Z_to_group_nat_fun r n) (Z_to_group_nat_fun r' n).
Proof.
(* Goal: forall (r r' : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n : Z) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r r'), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r n) (@Z_to_group_nat_fun G r' n) *)
intros r r' n H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r n) (@Z_to_group_nat_fun G r' n) *)
elim n.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G r' (Zneg p)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zpos p)) (@Z_to_group_nat_fun G r' (Zpos p)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r Z0) (@Z_to_group_nat_fun G r' Z0) *)
apply Trans with (monoid_unit G); auto with algebra.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G r' (Zneg p)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zpos p)) (@Z_to_group_nat_fun G r' (Zpos p)) *)
intros p; try assumption.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G r' (Zneg p)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zpos p)) (@Z_to_group_nat_fun G r' (Zpos p)) *)
apply Trans with (nat_to_group r (nat_of_P (pos_abs (ax3 p)))); auto with algebra.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G r' (Zneg p)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) (@Z_to_group_nat_fun G r' (Zpos p)) *)
apply Trans with (nat_to_group r' (nat_of_P (pos_abs (ax3 p)))); auto with algebra.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G r' (Zneg p)) *)
intros p; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G r' (Zneg p)) *)
apply Trans with (group_inverse G (nat_to_group r (nat_of_P (pos_abs (ax3 p))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (@nat_to_group G r (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) (@Z_to_group_nat_fun G r' (Zneg p)) *)
apply Trans with (group_inverse G (nat_to_group r' (nat_of_P (pos_abs (ax3 p))))); auto with algebra.
Qed.
Hint Resolve Z_to_group_nat_fun_comp: algebra.
Lemma Z_to_group_nat_neg :
forall (p : positive) (r : G),
Equal (Z_to_group_nat_fun r (Zneg p))
(Z_to_group_nat_fun (group_inverse G r) (Zpos p)).
Proof.
(* Goal: forall (p : positive) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zpos p)) *)
intros p r; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zpos p)) *)
apply Trans with (group_inverse G (nat_to_group r (nat_of_P (pos_abs (ax3 p))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (@nat_to_group G r (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) (@Z_to_group_nat_fun G (group_inverse G r) (Zpos p)) *)
apply Trans with (nat_to_group (group_inverse G r) (nat_of_P (pos_abs (ax3 p)))); auto with algebra.
Qed.
Hint Resolve Z_to_group_nat_neg: algebra.
Lemma Z_to_group_nat_inv :
forall (n : Z) (r : G),
Equal (Z_to_group_nat_fun r (- n)%Z)
(Z_to_group_nat_fun (group_inverse G r) n).
Proof.
(* Goal: forall (n : Z) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Z.opp n)) (@Z_to_group_nat_fun G (group_inverse G r) n) *)
simple induction n; simpl in |- *.
(* Goal: forall (p : positive) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zpos p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zneg p)) *)
(* Goal: forall (p : positive) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zpos p)) *)
(* Goal: forall r : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r Z0) (@Z_to_group_nat_fun G (group_inverse G r) Z0) *)
intros r; try assumption.
(* Goal: forall (p : positive) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zpos p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zneg p)) *)
(* Goal: forall (p : positive) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zpos p)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r Z0) (@Z_to_group_nat_fun G (group_inverse G r) Z0) *)
apply Trans with (monoid_unit G); auto with algebra.
(* Goal: forall (p : positive) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zpos p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zneg p)) *)
(* Goal: forall (p : positive) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zneg p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zpos p)) *)
auto with algebra.
(* Goal: forall (p : positive) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zpos p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zneg p)) *)
intros p r; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G r (Zpos p)) (@Z_to_group_nat_fun G (group_inverse G r) (Zneg p)) *)
apply Trans with (Z_to_group_nat_fun (group_inverse G (group_inverse G r)) (Zpos p)); auto with algebra.
Qed.
Hint Resolve Z_to_group_nat_inv: algebra.
Lemma nat_to_group_mult :
forall (r : G) (n m : nat),
Equal (nat_to_group r (n * m)) (nat_to_group (nat_to_group r n) m).
Proof.
(* Goal: forall (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Init.Nat.mul n m)) (@nat_to_group G (@nat_to_group G r n) m) *)
simple induction m; simpl in |- *.
(* Goal: forall (n0 : nat) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Init.Nat.mul n n0)) (@nat_to_group G (@nat_to_group G r n) n0)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Init.Nat.mul n (S n0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@nat_to_group G r n) n0) (@nat_to_group G r n)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Init.Nat.mul n O)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
rewrite mult_comm; simpl in |- *; auto with algebra.
(* Goal: forall (n0 : nat) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Init.Nat.mul n n0)) (@nat_to_group G (@nat_to_group G r n) n0)), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Init.Nat.mul n (S n0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@nat_to_group G r n) n0) (@nat_to_group G r n)) *)
intros n0 H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Init.Nat.mul n (S n0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@nat_to_group G r n) n0) (@nat_to_group G r n)) *)
rewrite mult_comm; simpl in |- *; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Nat.add n (Nat.mul n0 n))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@nat_to_group G r n) n0) (@nat_to_group G r n)) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Nat.add n (Nat.mul n0 n))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@nat_to_group G r n) n0) (@nat_to_group G r n)) *)
apply Trans with (sgroup_law G (nat_to_group r n) (nat_to_group r (n0 * n))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G r n) (@nat_to_group G r (Init.Nat.mul n0 n))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@nat_to_group G r n) n0) (@nat_to_group G r n)) *)
apply Trans with (sgroup_law G (nat_to_group r (n0 * n)) (nat_to_group r n)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G r (Init.Nat.mul n0 n)) (@nat_to_group G r n)) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@nat_to_group G r n) n0) (@nat_to_group G r n)) *)
apply SGROUP_comp; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G r (Init.Nat.mul n0 n)) (@nat_to_group G (@nat_to_group G r n) n0) *)
rewrite mult_comm; simpl in |- *; auto with algebra.
Qed.
Hint Resolve nat_to_group_mult: algebra.
Lemma nat_to_group_unit :
forall n : nat, Equal (nat_to_group (monoid_unit G) n) (monoid_unit G).
Proof.
(* Goal: forall n : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) n) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
simple induction n; simpl in |- *; auto with algebra.
(* Goal: forall (n : nat) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) n) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) n) (@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))) *)
intros n0 H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) n0) (@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))) *)
apply Trans with (sgroup_law G (monoid_unit G) (monoid_unit G)); auto with algebra.
Qed.
Hint Resolve nat_to_group_unit: algebra.
Lemma Z_to_group_nat_unit :
forall n : Z, Equal (Z_to_group_nat_fun (monoid_unit G) n) (monoid_unit G).
Proof.
(* Goal: forall n : Z, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) n) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
simple induction n; simpl in |- *; auto with algebra.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (Zneg p)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (Zpos p)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
intros p; try assumption.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (Zneg p)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (Zpos p)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
apply Trans with (nat_to_group (monoid_unit G) (nat_of_P (pos_abs (ax3 p)))); auto with algebra.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (Zneg p)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
intros p; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (Zneg p)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
apply Trans with (group_inverse G (nat_to_group (monoid_unit G) (nat_of_P (pos_abs (ax3 p))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (@nat_to_group G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
apply Trans with (group_inverse G (monoid_unit G)); auto with algebra.
Qed.
Hint Resolve Z_to_group_nat_unit: algebra.
Lemma group_power_plus :
forall (g : G) (n m : ZZ),
Equal (group_power G g (sgroup_law ZZ n m))
(sgroup_law G (group_power G g n) (group_power G g m)).
Proof.
(* Goal: forall (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n m : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) n m)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_power G g n) (group_power G g m)) *)
unfold group_power in |- *; auto with algebra.
Qed.
Hint Resolve group_power_plus: algebra.
Lemma group_power_S :
forall (g : G) (n : ZZ),
Equal (group_power G g (sgroup_law ZZ n (ring_unit ZZ)))
(sgroup_law G (group_power G g n) g).
Proof.
(* Goal: forall (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) n (ring_unit (cring_ring (idomain_ring ZZ))))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_power G g n) g) *)
unfold group_power in |- *.
(* Goal: forall (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) n (ring_unit (cring_ring (idomain_ring ZZ))))) (sgroup_law (monoid_sgroup (group_monoid G)) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) n) g) *)
simpl in |- *.
(* Goal: forall (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n : Z), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_fun G g (sgroup_law (@sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) n (ring_unit Zr_aux))) (sgroup_law (monoid_sgroup (group_monoid G)) (@Z_to_group_fun G g n) g) *)
intros g n; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_fun G g (sgroup_law (@sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) n (ring_unit Zr_aux))) (sgroup_law (monoid_sgroup (group_monoid G)) (@Z_to_group_fun G g n) g) *)
apply Trans with (sgroup_law G (Z_to_group_fun g n) (Z_to_group_fun g (ring_unit Zr))); auto with algebra.
Qed.
Hint Resolve group_power_S: algebra.
Lemma group_power_0 :
forall g : G, Equal (group_power G g (monoid_unit ZZ)) (monoid_unit G).
Proof.
(* Goal: forall g : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
unfold group_power in |- *.
(* Goal: forall g : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
simpl in |- *.
(* Goal: forall g : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_fun G g Z0) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
intros g; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_fun G g Z0) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
apply Trans with (Z_to_group_nat_fun g 0%Z); auto with algebra.
Qed.
Hint Resolve group_power_0: algebra.
Lemma group_power_1 : forall g : G, Equal (group_power G g (ring_unit ZZ)) g.
Proof.
(* Goal: forall g : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (ring_unit (cring_ring (idomain_ring ZZ)))) g *)
intros g; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (ring_unit (cring_ring (idomain_ring ZZ)))) g *)
apply Trans with (group_power G g (sgroup_law ZZ (monoid_unit ZZ) (ring_unit ZZ))); auto with algebra.
Qed.
Hint Resolve group_power_1: algebra.
Lemma group_power_inv :
forall (g : G) (n : ZZ),
Equal (group_power G g (group_inverse ZZ n))
(group_power G (group_inverse G g) n).
Proof.
(* Goal: forall (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))) n)) (group_power G (group_inverse G g) n) *)
unfold group_power in |- *.
(* Goal: forall (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))) n)) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G (group_inverse G g)))) n) *)
intros g n; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))) n)) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G (group_inverse G g)))) n) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_fun G g (group_inverse (@Group_util.G (Leibnitz_set Z) Z.add Z0 Z.opp (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z))) (fun x : Z => @eq_ind_r Z x (fun z : Z => @eq Z z x) (@eq_refl Z x) (Z.add x Z0) (Z.add_0_r x)) (fun (x y : Z) (H' : @eq Z x y) => @eq_ind_r Z y (fun x0 : Z => @eq Z (Z.opp x0) (Z.opp y)) (@eq_refl Z (Z.opp y)) x H') (fun x : Z => @eq_ind_r Z Z0 (fun z : Z => @eq Z z Z0) (@eq_refl Z Z0) (Z.add x (Z.opp x)) (Z.add_opp_diag_r x))) n)) (@Z_to_group_fun G (group_inverse G g) n) *)
apply Trans with (Z_to_group_nat_fun g (group_inverse ZZ n)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (group_inverse (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))) n)) (@Z_to_group_fun G (group_inverse G g) n) *)
apply Trans with (Z_to_group_nat_fun (group_inverse G g) n); auto with algebra.
Qed.
Hint Resolve group_power_inv: algebra.
Lemma Z_group_nat_fun_mult_pos :
forall (p q : positive) (g : G),
Equal (Z_to_group_nat_fun g (Zpos p * Zpos q)%Z)
(Z_to_group_nat_fun (Z_to_group_nat_fun g (Zpos p)) (Zpos q)).
Proof.
(* Goal: forall (p q : positive) (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zpos q))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos q)) *)
simpl in |- *.
(* Goal: forall (p q : positive) (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Zpos (Pos.mul p q))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos q)) *)
intros p q g; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Zpos (Pos.mul p q))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos q)) *)
apply Trans with (nat_to_group g (nat_of_P (pos_abs (ax3 ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) p (fun y : positive => y) q))))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G g (Pos.to_nat (@pos_abs (Zpos (Pos.mul p q)) (ax3 (Pos.mul p q))))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos q)) *)
apply Trans with (nat_to_group (Z_to_group_nat_fun g (Zpos p)) (nat_of_P (pos_abs (ax3 q)))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G g (Pos.to_nat (@pos_abs (Zpos (Pos.mul p q)) (ax3 (Pos.mul p q))))) (@nat_to_group G (@Z_to_group_nat_fun G g (Zpos p)) (Pos.to_nat (@pos_abs (Zpos q) (ax3 q)))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G g (Pos.to_nat (Pos.mul p q))) (@nat_to_group G (@Z_to_group_nat_fun G g (Zpos p)) (Pos.to_nat q)) *)
rewrite (fun (x y : positive) (_ : positive -> positive) => nat_of_P_mult_morphism x y).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@nat_to_group G g (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat q))) (@nat_to_group G (@Z_to_group_nat_fun G g (Zpos p)) (Pos.to_nat q)) *)
apply Trans with (nat_to_group (nat_to_group g (nat_of_P p)) (nat_of_P q)); auto with algebra.
Qed.
Hint Resolve Z_group_nat_fun_mult_pos: algebra.
Lemma group_power_mult :
forall (g : G) (n m : ZZ),
Equal (group_power G g (ring_mult n m))
(group_power G (group_power G g n) m).
Proof.
(* Goal: forall (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n m : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (@ring_mult (cring_ring (idomain_ring ZZ)) n m)) (group_power G (group_power G g n) m) *)
unfold group_power in |- *.
(* Goal: forall (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n m : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) (@ring_mult (cring_ring (idomain_ring ZZ)) n m)) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) n)))) m) *)
intros g n m; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) (@ring_mult (cring_ring (idomain_ring ZZ)) n m)) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) n)))) m) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_fun G g (@ring_mult Zr_aux n m)) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
apply Trans with (Z_to_group_nat_fun g (ring_mult n m)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (@ring_mult (cring_ring (idomain_ring ZZ)) n m)) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
apply Trans with (Z_to_group_nat_fun (Z_to_group_nat_fun g n) m); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (@ring_mult (cring_ring (idomain_ring ZZ)) n m)) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) *)
unfold ring_mult in |- *; simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n m)) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) *)
elim m.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zpos p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zpos p)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n Z0)) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) Z0) *)
rewrite Zmult_0_r.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zpos p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zpos p)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g Z0) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) Z0) *)
apply Trans with (monoid_unit G); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zpos p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zpos p)) *)
elim n.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zpos p0)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos p0)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul Z0 (Zpos p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g Z0) (Zpos p)) *)
intros p; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zpos p0)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul Z0 (Zpos p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g Z0) (Zpos p)) *)
rewrite Zmult_0_l.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zpos p0)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g Z0) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g Z0) (Zpos p)) *)
apply Trans with (Z_to_group_nat_fun (monoid_unit G) (Zpos p)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zpos p0)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos p0)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zpos p0)) *)
intros p p0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zpos p0)) *)
replace (Zneg p * Zpos p0)%Z with (- (Zpos p * Zpos p0))%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zneg p) (Zpos p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.opp (Z.mul (Zpos p) (Zpos p0)))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zpos p0)) *)
apply Trans with (Z_to_group_nat_fun (group_inverse G g) (Zpos p * Zpos p0)%Z); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zneg p) (Zpos p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (group_inverse G g) (Z.mul (Zpos p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zpos p0)) *)
apply Trans with (Z_to_group_nat_fun (Z_to_group_nat_fun (group_inverse G g) (Zpos p)) (Zpos p0)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zneg p) (Zpos p0)) *)
rewrite <- Zopp_mult_distr_l_reverse.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
(* Goal: @eq Z (Z.mul (Z.opp (Zpos p)) (Zpos p0)) (Z.mul (Zneg p) (Zpos p0)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul n (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) (Zneg p)) *)
elim n.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zneg p0)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul Z0 (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g Z0) (Zneg p)) *)
intros p; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul Z0 (Zneg p))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g Z0) (Zneg p)) *)
rewrite Zmult_0_l.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g Z0) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g Z0) (Zneg p)) *)
apply Trans with (Z_to_group_nat_fun (monoid_unit G) (Zneg p)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zneg p0)) *)
intros p p0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zneg p0)) *)
replace (Zpos p * Zneg p0)%Z with (- (Zpos p * Zpos p0))%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.opp (Z.mul (Zpos p) (Zpos p0)))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zneg p0)) *)
apply Trans with (Z_to_group_nat_fun (group_inverse G g) (Zpos p * Zpos p0)%Z); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (group_inverse G g) (Z.mul (Zpos p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zneg p0)) *)
apply Trans with (Z_to_group_nat_fun (group_inverse G (Z_to_group_nat_fun g (Zpos p))) (Zpos p0)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (group_inverse G g) (Z.mul (Zpos p) (Zpos p0))) (@Z_to_group_nat_fun G (group_inverse G (@Z_to_group_nat_fun G g (Zpos p))) (Zpos p0)) *)
apply Trans with (Z_to_group_nat_fun (Z_to_group_nat_fun (group_inverse G g) (Zpos p)) (Zpos p0)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G (group_inverse G g) (Zpos p)) (Zpos p0)) (@Z_to_group_nat_fun G (group_inverse G (@Z_to_group_nat_fun G g (Zpos p))) (Zpos p0)) *)
apply Z_to_group_nat_fun_comp; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (group_inverse G g) (Zpos p)) (group_inverse G (@Z_to_group_nat_fun G g (Zpos p))) *)
apply Trans with (Z_to_group_nat_fun g (Zneg p)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
replace (Zpos p) with (- Zneg p)%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zneg p)) (Zpos p) *)
(* Goal: @eq Z (Z.opp (Z.mul (Z.opp (Zneg p)) (Zpos p0))) (Z.mul (Z.opp (Zneg p)) (Zneg p0)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zneg p)) (Zpos p) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
intros p p0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zneg p) (Zneg p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
replace (Zneg p * Zneg p0)%Z with (- (Zpos p * Zneg p0))%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.opp (Z.mul (Zpos p) (Zneg p0)))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
replace (Zpos p * Zneg p0)%Z with (- (Zpos p * Zpos p0))%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0))))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
replace (- - (Zpos p * Zpos p0))%Z with (Zpos p * Zpos p0)%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Z.mul (Zpos p) (Zpos p0))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
apply Trans with (Z_to_group_nat_fun (Z_to_group_nat_fun g (Zpos p)) (Zpos p0)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos p0)) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zneg p)) (Zneg p0)) *)
apply Trans with (Z_to_group_nat_fun (group_inverse G (Z_to_group_nat_fun g (Zneg p))) (Zpos p0)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g (Zpos p)) (Zpos p0)) (@Z_to_group_nat_fun G (group_inverse G (@Z_to_group_nat_fun G g (Zneg p))) (Zpos p0)) *)
apply Z_to_group_nat_fun_comp; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G g (Zpos p)) (group_inverse G (@Z_to_group_nat_fun G g (Zneg p))) *)
apply Trans with (group_power G g (Zpos p)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (Zpos p)) (group_inverse G (@Z_to_group_nat_fun G g (Zneg p))) *)
apply Trans with (group_inverse G (group_power G g (Zneg p))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (Zpos p)) (group_inverse G (group_power G g (Zneg p))) *)
apply Sym.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (group_power G g (Zneg p))) (group_power G g (Zpos p)) *)
apply GROUP_law_inverse.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_power G g (Zneg p)) (group_power G g (Zpos p))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
apply Trans with (group_power G g (Zneg p + Zpos p)%Z); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (Z.add (Zneg p) (Zpos p))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
replace (Zneg p) with (- Zpos p)%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @eq Z (Z.opp (Zpos p)) (Zneg p) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g (Z.add (Z.opp (Zpos p)) (Zpos p))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
rewrite Zplus_opp_l.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @eq Z (Z.opp (Zpos p)) (Zneg p) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g Z0) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
(* Goal: @eq Z (Z.opp (Zpos p)) (Zneg p) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Zpos p0)) (Z.opp (Z.opp (Z.mul (Zpos p) (Zpos p0)))) *)
rewrite Zopp_involutive; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Zneg p0)) *)
replace (Zneg p0) with (- Zpos p0)%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zpos p0)) (Zneg p0) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Zpos p) (Z.opp (Zpos p0))) *)
replace (Zpos p * - Zpos p0)%Z with (- Zpos p0 * Zpos p)%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zpos p0)) (Zneg p0) *)
(* Goal: @eq Z (Z.mul (Z.opp (Zpos p0)) (Zpos p)) (Z.mul (Zpos p) (Z.opp (Zpos p0))) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.mul (Z.opp (Zpos p0)) (Zpos p)) *)
rewrite Zopp_mult_distr_l_reverse.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zpos p0)) (Zneg p0) *)
(* Goal: @eq Z (Z.mul (Z.opp (Zpos p0)) (Zpos p)) (Z.mul (Zpos p) (Z.opp (Zpos p0))) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zpos p0))) (Z.opp (Z.mul (Zpos p0) (Zpos p))) *)
rewrite Zmult_comm.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zpos p0)) (Zneg p0) *)
(* Goal: @eq Z (Z.mul (Z.opp (Zpos p0)) (Zpos p)) (Z.mul (Zpos p) (Z.opp (Zpos p0))) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p0) (Zpos p))) (Z.opp (Z.mul (Zpos p0) (Zpos p))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zpos p0)) (Zneg p0) *)
(* Goal: @eq Z (Z.mul (Z.opp (Zpos p0)) (Zpos p)) (Z.mul (Zpos p) (Z.opp (Zpos p0))) *)
rewrite Zmult_comm.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zpos p0)) (Zneg p0) *)
(* Goal: @eq Z (Z.mul (Zpos p) (Z.opp (Zpos p0))) (Z.mul (Zpos p) (Z.opp (Zpos p0))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
(* Goal: @eq Z (Z.opp (Zpos p0)) (Zneg p0) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Zneg p) (Zneg p0)) *)
replace (Zneg p) with (- Zpos p)%Z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Zpos p)) (Zneg p) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.mul (Z.opp (Zpos p)) (Zneg p0)) *)
rewrite Zopp_mult_distr_l_reverse.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Zpos p)) (Zneg p) *)
(* Goal: @eq Z (Z.opp (Z.mul (Zpos p) (Zneg p0))) (Z.opp (Z.mul (Zpos p) (Zneg p0))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
(* Goal: @eq Z (Z.opp (Zpos p)) (Zneg p) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Z_to_group_nat_fun G (@Z_to_group_nat_fun G g n) m) (@Z_to_group_fun G (@Z_to_group_fun G g n) m) *)
apply Trans with (Z_to_group_nat_fun (Z_to_group_fun g n) m); auto with algebra.
Qed.
Hint Resolve group_power_mult: algebra.
End Lemmas.
Hint Resolve group_power_plus group_power_S group_power_0 group_power_1
group_power_inv group_power_mult: algebra.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_oppositesidesymmetric.
Require Export GeoCoq.Elements.OriginalProofs.proposition_27.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_28A :
forall A B C D E G H,
BetS A G B -> BetS C H D -> BetS E G H -> CongA E G B G H D -> OS B D G H ->
Par A B C D.
Proof.
(* Goal: forall (A B C D E G H : @Point Ax0) (_ : @BetS Ax0 A G B) (_ : @BetS Ax0 C H D) (_ : @BetS Ax0 E G H) (_ : @CongA Ax0 E G B G H D) (_ : @OS Ax0 B D G H), @Par Ax0 A B C D *)
intros.
(* Goal: @Par Ax0 A B C D *)
assert (OS D B G H) by (forward_using lemma_samesidesymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (nCol E G B) by (conclude_def CongA ).
(* Goal: @Par Ax0 A B C D *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: @Par Ax0 A B C D *)
assert (Col G H G) by (conclude_def Col ).
(* Goal: @Par Ax0 A B C D *)
assert (~ Col G H A).
(* Goal: @Par Ax0 A B C D *)
(* Goal: not (@Col Ax0 G H A) *)
{
(* Goal: not (@Col Ax0 G H A) *)
intro.
(* Goal: False *)
assert (Col H G A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col E G H) by (conclude_def Col ).
(* Goal: False *)
assert (Col H G E) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq G H) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq H G) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col G A E) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A G E) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A G B) by (conclude_def Col ).
(* Goal: False *)
assert (neq A G) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col G E B) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col E G B) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @Par Ax0 A B C D *)
}
(* Goal: @Par Ax0 A B C D *)
assert (TS A G H B) by (conclude_def TS ).
(* Goal: @Par Ax0 A B C D *)
assert (TS B G H A) by (conclude lemma_oppositesidesymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (BetS B G A) by (conclude axiom_betweennesssymmetry).
(* Goal: @Par Ax0 A B C D *)
assert (CongA E G B A G H) by (conclude proposition_15a).
(* Goal: @Par Ax0 A B C D *)
assert (CongA A G H E G B) by (conclude lemma_equalanglessymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (CongA A G H G H D) by (conclude lemma_equalanglestransitive).
(* Goal: @Par Ax0 A B C D *)
assert (TS D G H A) by (conclude lemma_planeseparation).
(* Goal: @Par Ax0 A B C D *)
assert (TS A G H D) by (conclude lemma_oppositesidesymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (Par A B C D) by (conclude proposition_27).
(* Goal: @Par Ax0 A B C D *)
close.
Qed.
End Euclid.
|
Require Import Arith.
Require Import Test.
Require Import Terms.
Inductive red1 : lambda -> lambda -> Prop :=
| beta : forall M N : lambda, red1 (App (Abs M) N) (subst N M)
| abs_red : forall M N : lambda, red1 M N -> red1 (Abs M) (Abs N)
| app_red_l :
forall M1 N1 : lambda,
red1 M1 N1 -> forall M2 : lambda, red1 (App M1 M2) (App N1 M2)
| app_red_r :
forall M2 N2 : lambda,
red1 M2 N2 -> forall M1 : lambda, red1 (App M1 M2) (App M1 N2).
Inductive red : lambda -> lambda -> Prop :=
| one_step_red : forall M N : lambda, red1 M N -> red M N
| refl_red : forall M : lambda, red M M
| trans_red : forall M N P : lambda, red M N -> red N P -> red M P.
Lemma red_abs : forall M M' : lambda, red M M' -> red (Abs M) (Abs M').
Proof.
(* Goal: forall (M M' : lambda) (_ : red M M'), red (Abs M) (Abs M') *)
simple induction 1; intros.
(* Goal: red (Abs M0) (Abs P) *)
(* Goal: red (Abs M0) (Abs M0) *)
(* Goal: red (Abs M0) (Abs N) *)
apply one_step_red; apply abs_red; trivial.
(* Goal: red (Abs M0) (Abs P) *)
(* Goal: red (Abs M0) (Abs M0) *)
apply refl_red.
(* Goal: red (Abs M0) (Abs P) *)
apply trans_red with (Abs N); trivial.
Qed.
Lemma red_appl :
forall M M' : lambda,
red M M' -> forall N : lambda, red (App M N) (App M' N).
Proof.
(* Goal: forall (M M' : lambda) (_ : red M M') (N : lambda), red (App M N) (App M' N) *)
simple induction 1; intros.
(* Goal: red (App M0 N0) (App P N0) *)
(* Goal: red (App M0 N) (App M0 N) *)
(* Goal: red (App M0 N0) (App N N0) *)
apply one_step_red; apply app_red_l; trivial.
(* Goal: red (App M0 N0) (App P N0) *)
(* Goal: red (App M0 N) (App M0 N) *)
apply refl_red.
(* Goal: red (App M0 N0) (App P N0) *)
apply trans_red with (App N N0); trivial.
Qed.
Lemma red_appr :
forall M M' : lambda,
red M M' -> forall N : lambda, red (App N M) (App N M').
Proof.
(* Goal: forall (M M' : lambda) (_ : red M M') (N : lambda), red (App N M) (App N M') *)
simple induction 1; intros.
(* Goal: red (App N0 M0) (App N0 P) *)
(* Goal: red (App N M0) (App N M0) *)
(* Goal: red (App N0 M0) (App N0 N) *)
apply one_step_red; apply app_red_r; trivial.
(* Goal: red (App N0 M0) (App N0 P) *)
(* Goal: red (App N M0) (App N M0) *)
apply refl_red.
(* Goal: red (App N0 M0) (App N0 P) *)
apply trans_red with (App N0 N); trivial.
Qed.
Lemma red_app :
forall M M' N N' : lambda, red M M' -> red N N' -> red (App M N) (App M' N').
Proof.
(* Goal: forall (M M' N N' : lambda) (_ : red M M') (_ : red N N'), red (App M N) (App M' N') *)
intros; apply trans_red with (App M' N).
(* Goal: red (App M' N) (App M' N') *)
(* Goal: red (App M N) (App M' N) *)
apply red_appl; trivial.
(* Goal: red (App M' N) (App M' N') *)
apply red_appr; trivial.
Qed.
Lemma red_beta :
forall M M' N N' : lambda,
red M M' -> red N N' -> red (App (Abs M) N) (subst N' M').
Proof.
(* Goal: forall (M M' N N' : lambda) (_ : red M M') (_ : red N N'), red (App (Abs M) N) (subst N' M') *)
intros; apply trans_red with (App (Abs M') N').
(* Goal: red (App (Abs M') N') (subst N' M') *)
(* Goal: red (App (Abs M) N) (App (Abs M') N') *)
apply red_app; trivial.
(* Goal: red (App (Abs M') N') (subst N' M') *)
(* Goal: red (Abs M) (Abs M') *)
apply red_abs; trivial.
(* Goal: red (App (Abs M') N') (subst N' M') *)
apply one_step_red; apply beta.
Qed.
Inductive par_red1 : lambda -> lambda -> Prop :=
| par_beta :
forall M M' : lambda,
par_red1 M M' ->
forall N N' : lambda,
par_red1 N N' -> par_red1 (App (Abs M) N) (subst N' M')
| ref_par_red : forall n : nat, par_red1 (Ref n) (Ref n)
| abs_par_red :
forall M M' : lambda, par_red1 M M' -> par_red1 (Abs M) (Abs M')
| app_par_red :
forall M M' : lambda,
par_red1 M M' ->
forall N N' : lambda, par_red1 N N' -> par_red1 (App M N) (App M' N').
Hint Resolve par_beta ref_par_red abs_par_red app_par_red.
Lemma refl_par_red1 : forall M : lambda, par_red1 M M.
Proof.
(* Goal: forall M : lambda, par_red1 M M *)
simple induction M; auto.
Qed.
Hint Resolve refl_par_red1.
Lemma red1_par_red1 : forall M N : lambda, red1 M N -> par_red1 M N.
Proof.
(* Goal: forall (M N : lambda) (_ : red1 M N), par_red1 M N *)
simple induction 1; auto.
Qed.
Inductive par_red : lambda -> lambda -> Prop :=
| one_step_par_red : forall M N : lambda, par_red1 M N -> par_red M N
| trans_par_red :
forall M N P : lambda, par_red M N -> par_red N P -> par_red M P.
Lemma red_par_red : forall M N : lambda, red M N -> par_red M N.
Proof.
(* Goal: forall (M N : lambda) (_ : red M N), par_red M N *)
simple induction 1; intros.
(* Goal: par_red M0 P *)
(* Goal: par_red M0 M0 *)
(* Goal: par_red M0 N0 *)
apply one_step_par_red; apply red1_par_red1; trivial.
(* Goal: par_red M0 P *)
(* Goal: par_red M0 M0 *)
apply one_step_par_red; auto.
(* Goal: par_red M0 P *)
apply trans_par_red with N0; trivial.
Qed.
Lemma par_red_red : forall M N : lambda, par_red M N -> red M N.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrfun ssrbool eqtype ssrnat div seq choice tuple.
From mathcomp
Require Import bigop ssralg poly polydiv generic_quotient.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GRing.Theory.
Local Open Scope ring_scope.
Local Open Scope quotient_scope.
Reserved Notation "{ 'ratio' T }" (at level 0, format "{ 'ratio' T }").
Reserved Notation "{ 'fraction' T }" (at level 0, format "{ 'fraction' T }").
Reserved Notation "x %:F" (at level 2, format "x %:F").
Section FracDomain.
Variable R : ringType.
Inductive ratio := mkRatio { frac :> R * R; _ : frac.2 != 0 }.
Definition ratio_of of phant R := ratio.
Local Notation "{ 'ratio' T }" := (ratio_of (Phant T)).
Canonical ratio_subType := Eval hnf in [subType for frac].
Canonical ratio_of_subType := Eval hnf in [subType of {ratio R}].
Definition ratio_EqMixin := [eqMixin of ratio by <:].
Canonical ratio_eqType := EqType ratio ratio_EqMixin.
Canonical ratio_of_eqType := Eval hnf in [eqType of {ratio R}].
Definition ratio_ChoiceMixin := [choiceMixin of ratio by <:].
Definition ratio0 := (@mkRatio (0, 1) (oner_neq0 _)).
Definition Ratio x y : {ratio R} := insubd ratio0 (x, y).
Lemma numer_Ratio x y : y != 0 -> (Ratio x y).1 = x.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) y (GRing.zero (GRing.Ring.zmodType R)))), @eq (GRing.Ring.sort R) (@fst (GRing.Ring.sort R) (GRing.Ring.sort R) (frac (Ratio x y))) x *)
by move=> ny0; rewrite /Ratio /insubd insubT.
Qed.
Lemma denom_Ratio x y : y != 0 -> (Ratio x y).2 = y.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) y (GRing.zero (GRing.Ring.zmodType R)))), @eq (GRing.Ring.sort R) (@snd (GRing.Ring.sort R) (GRing.Ring.sort R) (frac (Ratio x y))) y *)
by move=> ny0; rewrite /Ratio /insubd insubT.
Qed.
Definition numden_Ratio := (numer_Ratio, denom_Ratio).
Variant Ratio_spec (n d : R) : {ratio R} -> R -> R -> Type :=
| RatioNull of d = 0 : Ratio_spec n d ratio0 n 0
| RatioNonNull (d_neq0 : d != 0) :
Ratio_spec n d (@mkRatio (n, d) d_neq0) n d.
Lemma RatioP n d : Ratio_spec n d (Ratio n d) n d.
Proof.
(* Goal: Ratio_spec n d (Ratio n d) n d *)
rewrite /Ratio /insubd; case: insubP=> /= [x /= d_neq0 hx|].
(* Goal: forall _ : is_true (negb (negb (@eq_op (GRing.Ring.eqType R) d (GRing.zero (GRing.Ring.zmodType R))))), Ratio_spec n d ratio0 n d *)
(* Goal: Ratio_spec n d x n d *)
have ->: x = @mkRatio (n, d) d_neq0 by apply: val_inj.
(* Goal: forall _ : is_true (negb (negb (@eq_op (GRing.Ring.eqType R) d (GRing.zero (GRing.Ring.zmodType R))))), Ratio_spec n d ratio0 n d *)
(* Goal: Ratio_spec n d (@mkRatio (@pair (GRing.Ring.sort R) (GRing.Ring.sort R) n d) d_neq0) n d *)
by constructor.
(* Goal: forall _ : is_true (negb (negb (@eq_op (GRing.Ring.eqType R) d (GRing.zero (GRing.Ring.zmodType R))))), Ratio_spec n d ratio0 n d *)
by rewrite negbK=> /eqP hx; rewrite {2}hx; constructor.
Qed.
Lemma Ratio0 x : Ratio x 0 = ratio0.
Proof.
(* Goal: @eq (ratio_of (Phant (GRing.Ring.sort R))) (Ratio x (GRing.zero (GRing.Ring.zmodType R))) ratio0 *)
by rewrite /Ratio /insubd; case: insubP; rewrite //= eqxx.
Qed.
End FracDomain.
Notation "{ 'ratio' T }" := (ratio_of (Phant T)).
Identity Coercion type_fracdomain_of : ratio_of >-> ratio.
Notation "'\n_' x" := (frac x).1
(at level 8, x at level 2, format "'\n_' x").
Notation "'\d_' x" := (frac x).2
(at level 8, x at level 2, format "'\d_' x").
Module FracField.
Section FracField.
Variable R : idomainType.
Local Notation frac := (R * R).
Local Notation dom := (ratio R).
Local Notation domP := denom_ratioP.
Implicit Types x y z : dom.
Local Notation equivf_notation x y := (\n_x * \d_y == \d_x * \n_y).
Definition equivf x y := equivf_notation x y.
Lemma equivfE x y : equivf x y = equivf_notation x y.
Proof.
(* Goal: @eq bool (equivf x y) (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y)))) *)
by [].
Qed.
Lemma equivf_refl : reflexive equivf.
Proof.
(* Goal: @reflexive (ratio (GRing.IntegralDomain.ringType R)) equivf *)
by move=> x; rewrite /equivf mulrC.
Qed.
Lemma equivf_sym : symmetric equivf.
Proof.
(* Goal: @symmetric (ratio (GRing.IntegralDomain.ringType R)) equivf *)
by move=> x y; rewrite /equivf eq_sym; congr (_==_); rewrite mulrC.
Qed.
Lemma equivf_trans : transitive equivf.
Proof.
(* Goal: @transitive (ratio (GRing.IntegralDomain.ringType R)) equivf *)
move=> [x Px] [y Py] [z Pz]; rewrite /equivf /= mulrC => /eqP xy /eqP yz.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) y) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) z)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) y) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) z))) *)
by rewrite -(inj_eq (mulfI Px)) mulrA xy -mulrA yz mulrCA.
Qed.
Canonical equivf_equiv := EquivRel equivf equivf_refl equivf_sym equivf_trans.
Definition type := {eq_quot equivf}.
Definition type_of of phant R := type.
Notation "{ 'fraction' T }" := (type_of (Phant T)).
Canonical frac_quotType := [quotType of type].
Canonical frac_eqType := [eqType of type].
Canonical frac_choiceType := [choiceType of type].
Canonical frac_eqQuotType := [eqQuotType equivf of type].
Canonical frac_of_quotType := [quotType of {fraction R}].
Canonical frac_of_eqType := [eqType of {fraction R}].
Canonical frac_of_choiceType := [choiceType of {fraction R}].
Canonical frac_of_eqQuotType := [eqQuotType equivf of {fraction R}].
Lemma equivf_def (x y : ratio R) : x == y %[mod type]
= (\n_x * \d_y == \d_x * \n_y).
Proof.
(* Goal: @eq bool (@eq_op frac_eqType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (Phant type) x) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (Phant type) y)) (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y)))) *)
by rewrite eqmodE.
Qed.
Lemma equivf_r x : \n_x * \d_(repr (\pi_type x)) = \d_x * \n_(repr (\pi_type x)).
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (Phant type) x))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (Phant type) x))))) *)
by apply/eqP; rewrite -equivf_def reprK.
Qed.
Lemma equivf_l x : \n_(repr (\pi_type x)) * \d_x = \d_(repr (\pi_type x)) * \n_x.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (Phant type) x)))) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (Phant type) x)))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) *)
by apply/eqP; rewrite -equivf_def reprK.
Qed.
Lemma numer0 x : (\n_x == 0) = (x == (ratio0 R) %[mod_eq equivf]).
Proof.
(* Goal: @eq bool (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) (@eq_op (@EquivQuot.eqType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) x) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) (ratio0 (GRing.IntegralDomain.ringType R)))) *)
by rewrite eqmodE /= !equivfE // mulr1 mulr0.
Qed.
Lemma Ratio_numden : forall x, Ratio \n_x \d_x = x.
Proof.
(* Goal: forall x : ratio (GRing.IntegralDomain.ringType R), @eq (@ratio_of (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R)))) (@Ratio (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) x *)
case=> [[n d] /= nd]; rewrite /Ratio /insubd; apply: val_inj=> /=.
(* Goal: @eq (prod (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Option.default (ratio (GRing.IntegralDomain.ringType R)) (ratio0 (GRing.IntegralDomain.ringType R)) (@insub (prod (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R)) (fun x : prod (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) => negb (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) x) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))))) (ratio_subType (GRing.IntegralDomain.ringType R)) (@pair (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) n d)))) (@pair (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) n d) *)
by case: insubP=> //=; rewrite nd.
Qed.
Definition tofrac := lift_embed {fraction R} (fun x : R => Ratio x 1).
Canonical tofrac_pi_morph := PiEmbed tofrac.
Notation "x %:F" := (@tofrac x).
Implicit Types a b c : type.
Definition addf x y : dom := Ratio (\n_x * \d_y + \n_y * \d_x) (\d_x * \d_y).
Definition add := lift_op2 {fraction R} addf.
Lemma pi_add : {morph \pi : x y / addf x y >-> add x y}.
Canonical pi_add_morph := PiMorph2 pi_add.
Definition oppf x : dom := Ratio (- \n_x) \d_x.
Definition opp := lift_op1 {fraction R} oppf.
Lemma pi_opp : {morph \pi : x / oppf x >-> opp x}.
Proof.
(* Goal: @morphism_1 (ratio (GRing.IntegralDomain.ringType R)) (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType))) (fun x : ratio (GRing.IntegralDomain.ringType R) => oppf x) (fun x : @quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType => opp x) *)
move=> x; unlock opp; apply/eqmodP; rewrite /= /equivf /oppf /=.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x))))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x)))))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))))) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x))))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x))))))))) *)
by rewrite !numden_Ratio ?(domP,mulf_neq0) // mulNr mulrN -equivf_r.
Qed.
Canonical pi_opp_morph := PiMorph1 pi_opp.
Definition mulf x y : dom := Ratio (\n_x * \n_y) (\d_x * \d_y).
Definition mul := lift_op2 {fraction R} mulf.
Lemma pi_mul : {morph \pi : x y / mulf x y >-> mul x y}.
Proof.
(* Goal: @morphism_2 (ratio (GRing.IntegralDomain.ringType R)) (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType))) (fun x y : ratio (GRing.IntegralDomain.ringType R) => mulf x y) (fun x y : @quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType => mul x y) *)
move=> x y; unlock mul; apply/eqmodP=> /=.
(* Goal: is_true (equivf (mulf x y) (mulf (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x)) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) y)))) *)
rewrite equivfE /= /addf /= !numden_Ratio ?mulf_neq0 ?domP //.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x)))) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) y)))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x)))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) y))))))) *)
rewrite mulrAC !mulrA -mulrA equivf_r -equivf_l.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (Phant type) x))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_quotType (Phant type) y)))) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y)))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x))))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) y)))))) *)
by rewrite mulrA ![_ * \d_y]mulrC !mulrA.
Qed.
Canonical pi_mul_morph := PiMorph2 pi_mul.
Definition invf x : dom := Ratio \d_x \n_x.
Definition inv := lift_op1 {fraction R} invf.
Lemma pi_inv : {morph \pi : x / invf x >-> inv x}.
Proof.
(* Goal: @morphism_1 (ratio (GRing.IntegralDomain.ringType R)) (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType))) (fun x : ratio (GRing.IntegralDomain.ringType R) => invf x) (fun x : @quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType => inv x) *)
move=> x; unlock inv; apply/eqmodP=> /=; rewrite equivfE /invf eq_sym.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x)))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x)))))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))))) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x)))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x))))))))) *)
do 2?case: RatioP=> /= [/eqP|]; rewrite ?mul0r ?mul1r -?equivf_def ?numer0 ?reprK //.
(* Goal: forall (_ : is_true (@eq_op (@EquivQuot.eqType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) (ratio0 (GRing.IntegralDomain.ringType R))))) (_ : is_true (negb (@eq_op (@EquivQuot.eqType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) x) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) (ratio0 (GRing.IntegralDomain.ringType R)))))), is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (GRing.one (GRing.IntegralDomain.ringType R)))) *)
(* Goal: forall (_ : is_true (negb (@eq_op (@EquivQuot.eqType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) (ratio0 (GRing.IntegralDomain.ringType R)))))) (_ : is_true (@eq_op (@EquivQuot.eqType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) x) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) (ratio0 (GRing.IntegralDomain.ringType R))))), is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Repr.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x)))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) *)
by move=> hx /eqP hx'; rewrite hx' eqxx in hx.
(* Goal: forall (_ : is_true (@eq_op (@EquivQuot.eqType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) x) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) (ratio0 (GRing.IntegralDomain.ringType R))))) (_ : is_true (negb (@eq_op (@EquivQuot.eqType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) x) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (@EquivQuot.quotType (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf)) (Phant (@EquivQuot.type_of (ratio (GRing.IntegralDomain.ringType R)) (ratio_choiceType (GRing.IntegralDomain.ringType R)) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) (fun x : Choice.sort (ratio_choiceType (GRing.IntegralDomain.ringType R)) => x) equivf_equiv (@defaultEncModRel (ratio_choiceType (GRing.IntegralDomain.ringType R)) equivf) (Phantom (rel (ratio (GRing.IntegralDomain.ringType R))) equivf))) (ratio0 (GRing.IntegralDomain.ringType R)))))), is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (GRing.one (GRing.IntegralDomain.ringType R)))) *)
by move=> /eqP ->; rewrite eqxx.
Qed.
Canonical pi_inv_morph := PiMorph1 pi_inv.
Lemma addA : associative add.
Proof.
(* Goal: @associative (type_of (Phant (GRing.IntegralDomain.sort R))) add *)
elim/quotW=> x; elim/quotW=> y; elim/quotW=> z; rewrite !piE.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (addf x (addf y z))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (addf (addf x y) z)) *)
rewrite /addf /= !numden_Ratio ?mulf_neq0 ?domP // !mulrDl !mulrA !addrA.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) z))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) y)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) z))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) z)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) z))))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) z))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) y)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) z)))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) z)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) y)))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@SerTop.frac (GRing.IntegralDomain.ringType R) z))))) *)
by congr (\pi (Ratio (_ + _ + _) _)); rewrite mulrAC.
Qed.
Lemma addC : commutative add.
Proof.
(* Goal: @commutative (type_of (Phant (GRing.IntegralDomain.sort R))) (type_of (Phant (GRing.IntegralDomain.sort R))) add *)
by elim/quotW=> x; elim/quotW=> y; rewrite !piE /addf addrC [\d__ * _]mulrC.
Qed.
Lemma add0_l : left_id 0%:F add.
Proof.
(* Goal: @left_id (type_of (Phant (GRing.IntegralDomain.sort R))) (type_of (Phant (GRing.IntegralDomain.sort R))) (tofrac (GRing.zero (GRing.IntegralDomain.zmodType R))) add *)
elim/quotW=> x; rewrite !piE /addf !numden_Ratio ?oner_eq0 //.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (GRing.zero (GRing.IntegralDomain.zmodType R)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (GRing.one (GRing.IntegralDomain.ringType R)))) (@GRing.mul (GRing.IntegralDomain.ringType R) (GRing.one (GRing.IntegralDomain.ringType R)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) x) *)
by rewrite mul0r mul1r mulr1 add0r Ratio_numden.
Qed.
Lemma addN_l : left_inverse 0%:F opp add.
Proof.
(* Goal: @left_inverse (type_of (Phant (GRing.IntegralDomain.sort R))) (type_of (Phant (GRing.IntegralDomain.sort R))) (type_of (Phant (GRing.IntegralDomain.sort R))) (tofrac (GRing.zero (GRing.IntegralDomain.zmodType R))) opp add *)
elim/quotW=> x; apply/eqP; rewrite piE /equivf.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (addf (oppf x) x))) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (GRing.zero (GRing.IntegralDomain.zmodType R)) (GRing.one (GRing.IntegralDomain.ringType R)))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (addf (oppf x) x))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (GRing.zero (GRing.IntegralDomain.zmodType R)) (GRing.one (GRing.IntegralDomain.ringType R))))))) *)
rewrite /addf /oppf !numden_Ratio ?(oner_eq0, mulf_neq0, domP) //.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.opp (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)))) (GRing.one (GRing.IntegralDomain.ringType R))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (GRing.zero (GRing.IntegralDomain.zmodType R)))) *)
by rewrite mulr1 mulr0 mulNr addNr.
Qed.
Definition frac_zmodMixin := ZmodMixin addA addC add0_l addN_l.
Canonical frac_zmodType := Eval hnf in ZmodType type frac_zmodMixin.
Lemma mulA : associative mul.
Proof.
(* Goal: @associative (type_of (Phant (GRing.IntegralDomain.sort R))) mul *)
elim/quotW=> x; elim/quotW=> y; elim/quotW=> z; rewrite !piE.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (mulf x (mulf y z))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (mulf (mulf x y) z)) *)
by rewrite /mulf !numden_Ratio ?mulf_neq0 ?domP // !mulrA.
Qed.
Lemma mulC : commutative mul.
Proof.
(* Goal: @commutative (type_of (Phant (GRing.IntegralDomain.sort R))) (type_of (Phant (GRing.IntegralDomain.sort R))) mul *)
elim/quotW=> x; elim/quotW=> y; rewrite !piE /mulf.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y))))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y)) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) y)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))))) *)
by rewrite [_ * (\d_x)]mulrC [_ * (\n_x)]mulrC.
Qed.
Lemma mul1_l : left_id 1%:F mul.
Proof.
(* Goal: @left_id (type_of (Phant (GRing.IntegralDomain.sort R))) (type_of (Phant (GRing.IntegralDomain.sort R))) (tofrac (GRing.one (GRing.IntegralDomain.ringType R))) mul *)
elim/quotW=> x; rewrite !piE /mulf.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (GRing.one (GRing.IntegralDomain.ringType R)) (GRing.one (GRing.IntegralDomain.ringType R))))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (GRing.one (GRing.IntegralDomain.ringType R)) (GRing.one (GRing.IntegralDomain.ringType R))))) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) x))))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) x) *)
by rewrite !numden_Ratio ?oner_eq0 // !mul1r Ratio_numden.
Qed.
Lemma mul_addl : left_distributive mul add.
Lemma nonzero1 : 1%:F != 0%:F :> type.
Proof.
(* Goal: is_true (negb (@eq_op frac_eqType (tofrac (GRing.one (GRing.IntegralDomain.ringType R)) : type) (tofrac (GRing.zero (GRing.IntegralDomain.zmodType R)) : type))) *)
by rewrite piE equivfE !numden_Ratio ?mul1r ?oner_eq0.
Qed.
Definition frac_comRingMixin := ComRingMixin mulA mulC mul1_l mul_addl nonzero1.
Canonical frac_ringType := Eval hnf in RingType type frac_comRingMixin.
Canonical frac_comRingType := Eval hnf in ComRingType type mulC.
Lemma mulV_l : forall a, a != 0%:F -> mul (inv a) a = 1%:F.
Proof.
(* Goal: forall (a : type) (_ : is_true (negb (@eq_op frac_eqType a (tofrac (GRing.zero (GRing.IntegralDomain.zmodType R)))))), @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (mul (inv a) a) (tofrac (GRing.one (GRing.IntegralDomain.ringType R))) *)
elim/quotW=> x /=; rewrite !piE.
(* Goal: forall _ : is_true (negb (equivf x (@Ratio (GRing.IntegralDomain.ringType R) (GRing.zero (GRing.IntegralDomain.zmodType R)) (GRing.one (GRing.IntegralDomain.ringType R))))), @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (mulf (invf x) x)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (@Ratio (GRing.IntegralDomain.ringType R) (GRing.one (GRing.IntegralDomain.ringType R)) (GRing.one (GRing.IntegralDomain.ringType R)))) *)
rewrite /equivf !numden_Ratio ?oner_eq0 // mulr1 mulr0=> nx0.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (mulf (invf x) x)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (@Ratio (GRing.IntegralDomain.ringType R) (GRing.one (GRing.IntegralDomain.ringType R)) (GRing.one (GRing.IntegralDomain.ringType R)))) *)
apply/eqmodP; rewrite /= equivfE.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (mulf (invf x) x))) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (GRing.one (GRing.IntegralDomain.ringType R)) (GRing.one (GRing.IntegralDomain.ringType R)))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (mulf (invf x) x))) (@fst (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@SerTop.frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) (GRing.one (GRing.IntegralDomain.ringType R)) (GRing.one (GRing.IntegralDomain.ringType R))))))) *)
by rewrite !numden_Ratio ?(oner_eq0, mulf_neq0, domP) // !mulr1 mulrC.
Qed.
Lemma inv0 : inv 0%:F = 0%:F.
Proof.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (inv (tofrac (GRing.zero (GRing.IntegralDomain.zmodType R)))) (tofrac (GRing.zero (GRing.IntegralDomain.zmodType R))) *)
rewrite !piE /invf !numden_Ratio ?oner_eq0 // /Ratio /insubd.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (@Option.default (@sub_sort (prod (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (fun x : prod (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) => negb (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) x) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))))) (ratio_subType (GRing.IntegralDomain.ringType R))) (ratio0 (GRing.IntegralDomain.ringType R)) (@insub (prod (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (fun x : prod (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) => negb (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) x) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))))) (ratio_subType (GRing.IntegralDomain.ringType R)) (@pair (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.one (GRing.IntegralDomain.ringType R)) (GRing.zero (GRing.IntegralDomain.zmodType R)))))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType)) (@Option.default (@sub_sort (prod (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (fun x : prod (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) => negb (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) x) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))))) (ratio_subType (GRing.IntegralDomain.ringType R))) (ratio0 (GRing.IntegralDomain.ringType R)) (@insub (prod (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (fun x : prod (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) => negb (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) (@snd (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) x) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))))) (ratio_subType (GRing.IntegralDomain.ringType R)) (@pair (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.zero (GRing.IntegralDomain.zmodType R)) (GRing.one (GRing.IntegralDomain.ringType R)))))) *)
do 2?case: insubP; rewrite //= ?eqxx ?oner_eq0 // => u _ hu _.
(* Goal: @eq (type_of (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) (ratio0 (GRing.IntegralDomain.ringType R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) frac_of_quotType (Phant (type_of (Phant (GRing.IntegralDomain.sort R)))) u) *)
by congr \pi; apply: val_inj; rewrite /= hu.
Qed.
Definition RatFieldUnitMixin := FieldUnitMixin mulV_l inv0.
Canonical frac_unitRingType := Eval hnf in UnitRingType type RatFieldUnitMixin.
Canonical frac_comUnitRingType := [comUnitRingType of type].
Lemma field_axiom : GRing.Field.mixin_of frac_unitRingType.
Proof.
(* Goal: GRing.Field.mixin_of frac_unitRingType *)
exact.
Qed.
Definition RatFieldIdomainMixin := (FieldIdomainMixin field_axiom).
Canonical frac_idomainType :=
Eval hnf in IdomainType type (FieldIdomainMixin field_axiom).
Canonical frac_fieldType := FieldType type field_axiom.
End FracField.
End FracField.
Notation "{ 'fraction' T }" := (FracField.type_of (Phant T)).
Notation equivf := (@FracField.equivf _).
Hint Resolve denom_ratioP : core.
Section Canonicals.
Variable R : idomainType.
Canonical FracField.frac_quotType.
Canonical FracField.frac_eqType.
Canonical FracField.frac_choiceType.
Canonical FracField.frac_zmodType.
Canonical FracField.frac_ringType.
Canonical FracField.frac_comRingType.
Canonical FracField.frac_unitRingType.
Canonical FracField.frac_comUnitRingType.
Canonical FracField.frac_idomainType.
Canonical FracField.frac_fieldType.
Canonical FracField.tofrac_pi_morph.
Canonical frac_of_quotType := Eval hnf in [quotType of {fraction R}].
Canonical frac_of_eqType := Eval hnf in [eqType of {fraction R}].
Canonical frac_of_choiceType := Eval hnf in [choiceType of {fraction R}].
Canonical frac_of_zmodType := Eval hnf in [zmodType of {fraction R}].
Canonical frac_of_ringType := Eval hnf in [ringType of {fraction R}].
Canonical frac_of_comRingType := Eval hnf in [comRingType of {fraction R}].
Canonical frac_of_unitRingType := Eval hnf in [unitRingType of {fraction R}].
Canonical frac_of_comUnitRingType := Eval hnf in [comUnitRingType of {fraction R}].
Canonical frac_of_idomainType := Eval hnf in [idomainType of {fraction R}].
Canonical frac_of_fieldType := Eval hnf in [fieldType of {fraction R}].
End Canonicals.
Section FracFieldTheory.
Import FracField.
Variable R : idomainType.
Lemma Ratio_numden (x : {ratio R}) : Ratio \n_x \d_x = x.
Local Notation tofrac := (@FracField.tofrac R).
Local Notation "x %:F" := (tofrac x).
Lemma tofrac_is_additive: additive tofrac.
Proof.
(* Goal: @GRing.Additive.axiom (GRing.IntegralDomain.zmodType R) (frac_of_zmodType R) (@FracField.tofrac R) *)
move=> p q /=; unlock tofrac.
(* Goal: @eq (@type_of R (Phant (GRing.IntegralDomain.sort R))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R) (Phant (@type_of R (Phant (GRing.IntegralDomain.sort R)))) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.add (GRing.IntegralDomain.zmodType R) p (@GRing.opp (GRing.IntegralDomain.zmodType R) q)) (GRing.one (GRing.IntegralDomain.ringType R)))) (@GRing.add (frac_of_zmodType R) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R) (Phant (@type_of R (Phant (GRing.IntegralDomain.sort R)))) (@Ratio (GRing.IntegralDomain.ringType R) p (GRing.one (GRing.IntegralDomain.ringType R)))) (@GRing.opp (frac_of_zmodType R) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R) (Phant (@type_of R (Phant (GRing.IntegralDomain.sort R)))) (@Ratio (GRing.IntegralDomain.ringType R) q (GRing.one (GRing.IntegralDomain.ringType R)))))) *)
rewrite -[X in _ = _ + X]pi_opp -[X in _ = X]pi_add.
(* Goal: @eq (GRing.Zmodule.sort (frac_of_zmodType R)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R) (Phant (@type_of R (Phant (GRing.IntegralDomain.sort R)))) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.add (GRing.IntegralDomain.zmodType R) p (@GRing.opp (GRing.IntegralDomain.zmodType R) q)) (GRing.one (GRing.IntegralDomain.ringType R)))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R) (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R))) (@addf R (@Ratio (GRing.IntegralDomain.ringType R) p (GRing.one (GRing.IntegralDomain.ringType R))) (@oppf R (@Ratio (GRing.IntegralDomain.ringType R) q (GRing.one (GRing.IntegralDomain.ringType R)))))) *)
by rewrite /addf /oppf /= !numden_Ratio ?(oner_neq0, mul1r, mulr1).
Qed.
Canonical tofrac_additive := Additive tofrac_is_additive.
Lemma tofrac_is_multiplicative: multiplicative tofrac.
Proof.
(* Goal: @GRing.RMorphism.mixin_of (GRing.IntegralDomain.ringType R) (frac_of_ringType R) (@FracField.tofrac R) *)
split=> [p q|//]; unlock tofrac; rewrite -[X in _ = X]pi_mul.
(* Goal: @eq (GRing.Ring.sort (frac_of_ringType R)) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R) (Phant (@type_of R (Phant (GRing.IntegralDomain.sort R)))) (@Ratio (GRing.IntegralDomain.ringType R) (@GRing.mul (GRing.IntegralDomain.ringType R) p q) (GRing.one (GRing.IntegralDomain.ringType R)))) (@Pi.f (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R) (Phant (@quot_sort (ratio (GRing.IntegralDomain.ringType R)) (frac_of_quotType R))) (@mulf R (@Ratio (GRing.IntegralDomain.ringType R) p (GRing.one (GRing.IntegralDomain.ringType R))) (@Ratio (GRing.IntegralDomain.ringType R) q (GRing.one (GRing.IntegralDomain.ringType R))))) *)
by rewrite /mulf /= !numden_Ratio ?(oner_neq0, mul1r, mulr1).
Qed.
Lemma tofracN : {morph tofrac: x / - x}. Proof. exact: rmorphN. Qed.
Proof.
(* Goal: @morphism_1 (GRing.IntegralDomain.sort R) (@type_of R (Phant (GRing.IntegralDomain.sort R))) (@FracField.tofrac R) (fun x : GRing.IntegralDomain.sort R => @GRing.opp (GRing.IntegralDomain.zmodType R) x) (fun x : @type_of R (Phant (GRing.IntegralDomain.sort R)) => @GRing.opp (frac_of_zmodType R) x) *)
exact: rmorphN.
Qed.
Lemma tofracB : {morph tofrac: x y / x - y}. Proof. exact: rmorphB. Qed.
Proof.
(* Goal: @morphism_2 (GRing.IntegralDomain.sort R) (@type_of R (Phant (GRing.IntegralDomain.sort R))) (@FracField.tofrac R) (fun x y : GRing.IntegralDomain.sort R => @GRing.add (GRing.IntegralDomain.zmodType R) x (@GRing.opp (GRing.IntegralDomain.zmodType R) y)) (fun x y : @type_of R (Phant (GRing.IntegralDomain.sort R)) => @GRing.add (frac_of_zmodType R) x (@GRing.opp (frac_of_zmodType R) y)) *)
exact: rmorphB.
Qed.
Lemma tofracMNn n : {morph tofrac: x / x *- n}. Proof. exact: rmorphMNn. Qed.
Proof.
(* Goal: @morphism_1 (GRing.IntegralDomain.sort R) (@type_of R (Phant (GRing.IntegralDomain.sort R))) (@FracField.tofrac R) (fun x : GRing.IntegralDomain.sort R => @GRing.opp (GRing.IntegralDomain.zmodType R) (@GRing.natmul (GRing.IntegralDomain.zmodType R) x n)) (fun x : @type_of R (Phant (GRing.IntegralDomain.sort R)) => @GRing.opp (frac_of_zmodType R) (@GRing.natmul (frac_of_zmodType R) x n)) *)
exact: rmorphMNn.
Qed.
Lemma tofracM : {morph tofrac: x y / x * y}. Proof. exact: rmorphM. Qed.
Proof.
(* Goal: @morphism_2 (GRing.IntegralDomain.sort R) (@type_of R (Phant (GRing.IntegralDomain.sort R))) (@FracField.tofrac R) (fun x y : GRing.IntegralDomain.sort R => @GRing.mul (GRing.IntegralDomain.ringType R) x y) (fun x y : @type_of R (Phant (GRing.IntegralDomain.sort R)) => @GRing.mul (frac_of_ringType R) x y) *)
exact: rmorphM.
Qed.
Lemma tofrac_eq (p q : R): (p%:F == q%:F) = (p == q).
Proof.
(* Goal: @eq bool (@eq_op (SerTop.frac_of_eqType R) (@FracField.tofrac R p) (@FracField.tofrac R q)) (@eq_op (GRing.IntegralDomain.eqType R) p q) *)
apply/eqP/eqP=> [|->//]; unlock tofrac=> /eqmodP /eqP /=.
(* Goal: forall _ : @eq (GRing.IntegralDomain.sort R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) p (GRing.one (GRing.IntegralDomain.ringType R))))) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) q (GRing.one (GRing.IntegralDomain.ringType R)))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@snd (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) p (GRing.one (GRing.IntegralDomain.ringType R))))) (@fst (GRing.IntegralDomain.sort R) (GRing.IntegralDomain.sort R) (@frac (GRing.IntegralDomain.ringType R) (@Ratio (GRing.IntegralDomain.ringType R) q (GRing.one (GRing.IntegralDomain.ringType R)))))), @eq (GRing.IntegralDomain.sort R) p q *)
by rewrite !numden_Ratio ?(oner_eq0, mul1r, mulr1).
Qed.
Lemma tofrac_eq0 (p : R): (p%:F == 0) = (p == 0).
Proof.
(* Goal: @eq bool (@eq_op (SerTop.frac_of_eqType R) (@FracField.tofrac R p) (GRing.zero (frac_of_zmodType R))) (@eq_op (GRing.IntegralDomain.eqType R) p (GRing.zero (GRing.IntegralDomain.zmodType R))) *)
by rewrite tofrac_eq.
Qed.
End FracFieldTheory.
|
Require Import basis.
Theorem Uniqueness_of_constructed_lines :
forall (x : Segment) (l : Line),
Incident (origin x) l -> Incident (extremity x) l -> EqLn l (ln x).
Proof.
(* Goal: forall (x : Segment) (l : Line) (_ : Incident (origin x) l) (_ : Incident (extremity x) l), EqLn l (ln x) *)
intros x l.
(* Goal: forall (_ : Incident (origin x) l) (_ : Incident (extremity x) l), EqLn l (ln x) *)
generalize (inc_ln2 x); generalize (inc_ln1 x).
(* Goal: forall (_ : Incident (origin x) (ln x)) (_ : Incident (extremity x) (ln x)) (_ : Incident (origin x) l) (_ : Incident (extremity x) l), EqLn l (ln x) *)
unfold Incident, EqLn, Negation in |- *.
(* Goal: forall (_ : not (Apart (origin x) (ln x))) (_ : not (Apart (extremity x) (ln x))) (_ : not (Apart (origin x) l)) (_ : not (Apart (extremity x) l)), not (DiLn l (ln x)) *)
intros H' H'0 H'1 H'2; red in |- *; intro H'3.
(* Goal: False *)
lapply (el_ax x l (ln x)); trivial.
(* Goal: forall _ : or (or (Apart (origin x) l) (Apart (extremity x) l)) (or (Apart (origin x) (ln x)) (Apart (extremity x) (ln x))), False *)
tauto.
Qed.
Theorem Convergent_imp_distinct : forall l m : Line, ConLn l m -> DiLn l m.
Proof.
(* Goal: forall (l m : Line) (_ : ConLn l m), DiLn l m *)
intros l m H'.
(* Goal: DiLn l m *)
lapply (cmp_con_diln l m l); trivial.
(* Goal: forall _ : or (DiLn m l) (ConLn l l), DiLn l m *)
intro H'0; elim H'0; auto.
(* Goal: forall _ : ConLn l l, DiLn l m *)
intro H'1; elim apart_con.
(* Goal: forall (_ : Irreflexive Line ConLn) (_ : Separating Line ConLn), DiLn l m *)
intro H'2; elim (H'2 l); trivial.
Qed.
Hint Resolve Convergent_imp_distinct.
Theorem Uniqueness_of_constructed_points :
forall (x : Twolines) (a : Point),
Incident a (line1 x) -> Incident a (line2 x) -> EqPt a (pt x).
Proof.
(* Goal: forall (x : Twolines) (a : Point) (_ : Incident a (line1 x)) (_ : Incident a (line2 x)), EqPt a (pt x) *)
intro x.
(* Goal: forall (a : Point) (_ : Incident a (line1 x)) (_ : Incident a (line2 x)), EqPt a (pt x) *)
generalize (inc_pt2 x); generalize (inc_pt1 x).
(* Goal: forall (_ : Incident (pt x) (line1 x)) (_ : Incident (pt x) (line2 x)) (a : Point) (_ : Incident a (line1 x)) (_ : Incident a (line2 x)), EqPt a (pt x) *)
unfold Incident, EqPt, Negation in |- *.
(* Goal: forall (_ : not (Apart (pt x) (line1 x))) (_ : not (Apart (pt x) (line2 x))) (a : Point) (_ : not (Apart a (line1 x))) (_ : not (Apart a (line2 x))), not (DiPt a (pt x)) *)
intros H' H'0 a H'1 H'2; red in |- *; intro H'3.
(* Goal: False *)
lapply (el_ax (Seg a (pt x) H'3) (line1 x) (line2 x)); simpl in |- *.
(* Goal: DiLn (line1 x) (line2 x) *)
(* Goal: forall _ : or (or (Apart a (line1 x)) (Apart (pt x) (line1 x))) (or (Apart a (line2 x)) (Apart (pt x) (line2 x))), False *)
tauto.
(* Goal: DiLn (line1 x) (line2 x) *)
elim x; auto.
Qed.
Theorem cong_eqpt_apt :
forall (a b : Point) (l : Line), Apart a l -> EqPt a b -> Apart b l.
Proof.
(* Goal: forall (a b : Point) (l : Line) (_ : Apart a l) (_ : EqPt a b), Apart b l *)
intros a b l H' H'0.
(* Goal: Apart b l *)
elim (cmp_apt_dipt a b l); auto.
(* Goal: forall _ : DiPt a b, Apart b l *)
intro H'1; elim H'0; trivial.
Qed.
Theorem cong_eqln_apt :
forall (a : Point) (l m : Line), Apart a l -> EqLn l m -> Apart a m.
Proof.
(* Goal: forall (a : Point) (l m : Line) (_ : Apart a l) (_ : EqLn l m), Apart a m *)
intros a l m H' H'0.
(* Goal: Apart a m *)
elim (cmp_apt_diln a l m); auto.
(* Goal: forall _ : DiLn l m, Apart a m *)
intro H'1; elim H'0; trivial.
Qed.
Theorem cong_eqpt_inc :
forall (a b : Point) (l : Line), Incident a l -> EqPt a b -> Incident b l.
Proof.
(* Goal: forall (a b : Point) (l : Line) (_ : Incident a l) (_ : EqPt a b), Incident b l *)
unfold Incident in |- *.
(* Goal: forall (a b : Point) (l : Line) (_ : not (Apart a l)) (_ : EqPt a b), not (Apart b l) *)
intros a b l H' H'0; red in |- *; intro H'1; apply H'.
(* Goal: Apart a l *)
apply cong_eqpt_apt with (a := b); auto.
Qed.
Theorem cong_eqln_inc :
forall (a : Point) (l m : Line), Incident a l -> EqLn l m -> Incident a m.
Proof.
(* Goal: forall (a : Point) (l m : Line) (_ : Incident a l) (_ : EqLn l m), Incident a m *)
unfold Incident in |- *.
(* Goal: forall (a : Point) (l m : Line) (_ : not (Apart a l)) (_ : EqLn l m), not (Apart a m) *)
intros a l m H' H'0; red in |- *; intro H'1; apply H'.
(* Goal: Apart a l *)
apply cong_eqln_apt with (l := m); auto.
Qed.
Theorem cong_eqln_con :
forall l m n : Line, ConLn l m -> EqLn m n -> ConLn l n.
Proof.
(* Goal: forall (l m n : Line) (_ : ConLn l m) (_ : EqLn m n), ConLn l n *)
intros l m n H' H'0.
(* Goal: ConLn l n *)
elim (cmp_con_diln l m n); auto.
(* Goal: forall _ : DiLn m n, ConLn l n *)
intro H'1; elim H'0; trivial.
Qed.
Theorem cong_eqln_par : forall l m n : Line, Par l m -> EqLn m n -> Par l n.
Proof.
(* Goal: forall (l m n : Line) (_ : Par l m) (_ : EqLn m n), Par l n *)
unfold Par, Negation in |- *.
(* Goal: forall (l m n : Line) (_ : not (ConLn l m)) (_ : EqLn m n), not (ConLn l n) *)
intros l m n H' H'0; red in |- *; intro H'1; apply H'.
(* Goal: ConLn l m *)
apply cong_eqln_con with (m := n); auto.
Qed.
Theorem cong_eqpt_dipt :
forall a b c : Point, DiPt a b -> EqPt b c -> DiPt a c.
Proof.
(* Goal: forall (a b c : Point) (_ : DiPt a b) (_ : EqPt b c), DiPt a c *)
intros a b c H' H'0; elim apart_dipt.
(* Goal: forall (_ : Irreflexive Point DiPt) (_ : Separating Point DiPt), DiPt a c *)
unfold Separating at 1 in |- *.
(* Goal: forall (_ : Irreflexive Point DiPt) (_ : forall (x y z : Point) (_ : DiPt x y), or (DiPt x z) (DiPt y z)), DiPt a c *)
intros H'1 H'2; elim (H'2 a b c); trivial.
(* Goal: forall _ : DiPt b c, DiPt a c *)
intro H'3; elim H'0; trivial.
Qed.
Theorem cong_eqln_diln :
forall l m n : Line, DiLn l m -> EqLn m n -> DiLn l n.
Proof.
(* Goal: forall (l m n : Line) (_ : DiLn l m) (_ : EqLn m n), DiLn l n *)
intros l m n H' H'0; elim apart_diln.
(* Goal: forall (_ : Irreflexive Line DiLn) (_ : Separating Line DiLn), DiLn l n *)
unfold Separating at 1 in |- *.
(* Goal: forall (_ : Irreflexive Line DiLn) (_ : forall (x y z : Line) (_ : DiLn x y), or (DiLn x z) (DiLn y z)), DiLn l n *)
intros H'1 H'2; elim (H'2 l m n); trivial.
(* Goal: forall _ : DiLn m n, DiLn l n *)
intro H'3; elim H'0; trivial.
Qed.
Theorem eqln_imp_par : forall l m : Line, EqLn l m -> Par l m.
Proof.
(* Goal: forall (l m : Line) (_ : EqLn l m), Par l m *)
unfold Par, EqLn, Negation in |- *; red in |- *; auto.
Qed.
Theorem cong_par_con : forall l m n : Line, ConLn l m -> Par m n -> ConLn l n.
Proof.
(* Goal: forall (l m n : Line) (_ : ConLn l m) (_ : Par m n), ConLn l n *)
intros l m n H' H'0.
(* Goal: ConLn l n *)
elim apart_con.
(* Goal: forall (_ : Irreflexive Line ConLn) (_ : Separating Line ConLn), ConLn l n *)
unfold Separating at 1 in |- *.
(* Goal: forall (_ : Irreflexive Line ConLn) (_ : forall (x y z : Line) (_ : ConLn x y), or (ConLn x z) (ConLn y z)), ConLn l n *)
intros H'1 H'2; elim (H'2 l m n); trivial.
(* Goal: forall _ : ConLn m n, ConLn l n *)
intro H'3; elim H'0; trivial.
Qed.
Theorem sym_SPar : forall x y : Line, SPar x y -> SPar y x.
Proof.
(* Goal: forall (x y : Line) (_ : SPar x y), SPar y x *)
unfold SPar in |- *.
(* Goal: forall (x y : Line) (_ : and (Par x y) (DiLn x y)), and (Par y x) (DiLn y x) *)
intuition.
Qed.
Hint Resolve sym_SPar.
Theorem cong_eqln_spar :
forall l m n : Line, SPar l m -> EqLn m n -> SPar l n.
Proof.
(* Goal: forall (l m n : Line) (_ : SPar l m) (_ : EqLn m n), SPar l n *)
unfold SPar in |- *.
(* Goal: forall (l m n : Line) (_ : and (Par l m) (DiLn l m)) (_ : EqLn m n), and (Par l n) (DiLn l n) *)
intros l m n H'; elim H'; intros H'0 H'1; try exact H'0; clear H'.
(* Goal: forall _ : EqLn m n, and (Par l n) (DiLn l n) *)
intro H'; split.
(* Goal: DiLn l n *)
(* Goal: Par l n *)
apply cong_eqln_par with (m := m); trivial.
(* Goal: DiLn l n *)
apply cong_eqln_diln with (m := m); trivial.
Qed.
Definition reverse : Segment -> Segment.
Proof.
(* Goal: forall _ : Segment, Segment *)
intro H'; elim H'.
(* Goal: forall (origin extremity : Point) (_ : DiPt origin extremity), Segment *)
intros a b H'0.
(* Goal: Segment *)
apply (Seg b a); auto.
Qed.
Theorem orig_rev : forall x : Segment, origin x = extremity (reverse x).
Proof.
(* Goal: forall x : Segment, @eq Point (origin x) (extremity (reverse x)) *)
intro x; elim x; simpl in |- *; auto.
Qed.
Theorem ext_rev : forall x : Segment, extremity x = origin (reverse x).
Proof.
(* Goal: forall x : Segment, @eq Point (extremity x) (origin (reverse x)) *)
intro x; elim x; simpl in |- *; auto.
Qed.
Theorem rev_defines_sameln : forall x : Segment, EqLn (ln x) (ln (reverse x)).
Proof.
(* Goal: forall x : Segment, EqLn (ln x) (ln (reverse x)) *)
intro x; apply Uniqueness_of_constructed_lines.
(* Goal: Incident (extremity (reverse x)) (ln x) *)
(* Goal: Incident (origin (reverse x)) (ln x) *)
rewrite <- (ext_rev x); auto.
(* Goal: Incident (extremity (reverse x)) (ln x) *)
rewrite <- (orig_rev x); auto.
Qed.
Hint Resolve rev_defines_sameln.
Definition flip : Twolines -> Twolines.
Proof.
(* Goal: forall _ : Twolines, Twolines *)
intro H'; elim H'.
(* Goal: forall (line1 line2 : Line) (_ : ConLn line1 line2), Twolines *)
intros l m H'0.
(* Goal: Twolines *)
apply (Twol m l); auto.
Qed.
Theorem line1_flip : forall x : Twolines, line1 x = line2 (flip x).
Proof.
(* Goal: forall x : Twolines, @eq Line (line1 x) (line2 (flip x)) *)
intro x; elim x; simpl in |- *; auto.
Qed.
Theorem line2_flip : forall x : Twolines, line2 x = line1 (flip x).
Proof.
(* Goal: forall x : Twolines, @eq Line (line2 x) (line1 (flip x)) *)
intro x; elim x; simpl in |- *; auto.
Qed.
Theorem flip_defines_samept : forall x : Twolines, EqPt (pt x) (pt (flip x)).
Proof.
(* Goal: forall x : Twolines, EqPt (pt x) (pt (flip x)) *)
intro x; apply Uniqueness_of_constructed_points.
(* Goal: Incident (pt x) (line2 (flip x)) *)
(* Goal: Incident (pt x) (line1 (flip x)) *)
rewrite <- (line2_flip x); auto.
(* Goal: Incident (pt x) (line2 (flip x)) *)
rewrite <- (line1_flip x); auto.
Qed.
Hint Resolve rev_defines_sameln flip_defines_samept.
Definition colinear (x y : Segment) : Prop := EqLn (ln x) (ln y).
Theorem Colinearity_is_equivalence : Equivalence Segment colinear.
Proof.
(* Goal: Equivalence Segment colinear *)
cut (Equivalence Line EqLn); auto.
(* Goal: forall _ : Equivalence Line EqLn, Equivalence Segment colinear *)
intro H'; elim H'.
(* Goal: forall (_ : Reflexive Line EqLn) (_ : Symmetric Line EqLn) (_ : Transitive Line EqLn), Equivalence Segment colinear *)
intros H'0 H'1 H'2; apply Definition_of_equivalence; unfold colinear in |- *; auto.
(* Goal: Transitive Segment (fun x y : Segment => EqLn (ln x) (ln y)) *)
red in |- *.
(* Goal: forall (x y z : Segment) (_ : EqLn (ln x) (ln y)) (_ : EqLn (ln y) (ln z)), EqLn (ln x) (ln z) *)
intros x y z H'3 H'4.
(* Goal: EqLn (ln x) (ln z) *)
red in H'2.
(* Goal: EqLn (ln x) (ln z) *)
apply H'2 with (y := ln y); auto.
Qed.
Proof.
cut (Equivalence Line EqLn); auto.
intro H'; elim H'.
intros H'0 H'1 H'2; apply Definition_of_equivalence; unfold colinear in |- *;
auto.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Endo_set.
Section Def.
Variable M : MONOID.
Variable S : SET.
Definition operation := Hom M (Endo_SET S).
Variable op : operation.
Lemma operation_assoc :
forall (x y : M) (s : S), Equal (op (sgroup_law _ x y) s) (op x (op y s)).
Proof.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup M))) (s : Carrier S), @Equal S (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (sgroup_law (monoid_sgroup M) x y)) s) (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) x) (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) y) s)) *)
intros x y s; try assumption.
(* Goal: @Equal S (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (sgroup_law (monoid_sgroup M) x y)) s) (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) x) (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) y) s)) *)
apply Trans with (Ap (sgroup_law (Endo_SET S) (Ap (sgroup_map (monoid_sgroup_hom op)) x) (Ap (sgroup_map (monoid_sgroup_hom op)) y)) s); auto with algebra.
(* Goal: @Equal S (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (sgroup_law (monoid_sgroup M) x y)) s) (@Ap S S (sgroup_law (monoid_sgroup (Endo_SET S)) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) x) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) y)) s) *)
cut (Equal (op (sgroup_law _ x y)) (sgroup_law (Endo_SET S) (op x) (op y))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (sgroup_law (monoid_sgroup M) x y)) (sgroup_law (monoid_sgroup (Endo_SET S)) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) x) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) y)) *)
(* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (sgroup_law (monoid_sgroup M) x y)) (sgroup_law (monoid_sgroup (Endo_SET S)) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) x) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) y)), @Equal S (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (sgroup_law (monoid_sgroup M) x y)) s) (@Ap S S (sgroup_law (monoid_sgroup (Endo_SET S)) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) x) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) y)) s) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (sgroup_law (monoid_sgroup M) x y)) (sgroup_law (monoid_sgroup (Endo_SET S)) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) x) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) y)) *)
apply (sgroup_hom_prf op).
Qed.
Lemma operation_unit : forall s : S, Equal (op (monoid_unit M) s) s.
Proof.
(* Goal: forall s : Carrier S, @Equal S (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) s) s *)
intros s; try assumption.
(* Goal: @Equal S (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) s) s *)
apply Trans with (Id S s); auto with algebra.
(* Goal: @Equal S (@Ap S S (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) s) (@Ap S S (Id S) s) *)
cut (Equal (op (monoid_unit M)) (Id S)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) (Id S) *)
apply Trans with (monoid_unit (Endo_SET S)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@monoid_unit (monoid_sgroup (Endo_SET S)) (monoid_on_def (Endo_SET S))) (Id S) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) (@monoid_unit (monoid_sgroup (Endo_SET S)) (monoid_on_def (Endo_SET S))) *)
generalize (monoid_hom_prf op).
(* Goal: @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@monoid_unit (monoid_sgroup (Endo_SET S)) (monoid_on_def (Endo_SET S))) (Id S) *)
(* Goal: forall _ : @monoid_hom_prop M (Endo_SET S) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op))), @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) (@monoid_unit (monoid_sgroup (Endo_SET S)) (monoid_on_def (Endo_SET S))) *)
unfold monoid_hom_prop in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@monoid_unit (monoid_sgroup (Endo_SET S)) (monoid_on_def (Endo_SET S))) (Id S) *)
(* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) (@monoid_unit (monoid_sgroup (Endo_SET S)) (monoid_on_def (Endo_SET S))), @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@Ap (sgroup_set (monoid_sgroup M)) (sgroup_set (monoid_sgroup (Endo_SET S))) (@sgroup_map (monoid_sgroup M) (monoid_sgroup (Endo_SET S)) (@monoid_sgroup_hom M (Endo_SET S) op)) (@monoid_unit (monoid_sgroup M) (monoid_on_def M))) (@monoid_unit (monoid_sgroup (Endo_SET S)) (monoid_on_def (Endo_SET S))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (Endo_SET S))) (@monoid_unit (monoid_sgroup (Endo_SET S)) (monoid_on_def (Endo_SET S))) (Id S) *)
auto with algebra.
Qed.
End Def.
Hint Resolve operation_assoc operation_unit: algebra. |
Require Export GeoCoq.Elements.OriginalProofs.lemma_extension.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_layoff :
forall A B C D,
neq A B -> neq C D ->
exists X, Out A B X /\ Cong A X C D.
Proof.
(* Goal: forall (A B C D : @Point Ax0) (_ : @neq Ax0 A B) (_ : @neq Ax0 C D), @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
assert (~ eq B A).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
(* Goal: not (@eq Ax0 B A) *)
{
(* Goal: not (@eq Ax0 B A) *)
intro.
(* Goal: False *)
assert (eq A B) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
let Tf:=fresh in assert (Tf:exists E, (BetS B A E /\ Cong A E C D)) by (conclude lemma_extension);destruct Tf as [E];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
assert (BetS E A B) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
assert (neq E A) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
assert (BetS E A B) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
let Tf:=fresh in assert (Tf:exists P, (BetS E A P /\ Cong A P C D)) by (conclude lemma_extension);destruct Tf as [P];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
assert (Out A B P) by (conclude_def Out ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => and (@Out Ax0 A B X) (@Cong Ax0 A X C D)) *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_inequalitysymmetric.
Require Export GeoCoq.Elements.OriginalProofs.lemma_3_7b.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_partnotequalwhole :
forall A B C,
BetS A B C ->
~ Cong A B A C.
Proof.
(* Goal: forall (A B C : @Point Ax0) (_ : @BetS Ax0 A B C), not (@Cong Ax0 A B A C) *)
intros.
(* Goal: not (@Cong Ax0 A B A C) *)
assert (neq A B) by (forward_using lemma_betweennotequal).
(* Goal: not (@Cong Ax0 A B A C) *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: not (@Cong Ax0 A B A C) *)
let Tf:=fresh in assert (Tf:exists D, BetS B A D) by (conclude postulate_Euclid2);destruct Tf as [D];spliter.
(* Goal: not (@Cong Ax0 A B A C) *)
assert (BetS D A B) by (conclude axiom_betweennesssymmetry).
(* Goal: not (@Cong Ax0 A B A C) *)
assert (BetS D A C) by (conclude lemma_3_7b).
(* Goal: not (@Cong Ax0 A B A C) *)
assert (neq B C) by (forward_using lemma_betweennotequal).
(* Goal: not (@Cong Ax0 A B A C) *)
assert (~ Cong A B A C).
(* Goal: not (@Cong Ax0 A B A C) *)
(* Goal: not (@Cong Ax0 A B A C) *)
{
(* Goal: not (@Cong Ax0 A B A C) *)
intro.
(* Goal: False *)
assert (eq B C) by (conclude lemma_extensionunique).
(* Goal: False *)
contradict.
(* BG Goal: not (@Cong Ax0 A B A C) *)
}
(* Goal: not (@Cong Ax0 A B A C) *)
close.
Qed.
End Euclid.
|